diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/boolean.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/boolean.out --- /tmp/cirrus-ci-build/src/test/regress/expected/boolean.out 2026-02-13 01:27:04.271092000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/boolean.out 2026-02-13 01:28:26.926960000 +0000 @@ -392,75 +392,35 @@ SELECT f1 FROM BOOLTBL1 WHERE f1 IS TRUE; - f1 ----- - t - t - t -(3 rows) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL1 WHERE f1 IS NOT FALSE; - f1 ----- - t - t - t -(3 rows) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL1 WHERE f1 IS FALSE; - f1 ----- - f -(1 row) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL1 WHERE f1 IS NOT TRUE; - f1 ----- - f -(1 row) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL2 WHERE f1 IS TRUE; - f1 ----- -(0 rows) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL2 WHERE f1 IS NOT FALSE; - f1 ----- -(0 rows) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL2 WHERE f1 IS FALSE; - f1 ----- - f - f - f - f -(4 rows) - +ERROR: no relation entry for relid 1 SELECT f1 FROM BOOLTBL2 WHERE f1 IS NOT TRUE; - f1 ----- - f - f - f - f -(4 rows) - +ERROR: no relation entry for relid 1 -- -- Tests for BooleanTest -- @@ -477,13 +437,7 @@ b IS UNKNOWN AS isunknown, b IS NOT UNKNOWN AS isnotunknown FROM booltbl3 ORDER BY o; - d | istrue | isnottrue | isfalse | isnotfalse | isunknown | isnotunknown --------+--------+-----------+---------+------------+-----------+-------------- - true | t | f | f | t | f | t - false | f | t | t | f | f | t - null | f | t | f | t | t | f -(3 rows) - +ERROR: no relation entry for relid 1 -- Test to make sure short-circuiting and NULL handling is -- correct. Use a table as source to prevent constant simplification -- from interfering. diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/type_sanity.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/type_sanity.out --- /tmp/cirrus-ci-build/src/test/regress/expected/type_sanity.out 2026-02-13 01:27:04.366883000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/type_sanity.out 2026-02-13 01:28:42.900836000 +0000 @@ -234,10 +234,7 @@ SELECT t1.oid, t1.typname, t2.oid, t2.typname FROM pg_type AS t1 LEFT JOIN pg_type AS t2 ON t1.typbasetype = t2.oid WHERE t1.typtype = 'd' AND t1.typoutput IS DISTINCT FROM t2.typoutput; - oid | typname | oid | typname ------+---------+-----+--------- -(0 rows) - +ERROR: no relation entry for relid 1 -- Check for bogus typreceive routines SELECT t1.oid, t1.typname, p1.oid, p1.proname FROM pg_type AS t1, pg_proc AS p1 @@ -359,10 +356,7 @@ SELECT t1.oid, t1.typname, t2.oid, t2.typname FROM pg_type AS t1 LEFT JOIN pg_type AS t2 ON t1.typbasetype = t2.oid WHERE t1.typtype = 'd' AND t1.typsend IS DISTINCT FROM t2.typsend; - oid | typname | oid | typname ------+---------+-----+--------- -(0 rows) - +ERROR: no relation entry for relid 1 -- Check for bogus typmodin routines SELECT t1.oid, t1.typname, p1.oid, p1.proname FROM pg_type AS t1, pg_proc AS p1 diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/create_index.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/create_index.out --- /tmp/cirrus-ci-build/src/test/regress/expected/create_index.out 2026-02-13 01:27:04.279988000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/create_index.out 2026-02-13 01:28:58.244230000 +0000 @@ -2662,22 +2662,10 @@ explain (costs off) select * from boolindex where b is true order by i desc limit 10; - QUERY PLAN ----------------------------------------------------------------- - Limit - -> Index Scan Backward using boolindex_b_i_key on boolindex - Index Cond: (b = true) -(3 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolindex where b is false order by i desc limit 10; - QUERY PLAN ----------------------------------------------------------------- - Limit - -> Index Scan Backward using boolindex_b_i_key on boolindex - Index Cond: (b = false) -(3 rows) - +ERROR: no relation entry for relid 1 -- -- REINDEX (VERBOSE) -- diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/select_distinct.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/select_distinct.out --- /tmp/cirrus-ci-build/src/test/regress/expected/select_distinct.out 2026-02-13 01:27:04.349718000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/select_distinct.out 2026-02-13 01:29:17.174573000 +0000 @@ -379,14 +379,7 @@ INSERT INTO DISTTABLE VALUES(NULL); -- basic cases SELECT f1, f1 IS DISTINCT FROM 2 as "not 2" FROM disttable; - f1 | not 2 -----+------- - 1 | t - 2 | f - 3 | t - | t -(4 rows) - +ERROR: no relation entry for relid 1 SELECT f1, f1 IS DISTINCT FROM NULL as "not null" FROM disttable; f1 | not null ----+---------- @@ -397,23 +390,9 @@ (4 rows) SELECT f1, f1 IS DISTINCT FROM f1 as "false" FROM disttable; - f1 | false -----+------- - 1 | f - 2 | f - 3 | f - | f -(4 rows) - +ERROR: no relation entry for relid 1 SELECT f1, f1 IS DISTINCT FROM f1+1 as "not null" FROM disttable; - f1 | not null -----+---------- - 1 | t - 2 | t - 3 | t - | f -(4 rows) - +ERROR: no relation entry for relid 1 -- check that optimizer constant-folds it properly SELECT 1 IS DISTINCT FROM 2 as "yes"; yes diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/update.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/update.out --- /tmp/cirrus-ci-build/src/test/regress/expected/update.out 2026-02-13 01:27:04.369274000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/update.out 2026-02-13 01:29:20.453910000 +0000 @@ -122,13 +122,14 @@ UPDATE update_test o SET (b,a) = (select a+1,b from update_test i where i.a=o.a and i.b=o.b and i.c is not distinct from o.c); +ERROR: no relation entry for relid 1 SELECT * FROM update_test; - a | b | c -----+-----+----- - 21 | 101 | - 41 | 12 | car - 42 | 12 | car - 11 | 42 | + a | b | c +-----+----+----- + 100 | 21 | + 11 | 41 | car + 11 | 42 | car + 41 | 11 | (4 rows) -- fail, multiple rows supplied: @@ -138,12 +139,12 @@ UPDATE update_test SET (b,a) = (select a+1,b from update_test where a = 1000) WHERE a = 11; SELECT * FROM update_test; - a | b | c -----+-----+----- - 21 | 101 | - 41 | 12 | car - 42 | 12 | car - | | + a | b | c +-----+----+----- + 100 | 21 | + 41 | 11 | + | | car + | | car (4 rows) -- *-expansion should work in this context: @@ -165,12 +166,12 @@ -- Make sure that we can update to a TOASTed value. UPDATE update_test SET c = repeat('x', 10000) WHERE c = 'car'; SELECT a, b, char_length(c) FROM update_test; - a | b | char_length -----+-----+------------- - | | - 21 | 100 | - 41 | 12 | 10000 - 42 | 12 | 10000 + a | b | char_length +-----+----+------------- + 100 | 21 | + 41 | 11 | + | | 10000 + | | 10000 (4 rows) -- Check multi-assignment with a Result node to handle a one-time filter. @@ -196,12 +197,12 @@ SET (a, b) = (SELECT b, a FROM update_test s WHERE s.a = t.a) WHERE CURRENT_USER = SESSION_USER; SELECT a, b, char_length(c) FROM update_test; - a | b | char_length ------+----+------------- - | | - 100 | 21 | - 12 | 41 | 10000 - 12 | 42 | 10000 + a | b | char_length +----+-----+------------- + 21 | 100 | + 11 | 41 | + | | 10000 + | | 10000 (4 rows) -- Test ON CONFLICT DO UPDATE diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/merge.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/merge.out --- /tmp/cirrus-ci-build/src/test/regress/expected/merge.out 2026-02-13 01:27:04.314456000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/merge.out 2026-02-13 01:29:54.636564000 +0000 @@ -2790,15 +2790,12 @@ WHEN MATCHED THEN UPDATE SET a = src.a, b = src.b WHEN NOT MATCHED BY SOURCE THEN DELETE RETURNING merge_action(), src.*, tgt.*; - merge_action | a | b | a | b ---------------+---+---+---+--------- - DELETE | | | | tgt row -(1 row) - +ERROR: no relation entry for relid 1 SELECT * FROM tgt; - a | b ----+--- -(0 rows) + a | b +---+--------- + | tgt row +(1 row) DROP TABLE src, tgt; -- diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/conversion.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/conversion.out --- /tmp/cirrus-ci-build/src/test/regress/expected/conversion.out 2026-02-13 01:27:04.276691000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/conversion.out 2026-02-13 01:31:20.764985000 +0000 @@ -170,10 +170,7 @@ using (description) where p.error is distinct from b.error order by description; - description | orig_error | error_after_padding --------------+------------+--------------------- -(0 rows) - +ERROR: no relation entry for relid 1 -- Test ASCII verification in fast path where incomplete -- UTF-8 sequences fall at the end of the preceding chunk. with test_bytes as ( @@ -197,10 +194,7 @@ using (description) where p.error is distinct from b.error order by description; - description | orig_error | error_after_padding --------------+------------+--------------------- -(0 rows) - +ERROR: no relation entry for relid 1 -- Test cases where UTF-8 sequences within short text -- come after the fast path returns. with test_bytes as ( @@ -224,10 +218,7 @@ using (description) where p.error is distinct from b.error order by description; - description | orig_error | error_after_padding --------------+------------+--------------------- -(0 rows) - +ERROR: no relation entry for relid 1 -- Test cases where incomplete UTF-8 sequences fall at the -- end of the part checked by the fast path. with test_bytes as ( @@ -251,10 +242,7 @@ using (description) where p.error is distinct from b.error order by description; - description | orig_error | error_after_padding --------------+------------+--------------------- -(0 rows) - +ERROR: no relation entry for relid 1 CREATE TABLE utf8_inputs (inbytes bytea, description text); insert into utf8_inputs values ('\x666f6f', 'valid, pure ASCII'), diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/alter_table.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/alter_table.out --- /tmp/cirrus-ci-build/src/test/regress/expected/alter_table.out 2026-02-13 01:27:04.269269000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/alter_table.out 2026-02-13 01:31:41.219972000 +0000 @@ -3581,12 +3581,12 @@ WHERE relkind IN ('r', 'i', 'S', 't', 'm') AND relpersistence != 't' AND mapped_oid IS DISTINCT FROM oid; +ERROR: no relation entry for relid 2 SELECT m.* FROM filenode_mapping m LEFT JOIN pg_class c ON c.oid = m.oid WHERE c.oid IS NOT NULL OR m.mapped_oid IS NOT NULL; - oid | mapped_oid | reltablespace | relfilenode | relname ------+------------+---------------+-------------+--------- -(0 rows) - +ERROR: relation "filenode_mapping" does not exist +LINE 1: SELECT m.* FROM filenode_mapping m LEFT JOIN pg_class c ON c... + ^ -- Checks on creating and manipulation of user defined relations in -- pg_catalog. SHOW allow_system_table_mods; diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/partition_prune.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/partition_prune.out --- /tmp/cirrus-ci-build/src/test/regress/expected/partition_prune.out 2026-02-13 01:27:04.330392000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/partition_prune.out 2026-02-13 01:32:00.423046000 +0000 @@ -1084,53 +1084,15 @@ (2 rows) explain (costs off) select * from boolpart where a is true or a is not true; - QUERY PLAN --------------------------------------------------- - Append - -> Seq Scan on boolpart_f boolpart_1 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) - -> Seq Scan on boolpart_t boolpart_2 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) - -> Seq Scan on boolpart_default boolpart_3 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) -(7 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not true; - QUERY PLAN ------------------------------------------------ - Append - -> Seq Scan on boolpart_f boolpart_1 - Filter: (a IS NOT TRUE) - -> Seq Scan on boolpart_default boolpart_2 - Filter: (a IS NOT TRUE) -(5 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not true and a is not false; - QUERY PLAN --------------------------------------------------- - Seq Scan on boolpart_default boolpart - Filter: ((a IS NOT TRUE) AND (a IS NOT FALSE)) -(2 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is unknown; - QUERY PLAN ---------------------------------------- - Seq Scan on boolpart_default boolpart - Filter: (a IS UNKNOWN) -(2 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not unknown; - QUERY PLAN ------------------------------------------------ - Append - -> Seq Scan on boolpart_f boolpart_1 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on boolpart_t boolpart_2 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on boolpart_default boolpart_3 - Filter: (a IS NOT UNKNOWN) -(7 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a in (true, false); a --- @@ -1151,134 +1113,42 @@ (1 row) select * from boolpart where a is true or a is not true; - a ---- - f - t - -(3 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not true; - a ---- - f - -(2 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not true and a is not false; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from boolpart where a is unknown; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not unknown; - a ---- - f - t -(2 rows) - +ERROR: no relation entry for relid 1 -- try some other permutations with a NULL partition instead of a DEFAULT delete from boolpart where a is null; create table boolpart_null partition of boolpart for values in (null); insert into boolpart values(null); explain (costs off) select * from boolpart where a is not true; - QUERY PLAN --------------------------------------------- - Append - -> Seq Scan on boolpart_f boolpart_1 - Filter: (a IS NOT TRUE) - -> Seq Scan on boolpart_null boolpart_2 - Filter: (a IS NOT TRUE) -(5 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not true and a is not false; - QUERY PLAN --------------------------------------------------- - Seq Scan on boolpart_null boolpart - Filter: ((a IS NOT TRUE) AND (a IS NOT FALSE)) -(2 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not false; - QUERY PLAN --------------------------------------------- - Append - -> Seq Scan on boolpart_t boolpart_1 - Filter: (a IS NOT FALSE) - -> Seq Scan on boolpart_null boolpart_2 - Filter: (a IS NOT FALSE) -(5 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is not unknown; - QUERY PLAN ------------------------------------------------ - Append - -> Seq Scan on boolpart_f boolpart_1 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on boolpart_t boolpart_2 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on boolpart_default boolpart_3 - Filter: (a IS NOT UNKNOWN) -(7 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not true; - a ---- - f - -(2 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not true and a is not false; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not false; - a ---- - t - -(2 rows) - +ERROR: no relation entry for relid 1 select * from boolpart where a is not unknown; - a ---- - f - t -(2 rows) - +ERROR: no relation entry for relid 1 -- check that all partitions are pruned when faced with conflicting clauses explain (costs off) select * from boolpart where a is not unknown and a is unknown; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on boolpart - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is false and a is unknown; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on boolpart - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from boolpart where a is true and a is unknown; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on boolpart - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 -- inverse boolean partitioning - a seemingly unlikely design, but we've got -- code for it, so we'd better test it. create table iboolpart (a bool) partition by list ((not a)); @@ -1313,65 +1183,15 @@ (2 rows) explain (costs off) select * from iboolpart where a is true or a is not true; - QUERY PLAN --------------------------------------------------- - Append - -> Seq Scan on iboolpart_t iboolpart_1 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) - -> Seq Scan on iboolpart_f iboolpart_2 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) - -> Seq Scan on iboolpart_default iboolpart_3 - Filter: ((a IS TRUE) OR (a IS NOT TRUE)) -(7 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from iboolpart where a is not true; - QUERY PLAN -------------------------------------------------- - Append - -> Seq Scan on iboolpart_t iboolpart_1 - Filter: (a IS NOT TRUE) - -> Seq Scan on iboolpart_f iboolpart_2 - Filter: (a IS NOT TRUE) - -> Seq Scan on iboolpart_default iboolpart_3 - Filter: (a IS NOT TRUE) -(7 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from iboolpart where a is not true and a is not false; - QUERY PLAN --------------------------------------------------------- - Append - -> Seq Scan on iboolpart_t iboolpart_1 - Filter: ((a IS NOT TRUE) AND (a IS NOT FALSE)) - -> Seq Scan on iboolpart_f iboolpart_2 - Filter: ((a IS NOT TRUE) AND (a IS NOT FALSE)) - -> Seq Scan on iboolpart_default iboolpart_3 - Filter: ((a IS NOT TRUE) AND (a IS NOT FALSE)) -(7 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from iboolpart where a is unknown; - QUERY PLAN -------------------------------------------------- - Append - -> Seq Scan on iboolpart_t iboolpart_1 - Filter: (a IS UNKNOWN) - -> Seq Scan on iboolpart_f iboolpart_2 - Filter: (a IS UNKNOWN) - -> Seq Scan on iboolpart_default iboolpart_3 - Filter: (a IS UNKNOWN) -(7 rows) - +ERROR: no relation entry for relid 1 explain (costs off) select * from iboolpart where a is not unknown; - QUERY PLAN -------------------------------------------------- - Append - -> Seq Scan on iboolpart_t iboolpart_1 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on iboolpart_f iboolpart_2 - Filter: (a IS NOT UNKNOWN) - -> Seq Scan on iboolpart_default iboolpart_3 - Filter: (a IS NOT UNKNOWN) -(7 rows) - +ERROR: no relation entry for relid 1 select * from iboolpart where a in (true, false); a --- @@ -1392,64 +1212,26 @@ (1 row) select * from iboolpart where a is true or a is not true; - a ---- - t - f - -(3 rows) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is not true; - a ---- - f - -(2 rows) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is not true and a is not false; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is unknown; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is not unknown; - a ---- - t - f -(2 rows) - +ERROR: no relation entry for relid 1 -- Try some other permutations with a NULL partition instead of a DEFAULT delete from iboolpart where a is null; create table iboolpart_null partition of iboolpart for values in (null); insert into iboolpart values(null); -- Pruning shouldn't take place for these. Just check the result is correct select * from iboolpart where a is not true; - a ---- - f - -(2 rows) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is not true and a is not false; - a ---- - -(1 row) - +ERROR: no relation entry for relid 1 select * from iboolpart where a is not false; - a ---- - t - -(2 rows) - +ERROR: no relation entry for relid 1 create table boolrangep (a bool, b bool, c int) partition by range (a,b,c); create table boolrangep_tf partition of boolrangep for values from ('true', 'false', 0) to ('true', 'false', 100); create table boolrangep_ft partition of boolrangep for values from ('false', 'true', 0) to ('false', 'true', 100); @@ -1466,30 +1248,10 @@ -- ensure we prune boolrangep_tf explain (costs off) select * from boolrangep where a is not true and not b and c = 25; - QUERY PLAN ------------------------------------------------------------- - Append - -> Seq Scan on boolrangep_ff1 boolrangep_1 - Filter: ((a IS NOT TRUE) AND (NOT b) AND (c = 25)) - -> Seq Scan on boolrangep_ff2 boolrangep_2 - Filter: ((a IS NOT TRUE) AND (NOT b) AND (c = 25)) - -> Seq Scan on boolrangep_ft boolrangep_3 - Filter: ((a IS NOT TRUE) AND (NOT b) AND (c = 25)) - -> Seq Scan on boolrangep_null boolrangep_4 - Filter: ((a IS NOT TRUE) AND (NOT b) AND (c = 25)) -(9 rows) - +ERROR: no relation entry for relid 1 -- ensure we prune everything apart from boolrangep_tf and boolrangep_null explain (costs off) select * from boolrangep where a is not false and not b and c = 25; - QUERY PLAN -------------------------------------------------------------- - Append - -> Seq Scan on boolrangep_tf boolrangep_1 - Filter: ((a IS NOT FALSE) AND (NOT b) AND (c = 25)) - -> Seq Scan on boolrangep_null boolrangep_2 - Filter: ((a IS NOT FALSE) AND (NOT b) AND (c = 25)) -(5 rows) - +ERROR: no relation entry for relid 1 -- test scalar-to-array operators create table coercepart (a varchar) partition by list (a); create table coercepart_ab partition of coercepart for values in ('ab'); diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/predicate.out /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/predicate.out --- /tmp/cirrus-ci-build/src/test/regress/expected/predicate.out 2026-02-13 01:27:04.336858000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/pg_upgrade/002_pg_upgrade/data/results/predicate.out 2026-02-13 01:31:42.622146000 +0000 @@ -614,13 +614,7 @@ -- DistinctExpr EXPLAIN (COSTS OFF) SELECT * FROM pred_tab WHERE (a IS DISTINCT FROM b) IS NULL; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on pred_tab - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 -- RelabelType EXPLAIN (COSTS OFF) SELECT * FROM pred_tab WHERE (a::oid) IS NULL; @@ -645,158 +639,65 @@ -- Ensure that the predicate folds to constant TRUE EXPLAIN(COSTS OFF) SELECT id FROM dist_tab WHERE val_nn IS DISTINCT FROM NULL::INT; - QUERY PLAN ----------------------- - Seq Scan on dist_tab -(1 row) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_nn IS DISTINCT FROM NULL::INT; - id ----- - 1 - 2 - 3 -(3 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate folds to constant FALSE EXPLAIN(COSTS OFF) SELECT id FROM dist_tab WHERE val_nn IS NOT DISTINCT FROM NULL::INT; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on dist_tab - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_nn IS NOT DISTINCT FROM NULL::INT; - id ----- -(0 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate is converted to an inequality operator EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE val_nn IS DISTINCT FROM 10; - QUERY PLAN --------------------------- - Seq Scan on dist_tab - Filter: (val_nn <> 10) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_nn IS DISTINCT FROM 10; - id ----- - 2 - 3 -(2 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate is converted to an equality operator, and thus can -- use index scan SET enable_seqscan TO off; EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE val_nn IS NOT DISTINCT FROM 10; - QUERY PLAN ----------------------------------------------- - Index Scan using dist_tab_nn_idx on dist_tab - Index Cond: (val_nn = 10) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_nn IS NOT DISTINCT FROM 10; - id ----- - 1 -(1 row) - +ERROR: no relation entry for relid 1 RESET enable_seqscan; -- Ensure that the predicate is preserved as "IS DISTINCT FROM" EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE val_null IS DISTINCT FROM 20; - QUERY PLAN ------------------------------------------- - Seq Scan on dist_tab - Filter: (val_null IS DISTINCT FROM 20) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_null IS DISTINCT FROM 20; - id ----- - 1 - 2 - 3 -(3 rows) - +ERROR: no relation entry for relid 1 -- Safety check for rowtypes -- Ensure that the predicate is converted to an inequality operator EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE row_nn IS DISTINCT FROM ROW(1, 5)::dist_row_t; - QUERY PLAN -------------------------------------------- - Seq Scan on dist_tab - Filter: (row_nn <> '(1,5)'::dist_row_t) -(2 rows) - +ERROR: no relation entry for relid 1 -- ... and that all 3 rows are returned SELECT id FROM dist_tab WHERE row_nn IS DISTINCT FROM ROW(1, 5)::dist_row_t; - id ----- - 1 - 2 - 3 -(3 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate is converted to an equality operator, and thus -- mergejoinable or hashjoinable SET enable_nestloop TO off; EXPLAIN (COSTS OFF) SELECT * FROM dist_tab t1 JOIN dist_tab t2 ON t1.val_nn IS NOT DISTINCT FROM t2.val_nn; - QUERY PLAN --------------------------------------- - Hash Join - Hash Cond: (t1.val_nn = t2.val_nn) - -> Seq Scan on dist_tab t1 - -> Hash - -> Seq Scan on dist_tab t2 -(5 rows) - +ERROR: no relation entry for relid 1 SELECT * FROM dist_tab t1 JOIN dist_tab t2 ON t1.val_nn IS NOT DISTINCT FROM t2.val_nn; - id | val_nn | val_null | row_nn | id | val_nn | val_null | row_nn -----+--------+----------+--------+----+--------+----------+-------- - 1 | 10 | 10 | (1,1) | 1 | 10 | 10 | (1,1) - 2 | 20 | | (2,2) | 2 | 20 | | (2,2) - 3 | 30 | 30 | (1,) | 3 | 30 | 30 | (1,) -(3 rows) - +ERROR: no relation entry for relid 1 RESET enable_nestloop; -- Ensure that the predicate is converted to IS NOT NULL EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE val_null IS DISTINCT FROM NULL::INT; - QUERY PLAN ----------------------------------- - Seq Scan on dist_tab - Filter: (val_null IS NOT NULL) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_null IS DISTINCT FROM NULL::INT; - id ----- - 1 - 3 -(2 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate is converted to IS NULL EXPLAIN (COSTS OFF) SELECT id FROM dist_tab WHERE val_null IS NOT DISTINCT FROM NULL::INT; - QUERY PLAN ------------------------------- - Seq Scan on dist_tab - Filter: (val_null IS NULL) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM dist_tab WHERE val_null IS NOT DISTINCT FROM NULL::INT; - id ----- - 2 -(1 row) - +ERROR: no relation entry for relid 1 -- Safety check for rowtypes -- The predicate is converted to IS NOT NULL, and get_rule_expr prints it as IS -- DISTINCT FROM because argisrow is false, indicating that we're applying a @@ -847,110 +748,47 @@ -- Ensure that the predicate folds to constant FALSE EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS UNKNOWN; - QUERY PLAN ------------------------------- - Result - Replaces: Scan on bool_tab - One-Time Filter: false -(3 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS UNKNOWN; - id ----- -(0 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate folds to constant TRUE EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS NOT UNKNOWN; - QUERY PLAN ----------------------- - Seq Scan on bool_tab -(1 row) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS NOT UNKNOWN; - id ----- - 1 - 2 -(2 rows) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate folds to flag_nn EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS TRUE; - QUERY PLAN ----------------------- - Seq Scan on bool_tab - Filter: flag_nn -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS TRUE; - id ----- - 1 -(1 row) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate folds to flag_nn, and thus can use index scan SET enable_seqscan TO off; EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS NOT FALSE; - QUERY PLAN ----------------------------------------------- - Index Scan using bool_tab_nn_idx on bool_tab - Index Cond: (flag_nn = true) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS NOT FALSE; - id ----- - 1 -(1 row) - +ERROR: no relation entry for relid 1 RESET enable_seqscan; -- Ensure that the predicate folds to not flag_nn EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS FALSE; - QUERY PLAN -------------------------- - Seq Scan on bool_tab - Filter: (NOT flag_nn) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS FALSE; - id ----- - 2 -(1 row) - +ERROR: no relation entry for relid 1 -- Ensure that the predicate folds to not flag_nn, and thus can use index scan SET enable_seqscan TO off; EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_nn IS NOT TRUE; - QUERY PLAN ----------------------------------------------- - Index Scan using bool_tab_nn_idx on bool_tab - Index Cond: (flag_nn = false) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_nn IS NOT TRUE; - id ----- - 2 -(1 row) - +ERROR: no relation entry for relid 1 RESET enable_seqscan; -- Ensure that the predicate is preserved as a BooleanTest EXPLAIN (COSTS OFF) SELECT id FROM bool_tab WHERE flag_null IS UNKNOWN; - QUERY PLAN ----------------------------------- - Seq Scan on bool_tab - Filter: (flag_null IS UNKNOWN) -(2 rows) - +ERROR: no relation entry for relid 1 SELECT id FROM bool_tab WHERE flag_null IS UNKNOWN; - id ----- - 2 -(1 row) - +ERROR: no relation entry for relid 1 DROP TABLE bool_tab;