pgsql: createuser: Add support for more clause types through new option

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: createuser: Add support for more clause types through new option
Дата
Msg-id E1oBSws-002X52-4s@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
createuser: Add support for more clause types through new options

The following options are added to createuser:
* --valid-until to generate a VALID UNTIL clause for the role created.
* --bypassrls/--no-bypassrls for BYPASSRLS/NOBYPASSRLS.
* -m/--member to make the new role a member of an existing role, with an
extra ROLE clause generated.  The clause generated overlaps with
-g/--role, but per discussion this was the most popular choice as option
name.
* -a/--admin for the addition of an ADMIN clause.

These option names are chosen to be completely new, so as they do not
impact anybody relying on the existing option set.  Tests are added for
the new options and extended a bit, while on it, to cover more patterns
where quotes are added to various elements of the query generated.

Author: Shinya Kato
Reviewed-by: Nathan Bossart, Daniel Gustafsson, Robert Haas, Kyotaro
Horiguchi, David G. Johnston, Przemysław Sztoch
Discussion: https://postgr.es/m/69a9851035cf0f0477bcc5d742b031a3@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/08951a7c93cf0dd791ee6ac8a8cf5e4b152528e5

Modified Files
--------------
doc/src/sgml/ref/createuser.sgml    | 56 +++++++++++++++++++++++++++++
src/bin/scripts/createuser.c        | 72 +++++++++++++++++++++++++++++++++++--
src/bin/scripts/t/040_createuser.pl | 32 +++++++++++++++--
3 files changed, 156 insertions(+), 4 deletions(-)


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

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Use list_copy_head() instead of list_truncate(list_copy(...), ..
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Small cleanup of create_list_bounds()