Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit027d29e

Browse files
committed
Stabilize just-added regression test cases.
The tests added by commits029dea8 et al turn out to producedifferent output under -DRANDOMIZE_ALLOCATED_MEMORY. This isnot a bug exactly: that flag causes coerce_type() to invokethe input function twice when coercing an unknown-type literalto a specific type. So you get tsqueryin's bleat about an emptytsquery twice. Revise the test query to avoid that.Discussion:https://postgr.es/m/20230406213813.uep7plg6lvcywujo@awork3.anarazel.de
1 parenta1fb4bd commit027d29e

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
@@ -1517,20 +1517,16 @@ to_tsquery('english','Lorem') && phraseto_tsquery('english','ullamcorper urna'),
15171517

15181518
-- Edge cases with empty query
15191519
SELECT ts_headline('english',
1520-
'',''::tsquery);
1520+
'',to_tsquery('english', ''));
15211521
NOTICE: text-search query doesn't contain lexemes: ""
1522-
LINE 2: '', ''::tsquery);
1523-
^
15241522
ts_headline
15251523
-------------
15261524

15271525
(1 row)
15281526

15291527
SELECT ts_headline('english',
1530-
'foo bar',''::tsquery);
1528+
'foo bar',to_tsquery('english', ''));
15311529
NOTICE: text-search query doesn't contain lexemes: ""
1532-
LINE 2: 'foo bar', ''::tsquery);
1533-
^
15341530
ts_headline
15351531
-------------
15361532
foo bar

‎src/test/regress/sql/tsearch.sql

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

454454
-- Edge cases with empty query
455455
SELECT ts_headline('english',
456-
'',''::tsquery);
456+
'',to_tsquery('english',''));
457457
SELECT ts_headline('english',
458-
'foo bar',''::tsquery);
458+
'foo bar',to_tsquery('english',''));
459459

460460
--Rewrite sub system
461461

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp