agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: doc: Clarify pg_get_sequence_data() privileges and NULL results
Date: Sat, 20 Jun 2026 09:23:20 +0000
Message-ID: <E1warv6-0017V4-1f@gemulon.postgresql.org> (raw)

doc: Clarify pg_get_sequence_data() privileges and NULL results

The documentation for pg_get_sequence_data() did not match the
function's behavior. It stated that either USAGE or SELECT privilege
was sufficient, but the function returns sequence data only when the
caller has SELECT privilege.

The documentation also did not explain that the function returns a row
containing all NULL values when sequence data cannot be returned, such
as when the sequence does not exist or the caller lacks the required
privilege.

Update the documentation to reflect the actual behavior, including the
required privilege and the result returned when sequence data is
unavailable.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Tristan Partin <tristan@partin.io>
Discussion: https://postgr.es/m/CAHGQGwGNTaXnBKUV510_P1KwhdbHT+kgZ4zU5njBHy7nCqdhzg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/031904048aa22e7c70dc8e9c170e2743f9b0f090

Modified Files
--------------
doc/src/sgml/func/func-sequence.sgml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)



Message-ID: <E1warv6-0017V4-1f@gemulon.postgresql.org>
Permalink:  ../E1warv6-0017V4-1f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1warv6-0017V4-1f@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: doc: Clarify pg_get_sequence_data() privileges and NULL results
  In-Reply-To: <E1warv6-0017V4-1f@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox