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

Commit0c2d7e3

Browse files
committed
Minor correction: cause ALTER ROLE role ROLE rolenames to behave
sensibly, even though we don't document it.
1 parentaf019fb commit0c2d7e3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎src/backend/commands/user.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.158 2005/07/2616:38:26 tgl Exp $
9+
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.159 2005/07/2622:37:49 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -377,6 +377,10 @@ CreateRole(CreateRoleStmt *stmt)
377377

378378
/*
379379
* ALTER ROLE
380+
*
381+
* Note: the rolemembers option accepted here is intended to support the
382+
* backwards-compatible ALTER GROUP syntax. Although it will work to say
383+
* "ALTER ROLE role ROLE rolenames", we don't document it.
380384
*/
381385
void
382386
AlterRole(AlterRoleStmt*stmt)

‎src/backend/parser/gram.y

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.503 2005/07/2616:38:27 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.504 2005/07/2622:37:50 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -728,6 +728,7 @@ AlterRoleStmt:
728728
{
729729
AlterRoleStmt *n = makeNode(AlterRoleStmt);
730730
n->role =$3;
731+
n->action = +1;/* add, if there are members*/
731732
n->options =$5;
732733
$$ = (Node *)n;
733734
}
@@ -764,6 +765,7 @@ AlterUserStmt:
764765
{
765766
AlterRoleStmt *n = makeNode(AlterRoleStmt);
766767
n->role =$3;
768+
n->action = +1;/* add, if there are members*/
767769
n->options =$5;
768770
$$ = (Node *)n;
769771
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp