Skip to content

Commit c2a77f5

Browse files
committed
fix bug in handle_modification_query() (erroneous optimization)
1 parent 350edca commit c2a77f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/planner_tree_modification.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ handle_modification_query(Query *parse)
301301
return;
302302

303303
rte = rt_fetch(result_rel, parse->rtable);
304+
305+
/* Exit if it's DELETE FROM ONLY table */
306+
if (!rte->inh) return;
307+
304308
prel = get_pathman_relation_info(rte->relid);
305309

306310
/* Exit if it's not partitioned */

0 commit comments

Comments
 (0)