HINT changed to DETAIL in PG16

Relevant PG commit:
56d0ed3b756b2e3799a7bbc0ac89bc7657ca2c33
56d0ed3b75
naisila/check_router_fix
naisila 2023-07-25 12:45:28 +03:00
parent 0294892873
commit 23e09de4db
3 changed files with 14 additions and 5 deletions

View File

@ -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 */

View File

@ -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
---------------------------------------------------------------------

View File

@ -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;