]> git.ipfire.org Git - thirdparty/postgresql.git/commit
doc: Clarify pg_get_sequence_data() NULL-return cases
authorFujii Masao <fujii@postgresql.org>
Wed, 8 Jul 2026 09:15:33 +0000 (18:15 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 8 Jul 2026 09:16:10 +0000 (18:16 +0900)
commit67490b55f38d98bd08a6fa2764dd44a2a7c5a2db
tree902691a43cbcbcaa2e32ed06e0430864e6ca8fc7
parentb820c623dd5090ef69b8b8151a0b152f5d976fed
doc: Clarify pg_get_sequence_data() NULL-return cases

The documentation previously said that pg_get_sequence_data() returns
a row of NULL values if the sequence does not exist or if the current
user lacks privileges on it. This was incomplete and could be misleading.
A nonexistent relation name is rejected during regclass input conversion,
while the function returns NULLs for a nonexistent relation OID and
several other cases.

This commit clarifies that the function returns NULLs when the specified
relation OID does not exist, the relation is not a sequence, the current
user lacks SELECT privilege on the sequence, the sequence belongs to
another session's temporary schema, or it is an unlogged sequence on
a standby server.

Author: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAA4eK1JOo0aJRhFHNWpj3hMwaTtNOopY34f1Lh_QD=z=+DrzWQ@mail.gmail.com
Backpatch-through: 19
doc/src/sgml/func/func-sequence.sgml