aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-02-06 15:21:20 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-02-06 15:27:01 -0500
commit696af9ab0a92642978169c227e187a65c2f35f17 (patch)
tree92e0c1d1d8bb6143f100f047bd95a3d7adc13c5a
parentab82340a43bebe57a3db0e52bb74120b3bb53ae5 (diff)
downloadpostgresql-696af9ab0a92642978169c227e187a65c2f35f17.tar.gz
postgresql-696af9ab0a92642978169c227e187a65c2f35f17.zip
doc: Document sequence function privileges better
Document the privileges required for each of the sequence functions. This was already in the GRANT reference page, but also add it to the function description for easier reference.
-rw-r--r--doc/src/sgml/func.sgml19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index b214218791e..9e2170ea4bb 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -11723,6 +11723,10 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
</para>
</important>
+ <para>
+ This function requires <literal>USAGE</literal>
+ or <literal>UPDATE</literal> privilege on the sequence.
+ </para>
</listitem>
</varlistentry>
@@ -11738,6 +11742,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
other sessions have executed <function>nextval</function> since the
current session did.
</para>
+
+ <para>
+ This function requires <literal>USAGE</literal>
+ or <literal>SELECT</literal> privilege on the sequence.
+ </para>
</listitem>
</varlistentry>
@@ -11754,6 +11763,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
<function>lastval</function> if <function>nextval</function>
has not yet been called in the current session.
</para>
+
+ <para>
+ This function requires <literal>USAGE</literal>
+ or <literal>SELECT</literal> privilege on the last used sequence.
+ </para>
</listitem>
</varlistentry>
@@ -11792,6 +11806,11 @@ SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> wi
back.
</para>
</important>
+
+ <para>
+ This function requires <literal>UPDATE</literal> privilege on the
+ sequence.
+ </para>
</listitem>
</varlistentry>
</variablelist>