diff options
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r-- | src/backend/executor/nodeModifyTable.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 15f5dccb82a..189df713eab 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -247,6 +247,12 @@ ExecInsert(TupleTableSlot *slot, else { /* + * Constraints might reference the tableoid column, so initialize + * t_tableOid before evaluating them. + */ + tuple->t_tableOid = RelationGetRelid(resultRelationDesc); + + /* * Check the constraints of the tuple */ if (resultRelationDesc->rd_att->constr) @@ -654,6 +660,12 @@ ExecUpdate(ItemPointer tupleid, LockTupleMode lockmode; /* + * Constraints might reference the tableoid column, so initialize + * t_tableOid before evaluating them. + */ + tuple->t_tableOid = RelationGetRelid(resultRelationDesc); + + /* * Check the constraints of the tuple * * If we generate a new candidate tuple after EvalPlanQual testing, we |