Skip to content

Commit 389c807

Browse files
committed
Adapt pg_pathman for PG 11.
I kinda lost interest to exorcise a couple of tests further in attempts to make them pass on all supported versions and just added copies. These are * pathman_expressions now differs because planner converts ROW(Const, Const) to just Const of record type. * Same with pathman_rebuild_updates. I have removed inclusion of partition_filter.h in pg_compat.h in 9.5 as it created circular dependency hell. I think it is not worthwhile to fight with it since the only thing actually needed was error message, which is used in this single place. Small typo fix in partitioning_test.py: con2.begin instead of con1.begin. Finally, run python tests with --failfast and --verbose options.
1 parent adfaa72 commit 389c807

26 files changed

+799
-89
lines changed

expected/pathman_expressions.out

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* -------------------------------------------
3+
* NOTE: This test behaves differenly on < 11 because planner now turns
4+
* Row(Const, Const) into just Const of record type, apparently since 3decd150
5+
* -------------------------------------------
6+
*/
17
\set VERBOSITY terse
28
SET search_path = 'public';
39
CREATE EXTENSION pg_pathman;
@@ -160,42 +166,38 @@ SELECT *, tableoid::REGCLASS FROM test_exprs.composite;
160166
(3 rows)
161167

162168
EXPLAIN (COSTS OFF) SELECT * FROM test_exprs.composite WHERE (a, b)::test_exprs.composite < (21, 0)::test_exprs.composite;
163-
QUERY PLAN
164-
----------------------------------------------------------------------------------------------
169+
QUERY PLAN
170+
------------------------------------------------------------------------------------
165171
Append
166172
-> Seq Scan on composite_1
167173
-> Seq Scan on composite_2
168174
-> Seq Scan on composite_3
169-
Filter: (ROW(a, b)::test_exprs.composite < ROW(21, '0'::text)::test_exprs.composite)
175+
Filter: (ROW(a, b)::test_exprs.composite < '(21,0)'::test_exprs.composite)
170176
(5 rows)
171177

172178
EXPLAIN (COSTS OFF) SELECT * FROM test_exprs.composite WHERE (a, b) < (21, 0)::test_exprs.composite;
173-
QUERY PLAN
174-
------------------------------------------------------------------------
179+
QUERY PLAN
180+
--------------------------------------------------------------
175181
Append
176182
-> Seq Scan on composite_1
177-
Filter: (ROW(a, b) < ROW(21, '0'::text)::test_exprs.composite)
183+
Filter: (ROW(a, b) < '(21,0)'::test_exprs.composite)
178184
-> Seq Scan on composite_2
179-
Filter: (ROW(a, b) < ROW(21, '0'::text)::test_exprs.composite)
185+
Filter: (ROW(a, b) < '(21,0)'::test_exprs.composite)
180186
-> Seq Scan on composite_3
181-
Filter: (ROW(a, b) < ROW(21, '0'::text)::test_exprs.composite)
187+
Filter: (ROW(a, b) < '(21,0)'::test_exprs.composite)
182188
-> Seq Scan on composite_4
183-
Filter: (ROW(a, b) < ROW(21, '0'::text)::test_exprs.composite)
189+
Filter: (ROW(a, b) < '(21,0)'::test_exprs.composite)
184190
(9 rows)
185191

186192
EXPLAIN (COSTS OFF) SELECT * FROM test_exprs.composite WHERE (a, b)::test_exprs.composite < (21, 0);
187-
QUERY PLAN
188-
----------------------------------------------------------------
193+
QUERY PLAN
194+
----------------------------------------------------------------------
189195
Append
190196
-> Seq Scan on composite_1
191-
Filter: (ROW(a, b)::test_exprs.composite < ROW(21, 0))
192197
-> Seq Scan on composite_2
193-
Filter: (ROW(a, b)::test_exprs.composite < ROW(21, 0))
194198
-> Seq Scan on composite_3
195-
Filter: (ROW(a, b)::test_exprs.composite < ROW(21, 0))
196-
-> Seq Scan on composite_4
197-
Filter: (ROW(a, b)::test_exprs.composite < ROW(21, 0))
198-
(9 rows)
199+
Filter: (ROW(a, b)::test_exprs.composite < '(21,0)'::record)
200+
(5 rows)
199201

200202
DROP TABLE test_exprs.composite CASCADE;
201203
NOTICE: drop cascades to 5 other objects

0 commit comments

Comments
 (0)