mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-06 23:07:40 +08:00
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
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user