Hi,
Currently in CreateUserMapping():
/* Additional check to protect reserved role names */ check_rolespec_name(stmt->user,
"Cannotspecify 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,
"Cannotalter reserved role mapping user.");
/* Additional check to protect reserved role names */ check_rolespec_name(stmt->user,
"Cannotremove 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