mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Stabilize just-added regression test cases.
The tests added by commits 029dea882
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
This commit is contained in:
parent
f976a77787
commit
d6ac2348b8
@ -2002,20 +2002,16 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
|
||||
|
||||
-- Edge cases with empty query
|
||||
SELECT ts_headline('english',
|
||||
'', ''::tsquery);
|
||||
'', to_tsquery('english', ''));
|
||||
NOTICE: text-search query doesn't contain lexemes: ""
|
||||
LINE 2: '', ''::tsquery);
|
||||
^
|
||||
ts_headline
|
||||
-------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT ts_headline('english',
|
||||
'foo bar', ''::tsquery);
|
||||
'foo bar', to_tsquery('english', ''));
|
||||
NOTICE: text-search query doesn't contain lexemes: ""
|
||||
LINE 2: 'foo bar', ''::tsquery);
|
||||
^
|
||||
ts_headline
|
||||
-------------
|
||||
foo bar
|
||||
|
@ -565,9 +565,9 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
|
||||
|
||||
-- Edge cases with empty query
|
||||
SELECT ts_headline('english',
|
||||
'', ''::tsquery);
|
||||
'', to_tsquery('english', ''));
|
||||
SELECT ts_headline('english',
|
||||
'foo bar', ''::tsquery);
|
||||
'foo bar', to_tsquery('english', ''));
|
||||
|
||||
--Rewrite sub system
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user