pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: createuser: Add support for more clause types through new option
Date: Wed, 13 Jul 2022 03:22:03 +0000
Message-ID: <E1oBSws-002X52-4s@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1oBSws-002X52-4s@gemulon.postgresql.org>
Permalink:  ../E1oBSws-002X52-4s@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oBSws-002X52-4s@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: createuser: Add support for more clause types through new option
  In-Reply-To: <E1oBSws-002X52-4s@gemulon.postgresql.org>
  References: <E1oBSws-002X52-4s@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox