Skip to content

Commit 5499706

Browse files
committed
Stabilize just-added regression test cases.
The tests added by commits 029dea8 et al turn out to produce different output under -DRANDOMIZE_ALLOCATED_MEMORY. This is not a bug exactly: that flag causes coerce_type() to invoke the input function twice when coercing an unknown-type literal to a specific type. So you get tsqueryin's bleat about an empty tsquery twice. Revise the test query to avoid that. Discussion: https://postgr.es/m/20230406213813.uep7plg6lvcywujo@awork3.anarazel.de
1 parent 31ae2aa commit 5499706

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/test/regress/expected/tsearch.out

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,20 +2129,16 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
21292129

21302130
-- Edge cases with empty query
21312131
SELECT ts_headline('english',
2132-
'', ''::tsquery);
2132+
'', to_tsquery('english', ''));
21332133
NOTICE: text-search query doesn't contain lexemes: ""
2134-
LINE 2: '', ''::tsquery);
2135-
^
21362134
ts_headline
21372135
-------------
21382136

21392137
(1 row)
21402138

21412139
SELECT ts_headline('english',
2142-
'foo bar', ''::tsquery);
2140+
'foo bar', to_tsquery('english', ''));
21432141
NOTICE: text-search query doesn't contain lexemes: ""
2144-
LINE 2: 'foo bar', ''::tsquery);
2145-
^
21462142
ts_headline
21472143
-------------
21482144
foo bar

src/test/regress/sql/tsearch.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,9 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
642642

643643
-- Edge cases with empty query
644644
SELECT ts_headline('english',
645-
'', ''::tsquery);
645+
'', to_tsquery('english', ''));
646646
SELECT ts_headline('english',
647-
'foo bar', ''::tsquery);
647+
'foo bar', to_tsquery('english', ''));
648648

649649
--Rewrite sub system
650650

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy