From 23e09de4db69d6933c38b224b4890305e503189c Mon Sep 17 00:00:00 2001 From: naisila Date: Tue, 25 Jul 2023 12:45:28 +0300 Subject: [PATCH] HINT changed to DETAIL in PG16 Relevant PG commit: 56d0ed3b756b2e3799a7bbc0ac89bc7657ca2c33 https://github.com/postgres/postgres/commit/56d0ed3b756b2e3799a7bbc0ac89bc7657ca2c33 --- src/test/regress/bin/normalize.sed | 9 +++++++++ src/test/regress/expected/pg14.out | 2 +- src/test/regress/expected/pgmerge.out | 8 ++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index a374c73f5..8e4c46d02 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -294,3 +294,12 @@ s/\/\*\{"cId":.*\*\///g # Notice message that contains current columnar version that makes it harder to bump versions s/(NOTICE: issuing CREATE EXTENSION IF NOT EXISTS citus_columnar WITH SCHEMA pg_catalog VERSION )"[0-9]+\.[0-9]+-[0-9]+"/\1 "x.y-z"/ + +# pg16 changes +# can be removed when dropping PG14&15 support +#if PG_VERSION_NUM < PG_VERSION_16 +# (This is not preprocessor directive, but a reminder for the developer that will drop PG14&15 support ) + +s/HINT: There is an entry for table/DETAIL: There is an entry for table/g + +#endif /* PG_VERSION_NUM < PG_VERSION_16 */ diff --git a/src/test/regress/expected/pg14.out b/src/test/regress/expected/pg14.out index 8483a2891..9af18d6d4 100644 --- a/src/test/regress/expected/pg14.out +++ b/src/test/regress/expected/pg14.out @@ -1091,7 +1091,7 @@ SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE J1_TBL.t = 'one' ORDER BY SELECT * FROM (J1_TBL JOIN J2_TBL USING (i)) AS x WHERE J1_TBL.t = 'one' ORDER BY 1,2,3,4; -- error ERROR: invalid reference to FROM-clause entry for table "j1_tbl" -HINT: There is an entry for table "j1_tbl", but it cannot be referenced from this part of the query. +DETAIL: There is an entry for table "j1_tbl", but it cannot be referenced from this part of the query. SELECT * FROM J1_TBL JOIN J2_TBL USING (i) AS x WHERE x.i = 1 ORDER BY 1,2,3,4; -- ok i | j | t | k --------------------------------------------------------------------- diff --git a/src/test/regress/expected/pgmerge.out b/src/test/regress/expected/pgmerge.out index 895bf0680..da85041a1 100644 --- a/src/test/regress/expected/pgmerge.out +++ b/src/test/regress/expected/pgmerge.out @@ -232,7 +232,7 @@ ON t.tid = s.sid WHEN NOT MATCHED THEN INSERT DEFAULT VALUES; ERROR: invalid reference to FROM-clause entry for table "t" -HINT: There is an entry for table "t", but it cannot be referenced from this part of the query. +DETAIL: There is an entry for table "t", but it cannot be referenced from this part of the query. -- -- initial tests -- @@ -666,7 +666,7 @@ ON t.tid = s.sid WHEN NOT MATCHED THEN INSERT (tid, balance) VALUES (t.tid, s.delta); ERROR: invalid reference to FROM-clause entry for table "t" -HINT: There is an entry for table "t", but it cannot be referenced from this part of the query. +DETAIL: There is an entry for table "t", but it cannot be referenced from this part of the query. -- and again with a constant ON clause BEGIN; MERGE INTO target t @@ -675,7 +675,7 @@ ON (SELECT true) WHEN NOT MATCHED THEN INSERT (tid, balance) VALUES (t.tid, s.delta); ERROR: invalid reference to FROM-clause entry for table "t" -HINT: There is an entry for table "t", but it cannot be referenced from this part of the query. +DETAIL: There is an entry for table "t", but it cannot be referenced from this part of the query. SELECT * FROM target ORDER BY tid; ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK; @@ -780,7 +780,7 @@ USING wq_source s ON t.tid = s.sid WHEN NOT MATCHED AND t.balance = 100 THEN INSERT (tid) VALUES (s.sid); ERROR: invalid reference to FROM-clause entry for table "t" -HINT: There is an entry for table "t", but it cannot be referenced from this part of the query. +DETAIL: There is an entry for table "t", but it cannot be referenced from this part of the query. SELECT * FROM wq_target; ERROR: current transaction is aborted, commands ignored until end of transaction block ROLLBACK;