postgres.git / summary / log / commit / refs
commit 83965ef0bd2345f83d728f0ca80779b8fd1c264c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Apr 06 22:13:49 2023 +0000
First released in: 16.0, 11.20, 12.15, 13.11, 14.8, 15.3
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
src/test/regress/expected/tsearch.out | 8 ++------
src/test/regress/sql/tsearch.sql | 4 ++--
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/test/regress/expected/tsearch.out b/src/test/regress/expected/tsearch.out
index d9be8eef979..23662954b6b 100644
--- a/src/test/regress/expected/tsearch.out
+++ b/src/test/regress/expected/tsearch.out
@@ -1517,20 +1517,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
diff --git a/src/test/regress/sql/tsearch.sql b/src/test/regress/sql/tsearch.sql
index f1e61521071..ca78ce56bb9 100644
--- a/src/test/regress/sql/tsearch.sql
+++ b/src/test/regress/sql/tsearch.sql
@@ -453,9 +453,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
[parent: bc428b12ac3a]