mirror of https://github.com/citusdata/citus.git
Remove get_relation_trigger_oid_compat
parent
a1e0511583
commit
f7f4a93073
|
@ -162,8 +162,7 @@ GetExplicitTriggerIdList(Oid relationId)
|
||||||
*/
|
*/
|
||||||
if (!triggerForm->tgisinternal)
|
if (!triggerForm->tgisinternal)
|
||||||
{
|
{
|
||||||
Oid triggerId = get_relation_trigger_oid_compat(heapTuple);
|
triggerIdList = lappend_oid(triggerIdList, triggerForm->oid);
|
||||||
triggerIdList = lappend_oid(triggerIdList, triggerId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
heapTuple = systable_getnext(scanDescriptor);
|
heapTuple = systable_getnext(scanDescriptor);
|
||||||
|
@ -176,26 +175,6 @@ GetExplicitTriggerIdList(Oid relationId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* get_relation_trigger_oid_compat returns OID of the trigger represented
|
|
||||||
* by the constraintForm, which is passed as an heapTuple. OID of the
|
|
||||||
* trigger is already stored in the triggerForm struct if major PostgreSQL
|
|
||||||
* version is 12. However, in the older versions, we should utilize
|
|
||||||
* HeapTupleGetOid to deduce that OID with no cost.
|
|
||||||
*/
|
|
||||||
Oid
|
|
||||||
get_relation_trigger_oid_compat(HeapTuple heapTuple)
|
|
||||||
{
|
|
||||||
Assert(HeapTupleIsValid(heapTuple));
|
|
||||||
|
|
||||||
|
|
||||||
Form_pg_trigger triggerForm = (Form_pg_trigger) GETSTRUCT(heapTuple);
|
|
||||||
Oid triggerOid = triggerForm->oid;
|
|
||||||
|
|
||||||
return triggerOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PostprocessCreateTriggerStmt is called after a CREATE TRIGGER command has
|
* PostprocessCreateTriggerStmt is called after a CREATE TRIGGER command has
|
||||||
* been executed by standard process utility. This function errors out for
|
* been executed by standard process utility. This function errors out for
|
||||||
|
|
|
@ -478,7 +478,6 @@ extern void PostprocessVacuumStmt(VacuumStmt *vacuumStmt, const char *vacuumComm
|
||||||
extern List * GetExplicitTriggerCommandList(Oid relationId);
|
extern List * GetExplicitTriggerCommandList(Oid relationId);
|
||||||
extern HeapTuple GetTriggerTupleById(Oid triggerId, bool missingOk);
|
extern HeapTuple GetTriggerTupleById(Oid triggerId, bool missingOk);
|
||||||
extern List * GetExplicitTriggerIdList(Oid relationId);
|
extern List * GetExplicitTriggerIdList(Oid relationId);
|
||||||
extern Oid get_relation_trigger_oid_compat(HeapTuple heapTuple);
|
|
||||||
extern List * PostprocessCreateTriggerStmt(Node *node, const char *queryString);
|
extern List * PostprocessCreateTriggerStmt(Node *node, const char *queryString);
|
||||||
extern ObjectAddress CreateTriggerStmtObjectAddress(Node *node, bool missingOk);
|
extern ObjectAddress CreateTriggerStmtObjectAddress(Node *node, bool missingOk);
|
||||||
extern void CreateTriggerEventExtendNames(CreateTrigStmt *createTriggerStmt,
|
extern void CreateTriggerEventExtendNames(CreateTrigStmt *createTriggerStmt,
|
||||||
|
|
Loading…
Reference in New Issue