Reserved roles and user mapping

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Reserved roles and user mapping
Дата
Msg-id 570E1C75.8060106@lab.ntt.co.jp
обсуждение исходный текст
Ответы Re: Reserved roles and user mapping  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
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





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: [patch] \crosstabview documentation
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Pglogical questions and problems