diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-12-12 09:01:39 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-12-12 09:01:39 +0900 |
commit | eae7fe485998ac493a3d9dadf254a89c9265891e (patch) | |
tree | 77a031baceb8ad9ffbee7c3bc756b18d45e8fbc4 | |
parent | b8c0ffbd2c8038fbebe76b48616860a7efec66ae (diff) | |
download | postgresql-eae7fe485998ac493a3d9dadf254a89c9265891e.tar.gz postgresql-eae7fe485998ac493a3d9dadf254a89c9265891e.zip |
Remove direct call to GetNewObjectId() for pg_auth_members.oid
This routine should not be called directly as mentioned at its top, so
replace it by GetNewOidWithIndex(). Issue introduced by 6566133 when
pg_auth_members.oid got added, so no backpatch is needed.
Author: Maciek Sakrejda
Discussion: https://postgr.es/m/CAOtHd0Ckbih7Ur7XeVyLAJ26VZOfTNcq9qV403bNF4uTGtAN+Q@mail.gmail.com
-rw-r--r-- | src/backend/commands/user.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 8b6543edee2..0686807fa0a 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -1850,7 +1850,8 @@ AddRoleMems(const char *rolename, Oid roleid, } /* get an OID for the new row and insert it */ - objectId = GetNewObjectId(); + objectId = GetNewOidWithIndex(pg_authmem_rel, AuthMemOidIndexId, + Anum_pg_auth_members_oid); new_record[Anum_pg_auth_members_oid - 1] = objectId; tuple = heap_form_tuple(pg_authmem_dsc, new_record, new_record_nulls); |