From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove redundant privilege check from pg_sequences system view.
Date: Mon, 01 Jul 2024 16:49:44 +0000
Message-ID: <E1sOKDo-003oV8-2s@gemulon.postgresql.org> (raw)
Remove redundant privilege check from pg_sequences system view.
This commit adjusts pg_sequence_last_value() to return NULL instead
of ERROR-ing for sequences for which the current user lacks
privileges. This allows us to remove the call to
has_sequence_privilege() in the definition of the pg_sequences
system view.
Bumps catversion.
Suggested-by: Michael Paquier
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/20240501005730.GA594666%40nathanxps13
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7967d10c5b49ccb82f67a0b80678a1a932bccdee
Modified Files
--------------
src/backend/catalog/system_views.sql | 6 +-----
src/backend/commands/sequence.c | 12 ++++--------
src/include/catalog/catversion.h | 2 +-
src/test/regress/expected/rules.out | 5 +----
4 files changed, 7 insertions(+), 18 deletions(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove redundant privilege check from pg_sequences system view.
In-Reply-To: <E1sOKDo-003oV8-2s@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