1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Fix up some loose ends for CURRENT_USER as RoleSpec

In commit 31eae6028e, some documents were not updated to show the new
capability; fix that.  Also, the error message you get when CURRENT_USER
and SESSION_USER are used in a context that doesn't accept them could be
clearer about it being a problem only in those contexts; so add the
word "here".

Author: Kyotaro HORIGUCHI

His patch submission also included changes to GRANT/REVOKE, but those
seemed more controversial, so I left them out.  We can reconsider these
changes later.
This commit is contained in:
Alvaro Herrera
2015-04-30 16:57:05 -03:00
parent 924bcf4f16
commit 9d396af463
7 changed files with 10 additions and 9 deletions

View File

@@ -13216,13 +13216,13 @@ RoleId: RoleSpec
case ROLESPEC_SESSION_USER:
ereport(ERROR,
(errcode(ERRCODE_RESERVED_NAME),
errmsg("%s cannot be used as a role name",
errmsg("%s cannot be used as a role name here",
"SESSION_USER"),
parser_errposition(@1)));
case ROLESPEC_CURRENT_USER:
ereport(ERROR,
(errcode(ERRCODE_RESERVED_NAME),
errmsg("%s cannot be used as a role name",
errmsg("%s cannot be used as a role name here",
"CURRENT_USER"),
parser_errposition(@1)));
}