summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-02-06 15:17:27 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-02-06 15:27:01 -0500
commitab82340a43bebe57a3db0e52bb74120b3bb53ae5 (patch)
tree66a8ace42acbc116e9d9e6fbe27f03cf31dc3b78 /doc/src
parentad6af3fc4256c0e1eecf5d93d510da4b44e0d480 (diff)
Avoid permission failure in pg_sequences.last_value
Before, reading pg_sequences.last_value would fail unless the user had appropriate sequence permissions, which would make the pg_sequences view cumbersome to use. Instead, return null instead of the real value when there are no permissions. From: Michael Paquier <michael.paquier@gmail.com> Reported-by: Shinoda, Noriyoshi <noriyoshi.shinoda@hpe.com>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 204b8cfd55e..787cc10bf85 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -9882,7 +9882,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
<entry></entry>
<entry>The last sequence value written to disk. If caching is used,
this value can be greater than the last value handed out from the
- sequence. Null if the sequence has not been read from yet.</entry>
+ sequence. Null if the sequence has not been read from yet. Also, if
+ the current user does not have <literal>USAGE</literal>
+ or <literal>SELECT</literal> privilege on the sequence, the value is
+ null.</entry>
</row>
</tbody>
</tgroup>