pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add USER SET parameter values for pg_db_role_setting
Date: Fri, 09 Dec 2022 10:22:42 +0000
Message-ID: <E1p3aWf-002ej2-2w@gemulon.postgresql.org> (raw )
Add USER SET parameter values for pg_db_role_setting
The USER SET flag specifies that the variable should be set on behalf of an
ordinary role. That lets ordinary roles set placeholder variables, which
permission requirements are not known yet. Such a value wouldn't be used if
the variable finally appear to require superuser privileges.
The new flags are stored in the pg_db_role_setting.setuser array. Catversion
is bumped.
This commit is inspired by the previous work by Steve Chavez.
Discussion: https://postgr.es/m/CAPpHfdsLd6E--epnGqXENqLP6dLwuNZrPMcNYb3wJ87WR7UBOQ%40mail.gmail.com
Author: Alexander Korotkov, Steve Chavez
Reviewed-by: Pavel Borisov, Steve Chavez
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/096dd80f3ccc103c8e078fca05e6ccfb2071aa91
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 10 ++
doc/src/sgml/ref/alter_database.sgml | 15 +-
doc/src/sgml/ref/alter_role.sgml | 22 ++-
doc/src/sgml/ref/alter_user.sgml | 2 +-
doc/src/sgml/ref/psql-ref.sgml | 7 +
src/backend/catalog/pg_db_role_setting.c | 46 +++++-
src/backend/catalog/pg_proc.c | 1 +
src/backend/commands/functioncmds.c | 4 +-
src/backend/parser/gram.y | 20 +++
src/backend/utils/adt/arrayfuncs.c | 1 +
src/backend/utils/fmgr/fmgr.c | 1 +
src/backend/utils/misc/guc.c | 161 ++++++++++++++++++---
src/backend/utils/misc/guc_funcs.c | 12 +-
src/bin/pg_dump/dumputils.c | 5 +
src/bin/pg_dump/dumputils.h | 1 +
src/bin/pg_dump/pg_dump.c | 27 +++-
src/bin/pg_dump/pg_dumpall.c | 12 +-
src/bin/psql/describe.c | 11 +-
src/bin/psql/tab-complete.c | 4 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_db_role_setting.h | 2 +
src/include/nodes/parsenodes.h | 1 +
src/include/utils/guc.h | 11 +-
src/test/modules/Makefile | 1 +
src/test/modules/meson.build | 1 +
.../modules/test_pg_db_role_setting/.gitignore | 4 +
src/test/modules/test_pg_db_role_setting/Makefile | 29 ++++
.../expected/test_pg_db_role_setting.out | 143 ++++++++++++++++++
.../modules/test_pg_db_role_setting/meson.build | 35 +++++
.../sql/test_pg_db_role_setting.sql | 63 ++++++++
.../test_pg_db_role_setting--1.0.sql | 7 +
.../test_pg_db_role_setting.c | 57 ++++++++
.../test_pg_db_role_setting.control | 7 +
src/test/regress/expected/psql.out | 6 +-
34 files changed, 680 insertions(+), 51 deletions(-)
view thread (3+ messages) latest in thread
Message-ID: <E1p3aWf-002ej2-2w@gemulon.postgresql.org>
Permalink: ../E1p3aWf-002ej2-2w@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1p3aWf-002ej2-2w@gemulon.postgresql.org
copy link · copy postgr.es
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: akorotkov@postgresql.org
Subject: Re: pgsql: Add USER SET parameter values for pg_db_role_setting
In-Reply-To: <E1p3aWf-002ej2-2w@gemulon.postgresql.org>
References: <E1p3aWf-002ej2-2w@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