Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf5efaf

Browse files
committed
Standardize pg_authid oid_symbol values.
Commitc9c41c7 used two differentnaming patterns. Standardize on the majority pattern, which was theonly pattern in the last reviewed version of that commit.
1 parent496e58b commitdf5efaf

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

‎src/backend/catalog/aclchk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3931,7 +3931,7 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask,
39313931
* pg_read_all_data role, which allows read access to all relations.
39323932
*/
39333933
if (mask&ACL_SELECT&& !(result&ACL_SELECT)&&
3934-
has_privs_of_role(roleid,ROLE_READ_ALL_DATA))
3934+
has_privs_of_role(roleid,ROLE_PG_READ_ALL_DATA))
39353935
result |=ACL_SELECT;
39363936

39373937
/*
@@ -3943,7 +3943,7 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask,
39433943
*/
39443944
if (mask& (ACL_INSERT |ACL_UPDATE |ACL_DELETE)&&
39453945
!(result& (ACL_INSERT |ACL_UPDATE |ACL_DELETE))&&
3946-
has_privs_of_role(roleid,ROLE_WRITE_ALL_DATA))
3946+
has_privs_of_role(roleid,ROLE_PG_WRITE_ALL_DATA))
39473947
result |= (mask& (ACL_INSERT |ACL_UPDATE |ACL_DELETE));
39483948

39493949
returnresult;
@@ -4279,8 +4279,8 @@ pg_namespace_aclmask(Oid nsp_oid, Oid roleid,
42794279
* access to all schemas.
42804280
*/
42814281
if (mask&ACL_USAGE&& !(result&ACL_USAGE)&&
4282-
(has_privs_of_role(roleid,ROLE_READ_ALL_DATA)||
4283-
has_privs_of_role(roleid,ROLE_WRITE_ALL_DATA)))
4282+
(has_privs_of_role(roleid,ROLE_PG_READ_ALL_DATA)||
4283+
has_privs_of_role(roleid,ROLE_PG_WRITE_ALL_DATA)))
42844284
result |=ACL_USAGE;
42854285
returnresult;
42864286
}

‎src/backend/commands/user.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,10 +1501,10 @@ AddRoleMems(const char *rolename, Oid roleid,
15011501
* situation-dependent member. There's no technical need for this
15021502
* restriction. (One could lift it and take the further step of making
15031503
* pg_database_ownercheck() equivalent to has_privs_of_role(roleid,
1504-
*ROLE_DATABASE_OWNER), in which case explicit,
1505-
*situation-independentmembers could act as the owner of any database.)
1504+
*ROLE_PG_DATABASE_OWNER), in which case explicit, situation-independent
1505+
* members could act as the owner of any database.)
15061506
*/
1507-
if (roleid==ROLE_DATABASE_OWNER)
1507+
if (roleid==ROLE_PG_DATABASE_OWNER)
15081508
ereport(ERROR,
15091509
errmsg("role \"%s\" cannot have explicit members",rolename));
15101510

@@ -1555,7 +1555,7 @@ AddRoleMems(const char *rolename, Oid roleid,
15551555
* shared object. (The effect of such ownership is that any owner of
15561556
* another database can act as the owner of affected shared objects.)
15571557
*/
1558-
if (memberid==ROLE_DATABASE_OWNER)
1558+
if (memberid==ROLE_PG_DATABASE_OWNER)
15591559
ereport(ERROR,
15601560
errmsg("role \"%s\" cannot be a member of any role",
15611561
get_rolespec_name(memberRole)));

‎src/backend/utils/adt/acl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,8 +4741,8 @@ roles_is_member_of(Oid roleid, enum RoleRecurseType type,
47414741

47424742
/*
47434743
* Role expansion happens in a non-database backend when guc.c checks
4744-
*ROLE_READ_ALL_SETTINGS for a physical walsender SHOW command.
4745-
*Inthat case, no role gets pg_database_owner.
4744+
*ROLE_PG_READ_ALL_SETTINGS for a physical walsender SHOW command. In
4745+
* that case, no role gets pg_database_owner.
47464746
*/
47474747
if (!OidIsValid(MyDatabaseId))
47484748
dba=InvalidOid;
@@ -4808,7 +4808,7 @@ roles_is_member_of(Oid roleid, enum RoleRecurseType type,
48084808
/* implement pg_database_owner implicit membership */
48094809
if (memberid==dba&&OidIsValid(dba))
48104810
roles_list=list_append_unique_oid(roles_list,
4811-
ROLE_DATABASE_OWNER);
4811+
ROLE_PG_DATABASE_OWNER);
48124812
}
48134813

48144814
/*

‎src/include/catalog/pg_authid.dat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
rolcreaterole => 't', rolcreatedb => 't', rolcanlogin => 't',
2525
rolreplication => 't', rolbypassrls => 't', rolconnlimit => '-1',
2626
rolpassword => '_null_', rolvaliduntil => '_null_' },
27-
{ oid => '8778', oid_symbol => 'ROLE_DATABASE_OWNER',
27+
{ oid => '8778', oid_symbol => 'ROLE_PG_DATABASE_OWNER',
2828
rolname => 'pg_database_owner', rolsuper => 'f', rolinherit => 't',
2929
rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
3030
rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
3131
rolpassword => '_null_', rolvaliduntil => '_null_' },
32-
{ oid => '9274', oid_symbol => 'ROLE_READ_ALL_DATA',
32+
{ oid => '9274', oid_symbol => 'ROLE_PG_READ_ALL_DATA',
3333
rolname => 'pg_read_all_data', rolsuper => 'f', rolinherit => 't',
3434
rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
3535
rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
3636
rolpassword => '_null_', rolvaliduntil => '_null_' },
37-
{ oid => '9275', oid_symbol => 'ROLE_WRITE_ALL_DATA',
37+
{ oid => '9275', oid_symbol => 'ROLE_PG_WRITE_ALL_DATA',
3838
rolname => 'pg_write_all_data', rolsuper => 'f', rolinherit => 't',
3939
rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
4040
rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp