aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/heap.c')
-rw-r--r--src/backend/catalog/heap.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index 3c83fe6bab4..d279842d3ce 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -818,21 +818,15 @@ AddNewAttributeTuples(Oid new_rel_oid,
InsertPgAttributeTuple(rel, attr, (Datum) 0, indstate);
/* Add dependency info */
- myself.classId = RelationRelationId;
- myself.objectId = new_rel_oid;
- myself.objectSubId = i + 1;
- referenced.classId = TypeRelationId;
- referenced.objectId = attr->atttypid;
- referenced.objectSubId = 0;
+ ObjectAddressSubSet(myself, RelationRelationId, new_rel_oid, i + 1);
+ ObjectAddressSet(referenced, TypeRelationId, attr->atttypid);
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
/* The default collation is pinned, so don't bother recording it */
if (OidIsValid(attr->attcollation) &&
attr->attcollation != DEFAULT_COLLATION_OID)
{
- referenced.classId = CollationRelationId;
- referenced.objectId = attr->attcollation;
- referenced.objectSubId = 0;
+ ObjectAddressSet(referenced, CollationRelationId, attr->attcollation);
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
}
}