public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: doc: Clarify pg_get_sequence_data() NULL-return cases
2+ messages / 1 participants
[nested] [flat]

* pgsql: doc: Clarify pg_get_sequence_data() NULL-return cases
@ 2026-07-08 09:17 Fujii Masao <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2026-07-08 09:17 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: https://postgr.es/m/CAA4eK1JOo0aJRhFHNWpj3hMwaTtNOopY34f1Lh_QD=z=+DrzWQ@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5412abc22d068ff52e13c60309e9d54eb08e6403

Modified Files
--------------
doc/src/sgml/func/func-sequence.sgml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: doc: Clarify pg_get_sequence_data() NULL-return cases
@ 2026-07-08 09:17 Fujii Masao <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2026-07-08 09:17 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: https://postgr.es/m/CAA4eK1JOo0aJRhFHNWpj3hMwaTtNOopY34f1Lh_QD=z=+DrzWQ@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/67490b55f38d98bd08a6fa2764dd44a2a7c5a2db

Modified Files
--------------
doc/src/sgml/func/func-sequence.sgml | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-08 09:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-08 09:17 pgsql: doc: Clarify pg_get_sequence_data() NULL-return cases Fujii Masao <[email protected]>
2026-07-08 09:17 pgsql: doc: Clarify pg_get_sequence_data() NULL-return cases Fujii Masao <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox