提交 42534374 编写于 作者: J Jimmy Yih

Fix inconsistent trigger OIDs between master and segments.

Running gpcheckcat after constraints installcheck test shows trigger metadata
inconsistencies between the master and segments. This issue was introduced
in the 8.3 merge. If CreateTrigger Statement has a trigger oid already, we
should reuse it like before the 8.3 merge.
上级 5fadbb87
......@@ -241,7 +241,10 @@ CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid)
*/
tgrel = heap_open(TriggerRelationId, RowExclusiveLock);
trigoid = GetNewOid(tgrel);
if (OidIsValid(stmt->trigOid))
trigoid = stmt->trigOid;
else
trigoid = GetNewOid(tgrel);
/*
* If trigger is for an RI constraint, the passed-in name is the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册