Skip to content

Commit 854182a

Browse files
committed
PGPRO-7975: [WIP] fix pg_pathman tests
Caused by: - 2489d76c4906f4461a364ca8ad7e0751ead8aa0d (PostgreSQL) Make Vars be outer-join-aware. - 8109191 (pg_pathman) fix bogus varno in PartitionFilter's targetlist (issue #112) - 92f0734 (pg_pathman) [PGPRO-7630] Post-processing for nodes added in plan tree by pathman PGPRO-5628: Port pg_proaudit to STD15 Tags: pg_pathman
1 parent e568aa6 commit 854182a

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

expected/pathman_column_type_1.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ CREATE FUNCTION get_cached_partition_cooked_key(REGCLASS)
3939
RETURNS TEXT AS 'pg_pathman', 'get_cached_partition_cooked_key_pl'
4040
LANGUAGE C STRICT;
4141
SELECT get_partition_cooked_key('test_column_type.test'::REGCLASS);
42-
get_partition_cooked_key
43-
-------------------------------------------------------------------------------------------------------------------------
44-
{VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
42+
get_partition_cooked_key
43+
---------------------------------------------------------------------------------------------------------------------------------------------
44+
{VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varnullingrels (b) :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
4545
(1 row)
4646

4747
SELECT get_cached_partition_cooked_key('test_column_type.test'::REGCLASS);
48-
get_cached_partition_cooked_key
49-
-------------------------------------------------------------------------------------------------------------------------
50-
{VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
48+
get_cached_partition_cooked_key
49+
---------------------------------------------------------------------------------------------------------------------------------------------
50+
{VAR :varno 1 :varattno 1 :vartype 23 :vartypmod -1 :varcollid 0 :varnullingrels (b) :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
5151
(1 row)
5252

5353
SELECT get_partition_key_type('test_column_type.test'::REGCLASS);
@@ -66,15 +66,15 @@ SELECT get_partition_key_type('test_column_type.test'::REGCLASS);
6666
(1 row)
6767

6868
SELECT get_partition_cooked_key('test_column_type.test'::REGCLASS);
69-
get_partition_cooked_key
70-
---------------------------------------------------------------------------------------------------------------------------
71-
{VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
69+
get_partition_cooked_key
70+
-----------------------------------------------------------------------------------------------------------------------------------------------
71+
{VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varnullingrels (b) :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
7272
(1 row)
7373

7474
SELECT get_cached_partition_cooked_key('test_column_type.test'::REGCLASS);
75-
get_cached_partition_cooked_key
76-
---------------------------------------------------------------------------------------------------------------------------
77-
{VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
75+
get_cached_partition_cooked_key
76+
-----------------------------------------------------------------------------------------------------------------------------------------------
77+
{VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varnullingrels (b) :varlevelsup 0 :varnosyn 1 :varattnosyn 1 :location 8}
7878
(1 row)
7979

8080
DROP FUNCTION get_cached_partition_cooked_key(REGCLASS);

expected/pathman_join_clause_4.out

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,15 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.parent
103103
LEFT JOIN test.child ON test.child.parent_id = test.parent.id AND
104104
test.child.owner_id = test.parent.owner_id
105105
WHERE test.parent.owner_id = 3 and test.parent.id IN (3, 4);
106-
QUERY PLAN
107-
-----------------------------------------------------------------------------------------------------
106+
QUERY PLAN
107+
----------------------------------------------------------------------
108108
Nested Loop Left Join
109+
Join Filter: (child.parent_id = parent.id)
109110
-> Seq Scan on parent
110111
Filter: ((id = ANY ('{3,4}'::integer[])) AND (owner_id = 3))
111-
-> Custom Scan (RuntimeAppend)
112-
Prune by: ((child.owner_id = 3) AND (child.owner_id = parent.owner_id))
113-
-> Seq Scan on child_1 child
114-
Filter: ((owner_id = 3) AND (owner_id = parent.owner_id) AND (parent_id = parent.id))
115-
(7 rows)
112+
-> Seq Scan on child_1 child
113+
Filter: (owner_id = 3)
114+
(6 rows)
116115

117116
SELECT * FROM test.parent
118117
LEFT JOIN test.child ON test.child.parent_id = test.parent.id AND

0 commit comments

Comments
 (0)