diff --git a/Makefile b/Makefile index dcfc094eda..eda60baa31 100644 --- a/Makefile +++ b/Makefile @@ -21,12 +21,12 @@ RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES)) LDFLAGS_SL += $(filter -lm, $(LIBS)) -REGRESS = rum rum_validate rum_hash ruminv timestamp \ - orderby orderby_hash limits \ - int2 int4 float4 float8 money oid \ +REGRESS = security rum rum_validate rum_hash ruminv timestamp \ + orderby orderby_hash altorder altorder_hash limits \ + int2 int4 int8 float4 float8 money oid \ time timetz date interval \ - macaddr inet cidr varchar char bytea bit varbit \ - numeric rum_weight expr + macaddr inet cidr text varchar char bytea bit varbit \ + numeric rum_weight expr array TAP_TESTS = 1 diff --git a/expected/altorder.out b/expected/altorder.out index 9f33015ce6..2c127fb52e 100644 --- a/expected/altorder.out +++ b/expected/altorder.out @@ -6,8 +6,8 @@ * altorder.out - test output for 64-bit systems * altorder_1.out - test output for 32-bit systems * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/altorder_1.out b/expected/altorder_1.out index 83db595bc0..85f25d837f 100644 --- a/expected/altorder_1.out +++ b/expected/altorder_1.out @@ -6,8 +6,8 @@ * altorder.out - test output for 64-bit systems * altorder_1.out - test output for 32-bit systems * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/altorder_2.out b/expected/altorder_2.out index fec9d06d05..cab3018985 100644 --- a/expected/altorder_2.out +++ b/expected/altorder_2.out @@ -6,8 +6,8 @@ * altorder.out - test output for 64-bit systems * altorder_1.out - test output for 32-bit systems * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_2.out - test output for 32-bit systems (>=18) * @@ -190,11 +190,10 @@ SELECT count(*) FROM atsts WHERE t @@ 'wr|qh'; QUERY PLAN --------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' | ''qh'''::tsquery) -(5 rows) +(4 rows) SELECT count(*) FROM atsts WHERE t @@ 'wr|qh'; count @@ -237,11 +236,10 @@ SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25'; QUERY PLAN ------------------------------------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone) -(5 rows) +(4 rows) SELECT count(*) FROM atsts WHERE d < '2016-05-16 14:21:25'; count @@ -254,11 +252,10 @@ SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25'; QUERY PLAN ------------------------------------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone) -(5 rows) +(4 rows) SELECT count(*) FROM atsts WHERE d > '2016-05-16 14:21:25'; count @@ -275,14 +272,12 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -299,14 +294,12 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -323,14 +316,12 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atsts WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -347,13 +338,11 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16 QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atsts - Disabled Nodes: 1 -(7 rows) + Disabled: true +(5 rows) SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atsts ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -370,12 +359,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ Sort - Disabled Nodes: 1 Sort Key: d -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -(6 rows) +(5 rows) SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d; id | d @@ -423,12 +411,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ Sort - Disabled Nodes: 1 Sort Key: d -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -(6 rows) +(5 rows) SELECT id, d FROM atsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d; id | d @@ -472,12 +459,11 @@ SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDE QUERY PLAN ------------------------------------------------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: d -> Seq Scan on atsts - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''q'':*'::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -(6 rows) +(5 rows) SELECT id, d FROM atsts WHERE t @@ 'wr&q:*' AND d >= '2016-05-16 14:21:25' ORDER BY d; id | d diff --git a/expected/altorder_hash.out b/expected/altorder_hash.out index eb70f9647c..a809c4e701 100644 --- a/expected/altorder_hash.out +++ b/expected/altorder_hash.out @@ -6,8 +6,8 @@ * altorder_hash.out - test output for 64-bit systems and * altorder_hash_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_hash_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/altorder_hash_1.out b/expected/altorder_hash_1.out index d45f699c39..42130ff826 100644 --- a/expected/altorder_hash_1.out +++ b/expected/altorder_hash_1.out @@ -6,8 +6,8 @@ * altorder_hash.out - test output for 64-bit systems and * altorder_hash_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_hash_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/altorder_hash_2.out b/expected/altorder_hash_2.out index 90dfb3a6ba..0b86bf212a 100644 --- a/expected/altorder_hash_2.out +++ b/expected/altorder_hash_2.out @@ -6,8 +6,8 @@ * altorder_hash.out - test output for 64-bit systems and * altorder_hash_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_hash_2.out - test output for 32-bit systems (>=18) * @@ -135,11 +135,10 @@ SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh'; QUERY PLAN --------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' | ''qh'''::tsquery) -(5 rows) +(4 rows) SELECT count(*) FROM atstsh WHERE t @@ 'wr|qh'; count @@ -182,11 +181,10 @@ SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25'; QUERY PLAN ------------------------------------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (d < 'Mon May 16 14:21:25 2016'::timestamp without time zone) -(5 rows) +(4 rows) SELECT count(*) FROM atstsh WHERE d < '2016-05-16 14:21:25'; count @@ -199,11 +197,10 @@ SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25'; QUERY PLAN ------------------------------------------------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (d > 'Mon May 16 14:21:25 2016'::timestamp without time zone) -(5 rows) +(4 rows) SELECT count(*) FROM atstsh WHERE d > '2016-05-16 14:21:25'; count @@ -220,14 +217,12 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -244,14 +239,12 @@ SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=| 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d <=| '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d <=| '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -268,14 +261,12 @@ SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER B QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d |=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, d, d |=> '2016-05-16 14:21:25' FROM atstsh WHERE t @@ 'wr&qh' ORDER BY d |=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -292,13 +283,11 @@ SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16 QUERY PLAN ------------------------------------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((d <=> 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -> Seq Scan on atstsh - Disabled Nodes: 1 -(7 rows) + Disabled: true +(5 rows) SELECT id, d, d <=> '2016-05-16 14:21:25' FROM atstsh ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5; id | d | ?column? @@ -315,12 +304,11 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDE QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ Sort - Disabled Nodes: 1 Sort Key: d -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d <= 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -(6 rows) +(5 rows) SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER BY d; id | d @@ -341,12 +329,11 @@ SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDE QUERY PLAN ------------------------------------------------------------------------------------------------------------------------ Sort - Disabled Nodes: 1 Sort Key: d -> Seq Scan on atstsh - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (d >= 'Mon May 16 14:21:25 2016'::timestamp without time zone)) -(6 rows) +(5 rows) SELECT id, d FROM atstsh WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d; id | d diff --git a/expected/array.out b/expected/array.out index 3d65d7e899..4c4aa58fe0 100644 --- a/expected/array.out +++ b/expected/array.out @@ -6,8 +6,8 @@ * array.out - test output for 64-bit systems and * array_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * array_2.out - test output for 64-bit systems (>=18). * array_3.out - test output for 32-bit systems (>=18). diff --git a/expected/array_1.out b/expected/array_1.out index b7fd610f69..1ce8b11ca0 100644 --- a/expected/array_1.out +++ b/expected/array_1.out @@ -6,8 +6,8 @@ * array.out - test output for 64-bit systems and * array_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * array_2.out - test output for 64-bit systems (>=18). * array_3.out - test output for 32-bit systems (>=18). diff --git a/expected/array_2.out b/expected/array_2.out index fc1cd35a83..bb680ced4c 100644 --- a/expected/array_2.out +++ b/expected/array_2.out @@ -6,8 +6,8 @@ * array.out - test output for 64-bit systems and * array_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * array_2.out - test output for 64-bit systems (>=18). * array_3.out - test output for 32-bit systems (>=18). @@ -527,7 +527,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}'; QUERY PLAN ---------------------------------- Seq Scan on test_array - Disabled Nodes: 1 + Disabled: true Filter: (i % '{}'::smallint[]) (3 rows) diff --git a/expected/array_3.out b/expected/array_3.out index c73bd00bcc..d0ed9fea86 100644 --- a/expected/array_3.out +++ b/expected/array_3.out @@ -6,8 +6,8 @@ * array.out - test output for 64-bit systems and * array_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * array_2.out - test output for 64-bit systems (>=18). * array_3.out - test output for 32-bit systems (>=18). @@ -527,7 +527,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM test_array WHERE i % '{}'; QUERY PLAN ---------------------------------- Seq Scan on test_array - Disabled Nodes: 1 + Disabled: true Filter: (i % '{}'::smallint[]) (3 rows) diff --git a/expected/int8.out b/expected/int8.out index 51c9d0deaf..0491c95fa6 100644 --- a/expected/int8.out +++ b/expected/int8.out @@ -6,8 +6,8 @@ * int8.out - test output for 64-bit systems and * int8_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * int8_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/int8_1.out b/expected/int8_1.out index 41a3b35406..42c6a3ee39 100644 --- a/expected/int8_1.out +++ b/expected/int8_1.out @@ -6,8 +6,8 @@ * int8.out - test output for 64-bit systems and * int8_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * int8_2.out - test output for 32-bit systems (>=18) * diff --git a/expected/int8_2.out b/expected/int8_2.out index 9a2015eae3..533f3e5b6f 100644 --- a/expected/int8_2.out +++ b/expected/int8_2.out @@ -6,8 +6,8 @@ * int8.out - test output for 64-bit systems and * int8_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * int8_2.out - test output for 32-bit systems (>=18) * @@ -238,11 +238,10 @@ SELECT count(*) FROM test_int8_a WHERE id < 400::int8; QUERY PLAN -------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: (id < '400'::bigint) -(5 rows) +(4 rows) SELECT count(*) FROM test_int8_a WHERE id < 400::int8; count @@ -255,14 +254,12 @@ SELECT id, id <=> 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id <=> 400 LI QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id <=> '400'::bigint)) -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id <=> 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id <=> 400 LIMIT 5; id | ?column? @@ -279,14 +276,12 @@ SELECT id, id <=| 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id <=| 400 LI QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id <=| '400'::bigint)) -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id <=| 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id <=| 400 LIMIT 5; id | ?column? @@ -303,14 +298,12 @@ SELECT id, id |=> 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id |=> 400 LI QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id |=> '400'::bigint)) -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id |=> 400 FROM test_int8_a WHERE t @@ 'wr&qh' ORDER BY id |=> 400 LIMIT 5; id | ?column? @@ -327,12 +320,11 @@ SELECT id FROM test_int8_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id; QUERY PLAN ------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id <= '400'::bigint)) -(6 rows) +(5 rows) SELECT id FROM test_int8_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id; id @@ -354,12 +346,11 @@ SELECT id FROM test_int8_a WHERE t @@ 'wr&qh' AND id >= 400::int8 ORDER BY id; QUERY PLAN ------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_int8_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id >= '400'::bigint)) -(6 rows) +(5 rows) SELECT id FROM test_int8_a WHERE t @@ 'wr&qh' AND id >= 400::int8 ORDER BY id; id @@ -534,11 +525,10 @@ SELECT count(*) FROM test_int8_h_a WHERE id < 400::int8; QUERY PLAN -------------------------------------- Aggregate - Disabled Nodes: 1 -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: (id < '400'::bigint) -(5 rows) +(4 rows) SELECT count(*) FROM test_int8_h_a WHERE id < 400::int8; count @@ -551,14 +541,12 @@ SELECT id, id <=> 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id <=> 400 QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id <=> '400'::bigint)) -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id <=> 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id <=> 400 LIMIT 5; id | ?column? @@ -575,14 +563,12 @@ SELECT id, id <=| 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id <=| 400 QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id <=| '400'::bigint)) -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id <=| 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id <=| 400 LIMIT 5; id | ?column? @@ -599,14 +585,12 @@ SELECT id, id |=> 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id |=> 400 QUERY PLAN --------------------------------------------------------- Limit - Disabled Nodes: 1 -> Sort - Disabled Nodes: 1 Sort Key: ((id |=> '400'::bigint)) -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: (t @@ '''wr'' & ''qh'''::tsquery) -(8 rows) +(6 rows) SELECT id, id |=> 400 FROM test_int8_h_a WHERE t @@ 'wr&qh' ORDER BY id |=> 400 LIMIT 5; id | ?column? @@ -623,12 +607,11 @@ SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id QUERY PLAN ------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id <= '400'::bigint)) -(6 rows) +(5 rows) SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id; id @@ -650,12 +633,11 @@ SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id >= 400::int8 ORDER BY id QUERY PLAN ------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id >= '400'::bigint)) -(6 rows) +(5 rows) SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id >= 400::int8 ORDER BY id; id @@ -677,12 +659,11 @@ SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id QUERY PLAN ------------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: ((id <=> '400'::bigint)) -> Seq Scan on test_int8_h_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id <= '400'::bigint)) -(6 rows) +(5 rows) SELECT id FROM test_int8_h_a WHERE t @@ 'wr&qh' AND id <= 400::int8 ORDER BY id <=> 400::int8; id diff --git a/expected/security.out b/expected/security.out index 86fcbf81da..3659de1241 100644 --- a/expected/security.out +++ b/expected/security.out @@ -1,3 +1,15 @@ +/* + * ------------------------------------ + * NOTE: This test behaves differenly + * ------------------------------------ + * + * Since 774171c4f64 (>=18) reporting of errors in extension script files + * is more detailed. + * + * security.out - test output for PostgreSQL (<18) + * security_1.out - test output for PostgreSQL (>=18) + * + */ -- Check security CVE-2020-14350 CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL; CREATE EXTENSION rum; diff --git a/expected/security_1.out b/expected/security_1.out new file mode 100644 index 0000000000..03f86e3cc1 --- /dev/null +++ b/expected/security_1.out @@ -0,0 +1,22 @@ +/* + * ------------------------------------ + * NOTE: This test behaves differenly + * ------------------------------------ + * + * Since 774171c4f64 (>=18) reporting of errors in extension script files + * is more detailed. + * + * security.out - test output for PostgreSQL (<18) + * security_1.out - test output for PostgreSQL (>=18) + * + */ +-- Check security CVE-2020-14350 +CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL; +CREATE EXTENSION rum; +ERROR: function "rum_anyarray_similar" already exists with same argument types +CONTEXT: SQL statement "CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) +RETURNS bool +AS '$libdir/rum' +LANGUAGE C STRICT STABLE" +extension script file "rum--1.3.sql", near line 1530 +DROP FUNCTION rum_anyarray_similar(anyarray,anyarray); diff --git a/expected/text.out b/expected/text.out index 36662119ec..6882c7ee58 100644 --- a/expected/text.out +++ b/expected/text.out @@ -3,8 +3,8 @@ * NOTE: This test behaves differenly * ------------------------------------ * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * text.out - test output for PostgreSQL (<18) * text_1.out - for PostgreSQL (>=18) diff --git a/expected/text_1.out b/expected/text_1.out index bdf8ea478f..ad272a2c8d 100644 --- a/expected/text_1.out +++ b/expected/text_1.out @@ -3,8 +3,8 @@ * NOTE: This test behaves differenly * ------------------------------------ * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * text.out - test output for PostgreSQL (<18) * text_1.out - for PostgreSQL (>=18) @@ -147,11 +147,10 @@ SELECT count(*) FROM test_text_a WHERE id < '400'; QUERY PLAN ------------------------------------ Aggregate - Disabled Nodes: 1 -> Seq Scan on test_text_a - Disabled Nodes: 1 + Disabled: true Filter: (id < '400'::text) -(5 rows) +(4 rows) SELECT count(*) FROM test_text_a WHERE id < '400'; count @@ -164,12 +163,11 @@ SELECT id FROM test_text_a WHERE t @@ 'wr&qh' AND id <= '400' ORDER BY id; QUERY PLAN ----------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_text_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id <= '400'::text)) -(6 rows) +(5 rows) SELECT id FROM test_text_a WHERE t @@ 'wr&qh' AND id <= '400' ORDER BY id; id @@ -190,12 +188,11 @@ SELECT id FROM test_text_a WHERE t @@ 'wr&qh' AND id >= '400' ORDER BY id; QUERY PLAN ----------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_text_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id >= '400'::text)) -(6 rows) +(5 rows) SELECT id FROM test_text_a WHERE t @@ 'wr&qh' AND id >= '400' ORDER BY id; id @@ -272,11 +269,10 @@ SELECT count(*) FROM test_text_h_a WHERE id < '400'; QUERY PLAN ------------------------------------ Aggregate - Disabled Nodes: 1 -> Seq Scan on test_text_h_a - Disabled Nodes: 1 + Disabled: true Filter: (id < '400'::text) -(5 rows) +(4 rows) SELECT count(*) FROM test_text_h_a WHERE id < '400'; count @@ -289,12 +285,11 @@ SELECT id FROM test_text_h_a WHERE t @@ 'wr&qh' AND id <= '400' ORDER BY id; QUERY PLAN ----------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_text_h_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id <= '400'::text)) -(6 rows) +(5 rows) SELECT id FROM test_text_h_a WHERE t @@ 'wr&qh' AND id <= '400' ORDER BY id; id @@ -315,12 +310,11 @@ SELECT id FROM test_text_h_a WHERE t @@ 'wr&qh' AND id >= '400' ORDER BY id; QUERY PLAN ----------------------------------------------------------------------------- Sort - Disabled Nodes: 1 Sort Key: id -> Seq Scan on test_text_h_a - Disabled Nodes: 1 + Disabled: true Filter: ((t @@ '''wr'' & ''qh'''::tsquery) AND (id >= '400'::text)) -(6 rows) +(5 rows) SELECT id FROM test_text_h_a WHERE t @@ 'wr&qh' AND id >= '400' ORDER BY id; id diff --git a/sql/altorder.sql b/sql/altorder.sql index 01789d8172..7353654ad2 100644 --- a/sql/altorder.sql +++ b/sql/altorder.sql @@ -6,8 +6,8 @@ * altorder.out - test output for 64-bit systems * altorder_1.out - test output for 32-bit systems * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_2.out - test output for 32-bit systems (>=18) * diff --git a/sql/altorder_hash.sql b/sql/altorder_hash.sql index 3b9b8121a3..3ab709a9e5 100644 --- a/sql/altorder_hash.sql +++ b/sql/altorder_hash.sql @@ -6,8 +6,8 @@ * altorder_hash.out - test output for 64-bit systems and * altorder_hash_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * altorder_hash_2.out - test output for 32-bit systems (>=18) * diff --git a/sql/array.sql b/sql/array.sql index e9c7adb274..51a4feba19 100644 --- a/sql/array.sql +++ b/sql/array.sql @@ -6,8 +6,8 @@ * array.out - test output for 64-bit systems and * array_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * array_2.out - test output for 64-bit systems (>=18). * array_3.out - test output for 32-bit systems (>=18). diff --git a/sql/int8.sql b/sql/int8.sql index a46bb6b7fc..31ac4958d1 100644 --- a/sql/int8.sql +++ b/sql/int8.sql @@ -6,8 +6,8 @@ * int8.out - test output for 64-bit systems and * int8_1.out - test output for 32-bit systems. * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * int8_2.out - test output for 32-bit systems (>=18) * diff --git a/sql/security.sql b/sql/security.sql index da7b83957b..dd367c0b8d 100644 --- a/sql/security.sql +++ b/sql/security.sql @@ -1,3 +1,16 @@ +/* + * ------------------------------------ + * NOTE: This test behaves differenly + * ------------------------------------ + * + * Since 774171c4f64 (>=18) reporting of errors in extension script files + * is more detailed. + * + * security.out - test output for PostgreSQL (<18) + * security_1.out - test output for PostgreSQL (>=18) + * + */ + -- Check security CVE-2020-14350 CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL; CREATE EXTENSION rum; diff --git a/sql/text.sql b/sql/text.sql index ab81d9d1fd..e845aad3ee 100644 --- a/sql/text.sql +++ b/sql/text.sql @@ -3,8 +3,8 @@ * NOTE: This test behaves differenly * ------------------------------------ * - * Since c01743aa486 (>=18) EXPLAIN output was changed, - * now it includes the number of disabled nodes + * Since c01743aa486 and 161320b4b96 (>=18) EXPLAIN output was changed, + * now it shows whether nodes are disabled. * * text.out - test output for PostgreSQL (<18) * text_1.out - for PostgreSQL (>=18)