修复更新触发器中对于ustore元组的兼容
This commit is contained in:
@ -2887,6 +2887,14 @@ void ExecARUpdateTriggers(EState* estate, ResultRelInfo* relinfo, Oid oldPartiti
|
|||||||
#ifdef PGXC
|
#ifdef PGXC
|
||||||
}
|
}
|
||||||
#endif
|
#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,
|
AfterTriggerSaveEvent(estate,
|
||||||
relinfo,
|
relinfo,
|
||||||
TRIGGER_EVENT_UPDATE,
|
TRIGGER_EVENT_UPDATE,
|
||||||
|
Reference in New Issue
Block a user