mirror of https://github.com/citusdata/citus.git
Use func to get dep def list
parent
97a1720a17
commit
72caebec3a
|
@ -1026,20 +1026,12 @@ GetRelationSequenceDependencyList(Oid relationId)
|
||||||
{
|
{
|
||||||
List *attnumList = NIL;
|
List *attnumList = NIL;
|
||||||
List *dependentSequenceList = NIL;
|
List *dependentSequenceList = NIL;
|
||||||
List *sequenceDependencyList = NIL;
|
List *sequenceDependencyDefList = NIL;
|
||||||
|
|
||||||
GetDependentSequencesWithRelation(relationId, &attnumList, &dependentSequenceList, 0);
|
GetDependentSequencesWithRelation(relationId, &attnumList, &dependentSequenceList, 0);
|
||||||
|
sequenceDependencyDefList = CreateObjectAddressDependencyDefList(RelationRelationId, dependentSequenceList);
|
||||||
|
|
||||||
ListCell *dependentSequenceCell = NULL;
|
return sequenceDependencyDefList;
|
||||||
foreach(dependentSequenceCell, dependentSequenceList)
|
|
||||||
{
|
|
||||||
Oid sequenceOid = lfirst_oid(dependentSequenceCell);
|
|
||||||
DependencyDefinition *dependency = CreateObjectAddressDependencyDef(
|
|
||||||
RelationRelationId, sequenceOid);
|
|
||||||
sequenceDependencyList = lappend(sequenceDependencyList, dependency);
|
|
||||||
}
|
|
||||||
|
|
||||||
return sequenceDependencyList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue