Use func to get dep def list

velioglu/wo_seq_test_1
Burak Velioglu 2022-01-19 23:50:27 +03:00
parent 97a1720a17
commit 72caebec3a
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 3 additions and 11 deletions

View File

@ -1026,20 +1026,12 @@ GetRelationSequenceDependencyList(Oid relationId)
{
List *attnumList = NIL;
List *dependentSequenceList = NIL;
List *sequenceDependencyList = NIL;
List *sequenceDependencyDefList = NIL;
GetDependentSequencesWithRelation(relationId, &attnumList, &dependentSequenceList, 0);
sequenceDependencyDefList = CreateObjectAddressDependencyDefList(RelationRelationId, dependentSequenceList);
ListCell *dependentSequenceCell = NULL;
foreach(dependentSequenceCell, dependentSequenceList)
{
Oid sequenceOid = lfirst_oid(dependentSequenceCell);
DependencyDefinition *dependency = CreateObjectAddressDependencyDef(
RelationRelationId, sequenceOid);
sequenceDependencyList = lappend(sequenceDependencyList, dependency);
}
return sequenceDependencyList;
return sequenceDependencyDefList;
}