diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/collate.icu.utf8.out /tmp/cirrus-ci-build/src/test/recovery/tmp_check/results/collate.icu.utf8.out --- /tmp/cirrus-ci-build/src/test/regress/expected/collate.icu.utf8.out 2024-08-26 01:01:07.714418745 +0000 +++ /tmp/cirrus-ci-build/src/test/recovery/tmp_check/results/collate.icu.utf8.out 2024-08-26 01:07:25.581209277 +0000 @@ -1845,13 +1845,21 @@ CREATE TABLE test10pk (x text COLLATE case_sensitive PRIMARY KEY); INSERT INTO test10pk VALUES ('abc'), ('def'), ('ghi'); CREATE TABLE test10fk (x text COLLATE case_insensitive REFERENCES test10pk (x) ON UPDATE CASCADE ON DELETE CASCADE); +ERROR: foreign key constraint "test10fk_x_fkey" cannot be implemented +DETAIL: Foreign key cannot use indeterministic collations for referencing table "test10fk" +HINT: You may make the foreign key collations deterministic. INSERT INTO test10fk VALUES ('abc'); -- ok +ERROR: relation "test10fk" does not exist +LINE 1: INSERT INTO test10fk VALUES ('abc'); + ^ INSERT INTO test10fk VALUES ('ABC'); -- error -ERROR: insert or update on table "test10fk" violates foreign key constraint "test10fk_x_fkey" -DETAIL: Key (x)=(ABC) is not present in table "test10pk". +ERROR: relation "test10fk" does not exist +LINE 1: INSERT INTO test10fk VALUES ('ABC'); + ^ INSERT INTO test10fk VALUES ('xyz'); -- error -ERROR: insert or update on table "test10fk" violates foreign key constraint "test10fk_x_fkey" -DETAIL: Key (x)=(xyz) is not present in table "test10pk". +ERROR: relation "test10fk" does not exist +LINE 1: INSERT INTO test10fk VALUES ('xyz'); + ^ SELECT * FROM test10pk; x ----- @@ -1861,21 +1869,18 @@ (3 rows) SELECT * FROM test10fk; - x ------ - abc -(1 row) - +ERROR: relation "test10fk" does not exist +LINE 1: SELECT * FROM test10fk; + ^ -- restrict update even though the values are "equal" in the FK table UPDATE test10fk SET x = 'ABC' WHERE x = 'abc'; -- error -ERROR: insert or update on table "test10fk" violates foreign key constraint "test10fk_x_fkey" -DETAIL: Key (x)=(ABC) is not present in table "test10pk". +ERROR: relation "test10fk" does not exist +LINE 1: UPDATE test10fk SET x = 'ABC' WHERE x = 'abc'; + ^ SELECT * FROM test10fk; - x ------ - abc -(1 row) - +ERROR: relation "test10fk" does not exist +LINE 1: SELECT * FROM test10fk; + ^ DELETE FROM test10pk WHERE x = 'abc'; SELECT * FROM test10pk; x @@ -1885,19 +1890,28 @@ (2 rows) SELECT * FROM test10fk; - x ---- -(0 rows) - +ERROR: relation "test10fk" does not exist +LINE 1: SELECT * FROM test10fk; + ^ -- PK is case-insensitive, FK is case-sensitive CREATE TABLE test11pk (x text COLLATE case_insensitive PRIMARY KEY); INSERT INTO test11pk VALUES ('abc'), ('def'), ('ghi'); CREATE TABLE test11fk (x text COLLATE case_sensitive REFERENCES test11pk (x) ON UPDATE CASCADE ON DELETE CASCADE); +ERROR: foreign key constraint "test11fk_x_fkey" cannot be implemented +DETAIL: Cannot have indeterministic collations in primary key for referenced table "test11pk" +HINT: You may make the primary key collations deterministic. INSERT INTO test11fk VALUES ('abc'); -- ok +ERROR: relation "test11fk" does not exist +LINE 1: INSERT INTO test11fk VALUES ('abc'); + ^ INSERT INTO test11fk VALUES ('ABC'); -- ok +ERROR: relation "test11fk" does not exist +LINE 1: INSERT INTO test11fk VALUES ('ABC'); + ^ INSERT INTO test11fk VALUES ('xyz'); -- error -ERROR: insert or update on table "test11fk" violates foreign key constraint "test11fk_x_fkey" -DETAIL: Key (x)=(xyz) is not present in table "test11pk". +ERROR: relation "test11fk" does not exist +LINE 1: INSERT INTO test11fk VALUES ('xyz'); + ^ SELECT * FROM test11pk; x ----- @@ -1907,21 +1921,15 @@ (3 rows) SELECT * FROM test11fk; - x ------ - abc - ABC -(2 rows) - +ERROR: relation "test11fk" does not exist +LINE 1: SELECT * FROM test11fk; + ^ -- cascade update even though the values are "equal" in the PK table UPDATE test11pk SET x = 'ABC' WHERE x = 'abc'; SELECT * FROM test11fk; - x ------ - ABC - ABC -(2 rows) - +ERROR: relation "test11fk" does not exist +LINE 1: SELECT * FROM test11fk; + ^ DELETE FROM test11pk WHERE x = 'abc'; SELECT * FROM test11pk; x @@ -1931,10 +1939,9 @@ (2 rows) SELECT * FROM test11fk; - x ---- -(0 rows) - +ERROR: relation "test11fk" does not exist +LINE 1: SELECT * FROM test11fk; + ^ -- partitioning CREATE TABLE test20 (a int, b text COLLATE case_insensitive) PARTITION BY LIST (b); CREATE TABLE test20_1 PARTITION OF test20 FOR VALUES IN ('abc');