mirror of
https://github.com/postgres/postgres.git
synced 2026-07-15 20:52:53 -04:00
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
This commit is contained in:
parent
d4a657b0a4
commit
031904048a
1 changed files with 3 additions and 2 deletions
|
|
@ -163,12 +163,13 @@ SELECT setval('myseq', 42, false); <lineannotation>Next <function>nextval</fu
|
|||
<structfield>is_called</structfield> indicates whether the sequence has
|
||||
been used. <structfield>page_lsn</structfield> is the LSN corresponding
|
||||
to the most recent WAL record that modified this sequence relation.
|
||||
This function returns a row of NULL values if the sequence does not
|
||||
exist or if the current user lacks privileges on it.
|
||||
</para>
|
||||
<para>
|
||||
This function is primarily intended for internal use by pg_dump and by
|
||||
logical replication to synchronize sequences. It requires
|
||||
<literal>USAGE</literal> or <literal>SELECT</literal> privilege on the
|
||||
sequence.
|
||||
<literal>SELECT</literal> privilege on the sequence.
|
||||
</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in a new issue