summaryrefslogtreecommitdiffstats
path: root/yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-10-24 14:59:50 +0300
committervvvv <[email protected]>2025-10-24 15:29:24 +0300
commit5b0d18921f2a509d8363c40a5ca208dfed026287 (patch)
treed1369c696d3a9e9a65b68d9208e198269a48cfbc /yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c
parente7fbdb6e81ae4a296e710b133de7a2a04b31bbc4 (diff)
YQL-20567 upgrade PG up to 16.10 & fix instructions
init commit_hash:81aba13295273281d19d2d332a48ff1c44977447
Diffstat (limited to 'yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c')
-rw-r--r--yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c b/yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c
index a42c46a775b..dfa8c18e95a 100644
--- a/yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c
+++ b/yql/essentials/parser/pg_wrapper/postgresql/src/backend/commands/user.c
@@ -818,12 +818,12 @@ AlterRole(ParseState *pstate, AlterRoleStmt *stmt)
"BYPASSRLS", "BYPASSRLS")));
}
- /* To add members to a role, you need ADMIN OPTION. */
+ /* To add or drop members, you need ADMIN OPTION. */
if (drolemembers && !is_admin_of_role(currentUserId, roleid))
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("permission denied to alter role"),
- errdetail("Only roles with the %s option on role \"%s\" may add members.",
+ errdetail("Only roles with the %s option on role \"%s\" may add or drop members.",
"ADMIN", rolename)));
/* Convert validuntil to internal form */
@@ -2554,6 +2554,8 @@ check_createrole_self_grant(char **newval, void **extra, GucSource source)
list_free(elemlist);
result = (unsigned *) guc_malloc(LOG, sizeof(unsigned));
+ if (!result)
+ return false;
*result = options;
*extra = result;