summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorRobert Haas2017-07-18 01:29:45 +0000
committerRobert Haas2017-07-18 01:29:45 +0000
commitf81a91db4d1c2032632aa5df9fc14be24f5fe5ec (patch)
tree01ec760e37fcdc12db679add15f95e24f0d055dc /src/backend/executor/nodeModifyTable.c
parent533463307bf67e1bb7acc345ba7ea535c6aebb78 (diff)
Use a real RT index when setting up partition tuple routing.
Before, we always used a dummy value of 1, but that's not right when the partitioned table being modified is inside of a WITH clause rather than part of the main query. Amit Langote, reported and reviewd by Etsuro Fujita, with a comment change by me. Discussion: http://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r--src/backend/executor/nodeModifyTable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 8d17425abe..77ba15dd90 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -1914,6 +1914,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
num_partitions;
ExecSetupPartitionTupleRouting(rel,
+ node->nominalRelation,
&partition_dispatch_info,
&partitions,
&partition_tupconv_maps,