diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-01-04 14:36:34 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-01-04 14:36:34 -0500 |
commit | f1b4c771ea74f42447dccaed42ffcdcccf3aa694 (patch) | |
tree | f1e7aa7a4b767602ff57b30dbcb459a7c86d1da5 /src/include/executor/executor.h | |
parent | 3e353a7bc2dd6a9edfffe7e045c810b421f7ecc4 (diff) | |
download | postgresql-f1b4c771ea74f42447dccaed42ffcdcccf3aa694.tar.gz postgresql-f1b4c771ea74f42447dccaed42ffcdcccf3aa694.zip |
Fix reporting of constraint violations for table partitioning.
After a tuple is routed to a partition, it has been converted from the
root table's row type to the partition's row type. ExecConstraints
needs to report the failure using the original tuple and the parent's
tuple descriptor rather than the ones for the selected partition.
Amit Langote
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r-- | src/include/executor/executor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 4a7074edd70..b9c7f729030 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -190,11 +190,13 @@ extern void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, Index resultRelationIndex, bool load_partition_check, + Relation partition_root, int instrument_options); extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid); extern bool ExecContextForcesOids(PlanState *planstate, bool *hasoids); extern void ExecConstraints(ResultRelInfo *resultRelInfo, - TupleTableSlot *slot, EState *estate); + TupleTableSlot *slot, TupleTableSlot *orig_slot, + EState *estate); extern void ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, TupleTableSlot *slot, EState *estate); extern LockTupleMode ExecUpdateLockMode(EState *estate, ResultRelInfo *relinfo); |