Skip to content

Commit 991dee2

Browse files
committed
Rename pg_shdepend.c's typedef "objectType" to SharedDependencyObjectType.
The name objectType is widely used as a field name, and it's pure luck that this conflict has not caused pgindent to go crazy before. It messed up pg_audit.c pretty good though. Since pg_shdepend.c doesn't export this typedef and only uses it in three places, changing that seems saner than changing the field usages. Back-patch because we're contemplating using the union of all branch typedefs for future pgindent runs, so this won't fix anything if it stays the same in back branches.
1 parent 4dddf85 commit 991dee2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/catalog/pg_shdepend.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef enum
5858
LOCAL_OBJECT,
5959
SHARED_OBJECT,
6060
REMOTE_OBJECT
61-
} objectType;
61+
} SharedDependencyObjectType;
6262

6363
static void getOidListDiff(Oid *list1, int *nlist1, Oid *list2, int *nlist2);
6464
static Oid classIdGetDbId(Oid classId);
@@ -75,7 +75,8 @@ static void shdepDropDependency(Relation sdepRel,
7575
bool drop_subobjects,
7676
Oid refclassId, Oid refobjId,
7777
SharedDependencyType deptype);
78-
static void storeObjectDescription(StringInfo descs, objectType type,
78+
static void storeObjectDescription(StringInfo descs,
79+
SharedDependencyObjectType type,
7980
ObjectAddress *object,
8081
SharedDependencyType deptype,
8182
int count);
@@ -1053,7 +1054,8 @@ shdepLockAndCheckObject(Oid classId, Oid objectId)
10531054
* and count to be nonzero; deptype is not used in this case.
10541055
*/
10551056
static void
1056-
storeObjectDescription(StringInfo descs, objectType type,
1057+
storeObjectDescription(StringInfo descs,
1058+
SharedDependencyObjectType type,
10571059
ObjectAddress *object,
10581060
SharedDependencyType deptype,
10591061
int count)

0 commit comments

Comments
 (0)