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

Commit8bb3ad4

Browse files
committed
Fix brain fade ine530be2.
The BoolGetDatum() call ended up in the wrong place. It should beapplied when we, err, want to convert a bool to a datum.Thanks to Tom Lane for noticing this.Discussion:http://postgr.es/m/2511599.1658861964@sss.pgh.pa.us
1 parentd8cd0c6 commit8bb3ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/commands/user.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,14 +693,14 @@ AlterRole(ParseState *pstate, AlterRoleStmt *stmt)
693693
*/
694694
if (dissuper)
695695
{
696-
boolshould_be_super=BoolGetDatum(boolVal(dissuper->arg));
696+
boolshould_be_super=boolVal(dissuper->arg);
697697

698698
if (!should_be_super&&roleid==BOOTSTRAP_SUPERUSERID)
699699
ereport(ERROR,
700700
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
701701
errmsg("permission denied: bootstrap user must be superuser")));
702702

703-
new_record[Anum_pg_authid_rolsuper-1]=should_be_super;
703+
new_record[Anum_pg_authid_rolsuper-1]=BoolGetDatum(should_be_super);
704704
new_record_repl[Anum_pg_authid_rolsuper-1]= true;
705705
}
706706

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp