aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-04-06 18:13:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-04-06 18:14:17 -0400
commit027d29edf454c9f91dc444c87efeeae5d2ce5893 (patch)
tree1d689e5efcb794ceab939e552657e4fb7d8c97b1 /src
parenta1fb4bd8562e0a7f162ff8a08c3c2ecdeb792f80 (diff)
downloadpostgresql-027d29edf454c9f91dc444c87efeeae5d2ce5893.tar.gz
postgresql-027d29edf454c9f91dc444c87efeeae5d2ce5893.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/tsearch.out8
-rw-r--r--src/test/regress/sql/tsearch.sql4
2 files changed, 4 insertions, 8 deletions
diff --git a/src/test/regress/expected/tsearch.out b/src/test/regress/expected/tsearch.out
index 1bf0f23a057..2bc71826fab 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