Skip to content

Commit 6a1ad9a

Browse files
committed
improve support for ONLY in select, insert, delete etc
1 parent ee03666 commit 6a1ad9a

9 files changed

+93
-640
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OBJS = src/init.o src/relation_info.o src/utils.o src/partition_filter.o \
77
src/pl_funcs.o src/pl_range_funcs.o src/pl_hash_funcs.o src/pathman_workers.o \
88
src/hooks.o src/nodes_common.o src/xact_handling.o src/utility_stmt_hooking.o \
99
src/planner_tree_modification.o src/debug_print.o src/partition_creation.o \
10-
src/compat/pg_compat.o src/compat/relation_tags.o src/compat/rowmarks_fix.o \
10+
src/compat/pg_compat.o src/compat/rowmarks_fix.o \
1111
$(WIN32RES)
1212

1313
ifdef USE_PGXS

expected/pathman_only.out

+28-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,34 @@ UNION SELECT * FROM test_only.from_only_test;
137137
EXPLAIN (COSTS OFF)
138138
SELECT * FROM test_only.from_only_test a
139139
JOIN ONLY test_only.from_only_test b USING(val);
140-
ERROR: it is prohibited to apply ONLY modifier to partitioned tables which have already been mentioned without ONLY
140+
QUERY PLAN
141+
---------------------------------------------
142+
Nested Loop
143+
-> Seq Scan on from_only_test b
144+
-> Custom Scan (RuntimeAppend)
145+
Prune by: (b.val = a.val)
146+
-> Seq Scan on from_only_test_1 a
147+
Filter: (b.val = val)
148+
-> Seq Scan on from_only_test_2 a
149+
Filter: (b.val = val)
150+
-> Seq Scan on from_only_test_3 a
151+
Filter: (b.val = val)
152+
-> Seq Scan on from_only_test_4 a
153+
Filter: (b.val = val)
154+
-> Seq Scan on from_only_test_5 a
155+
Filter: (b.val = val)
156+
-> Seq Scan on from_only_test_6 a
157+
Filter: (b.val = val)
158+
-> Seq Scan on from_only_test_7 a
159+
Filter: (b.val = val)
160+
-> Seq Scan on from_only_test_8 a
161+
Filter: (b.val = val)
162+
-> Seq Scan on from_only_test_9 a
163+
Filter: (b.val = val)
164+
-> Seq Scan on from_only_test_10 a
165+
Filter: (b.val = val)
166+
(24 rows)
167+
141168
/* should be OK */
142169
EXPLAIN (COSTS OFF)
143170
WITH q1 AS (SELECT * FROM test_only.from_only_test),

expected/pathman_only_1.out

-247
This file was deleted.

0 commit comments

Comments
 (0)