mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Fix ON CONFLICT DO UPDATE for tables with oids.
When taking the UPDATE path in an INSERT .. ON CONFLICT .. UPDATE tables with oids were not supported. The tuple generated by the update target list was projected without space for an oid - a simple oversight. Reported-By: Peter Geoghegan Author: Andres Freund Backpatch: 9.5, where ON CONFLICT was introduced
This commit is contained in:
@ -1678,7 +1678,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
|
||||
|
||||
/* create target slot for UPDATE SET projection */
|
||||
tupDesc = ExecTypeFromTL((List *) node->onConflictSet,
|
||||
false);
|
||||
resultRelInfo->ri_RelationDesc->rd_rel->relhasoids);
|
||||
mtstate->mt_conflproj = ExecInitExtraTupleSlot(mtstate->ps.state);
|
||||
ExecSetSlotDescriptor(mtstate->mt_conflproj, tupDesc);
|
||||
|
||||
|
Reference in New Issue
Block a user