Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b626483

Browse files
committed
Fix random regression failure in test case "collate.icu.utf8"
This is a fix similar to 2d7d67c, where slight plan alteration can cause a random failure of this regression test because of an incorect tuple ordering, except that this one involves lookups of pg_type. Similarly to the other case, add ORDER BY clauses to ensure the output order. The failure has been seen at least once on buildfarm member skink. Reported-by: Thomas Munro Discussion: https://postgr.es/m/CA+hUKGLjR9ZBvhXcr9b-NSBHPw9aRgbjyzGE+kqLsT4vwX+nkQ@mail.gmail.com Backpatch-through: 12
1 parent 6844adb commit b626483

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/test/regress/expected/collate.icu.utf8.out

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,14 +1644,16 @@ SELECT relname FROM pg_class WHERE 'PG_CLASS'::text = relname COLLATE case_insen
16441644
pg_class
16451645
(1 row)
16461646

1647-
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND typname <> 'INT2'::text COLLATE case_insensitive;
1647+
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND typname <> 'INT2'::text
1648+
COLLATE case_insensitive ORDER BY typname;
16481649
typname
16491650
---------
16501651
int4
16511652
int8
16521653
(2 rows)
16531654

1654-
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND 'INT2'::text <> typname COLLATE case_insensitive;;
1655+
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND 'INT2'::text <> typname
1656+
COLLATE case_insensitive ORDER BY typname;
16551657
typname
16561658
---------
16571659
int4

src/test/regress/sql/collate.icu.utf8.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,10 @@ SELECT 'ὀδυσσεύς' = 'ὈΔΥΣΣΕΎΣ' COLLATE case_insensitive;
595595
SELECT relname FROM pg_class WHERE relname = 'PG_CLASS'::text COLLATE case_insensitive;
596596
SELECT relname FROM pg_class WHERE 'PG_CLASS'::text = relname COLLATE case_insensitive;
597597

598-
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND typname <> 'INT2'::text COLLATE case_insensitive;
599-
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND 'INT2'::text <> typname COLLATE case_insensitive;;
598+
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND typname <> 'INT2'::text
599+
COLLATE case_insensitive ORDER BY typname;
600+
SELECT typname FROM pg_type WHERE typname LIKE 'int_' AND 'INT2'::text <> typname
601+
COLLATE case_insensitive ORDER BY typname;
600602

601603
-- test case adapted from subselect.sql
602604
CREATE TEMP TABLE outer_text (f1 text COLLATE case_insensitive, f2 text);

0 commit comments

Comments
 (0)