pgsql: doc: Clarify pg_get_sequence_data() privileges and NULL results

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Clarify pg_get_sequence_data() privileges and NULL results
Date: 2026-06-20 09:23:20
Message-ID: E1warv6-0017V4-1f@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)fujii(at)gmail(dot)com>
Reviewed-by: Tristan Partin <tristan(at)partin(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-06-21 19:08:35 pgsql: plpython: Use funccache.c infrastructure for procedure caching.
Previous Message Michael Paquier 2026-06-20 07:29:45 pgsql: Make type cache initialization more resilient on re-entry after