修复更新触发器中对于ustore元组的兼容

This commit is contained in:
zhaosen
2024-05-07 16:32:04 +08:00
committed by yaoxin
parent d48d31d5da
commit 01f0f53123

View File

@ -2887,6 +2887,14 @@ void ExecARUpdateTriggers(EState* estate, ResultRelInfo* relinfo, Oid oldPartiti
#ifdef PGXC
}
#endif
/* If we get there, trigtuple must be astore type, but newtuple could be ustore type.
To avoid potential errors in subsequent column value resolution,
we convert newtuple to astore type.*/
if (newtuple->tupTableType == UHEAP_TUPLE) {
Relation rel = relinfo->ri_RelationDesc;
TupleDesc tupdesc = RelationGetDescr(rel);
newtuple = (HeapTuple)UHeapToHeap(tupdesc, (UHeapTuple)newtuple);
}
AfterTriggerSaveEvent(estate,
relinfo,
TRIGGER_EVENT_UPDATE,