From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Reserved roles and user mapping |
Date: | 2016-04-13 10:16:21 |
Message-ID: | 570E1C75.8060106@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Currently in CreateUserMapping():
/* Additional check to protect reserved role names */
check_rolespec_name(stmt->user,
"Cannot specify reserved role as mapping user.");
User mapping terminology is not that clear to me really but how does the
following sound as detail message:
"Cannot create mapping for reserved roles" or "Cannot create reserved role
mapping"
Also then, are checks for reserved role specification in
AlterUserMapping() and RemoveUserMapping() really necessary?
/* Additional check to protect reserved role names */
check_rolespec_name(stmt->user,
"Cannot alter reserved role mapping user.");
/* Additional check to protect reserved role names */
check_rolespec_name(stmt->user,
"Cannot remove reserved role mapping user.");
Messages output in those cases are:
ERROR: role "pg_signal_backend" is reserved
DETAIL: Cannot alter reserved role mapping user.
ERROR: role "pg_signal_backend" is reserved
DETAIL: Cannot remove reserved role mapping user.
Whereas, the following would seem more natural:
ERROR: user mapping "pg_signal_backend" does not exist for the server
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2016-04-13 10:46:21 | Re: Pglogical questions and problems |
Previous Message | Christoph Berg | 2016-04-13 09:25:43 | Re: [patch] \crosstabview documentation |