pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor AlterRole()
Date: Fri, 14 Jan 2022 10:01:27 +0000
Message-ID: <E1n8JOh-0000Kt-I0@gemulon.postgresql.org> (raw)

Refactor AlterRole()

Get rid of the three-valued logic for the Boolean variables to track
whether the value was been specified and what the new value should be.
Instead, we can use the "dfoo" variables to determine whether the
value was specified and should be applied.  This was already done in
some cases, so this makes this more uniform and removes one layer of
indirection.

Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/8c1a2e37-c68d-703c-5a83-7a6077f4f997@enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/93415a3b5ac8d8a2951ca0db887d8a173b8630a0

Modified Files
--------------
src/backend/commands/user.c | 97 ++++++++++++++++-----------------------------
1 file changed, 35 insertions(+), 62 deletions(-)



Message-ID: <E1n8JOh-0000Kt-I0@gemulon.postgresql.org>
Permalink:  ../E1n8JOh-0000Kt-I0@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n8JOh-0000Kt-I0@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: peter@eisentraut.org
  Subject: Re: pgsql: Refactor AlterRole()
  In-Reply-To: <E1n8JOh-0000Kt-I0@gemulon.postgresql.org>
  References: <E1n8JOh-0000Kt-I0@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