1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Add missing ALTER USER variants

ALTER USER ... SET did not support all the syntax variants of ALTER ROLE
...  SET.

Reported-by: Pavel Golub <pavel@microolap.com>
This commit is contained in:
Peter Eisentraut
2017-08-03 20:49:07 -04:00
parent 035bb82222
commit b7d1bc820e
3 changed files with 16 additions and 8 deletions

View File

@@ -1049,12 +1049,20 @@ AlterUserStmt:
AlterUserSetStmt:
ALTER USER RoleId SetResetClause
ALTER USER RoleId opt_in_database SetResetClause
{
AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt);
n->role = $3;
n->database = NULL;
n->setstmt = $4;
n->database = $4;
n->setstmt = $5;
$$ = (Node *)n;
}
| ALTER USER ALL opt_in_database SetResetClause
{
AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt);
n->role = NULL;
n->database = $4;
n->setstmt = $5;
$$ = (Node *)n;
}
;