Commit 696af9ab authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent ab82340a
...@@ -11723,6 +11723,10 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at ...@@ -11723,6 +11723,10 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
</para> </para>
</important> </important>
<para>
This function requires <literal>USAGE</literal>
or <literal>UPDATE</literal> privilege on the sequence.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -11738,6 +11742,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at ...@@ -11738,6 +11742,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
other sessions have executed <function>nextval</function> since the other sessions have executed <function>nextval</function> since the
current session did. current session did.
</para> </para>
<para>
This function requires <literal>USAGE</literal>
or <literal>SELECT</literal> privilege on the sequence.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -11754,6 +11763,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at ...@@ -11754,6 +11763,11 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
<function>lastval</function> if <function>nextval</function> <function>lastval</function> if <function>nextval</function>
has not yet been called in the current session. has not yet been called in the current session.
</para> </para>
<para>
This function requires <literal>USAGE</literal>
or <literal>SELECT</literal> privilege on the last used sequence.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -11792,6 +11806,11 @@ SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> wi ...@@ -11792,6 +11806,11 @@ SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> wi
back. back.
</para> </para>
</important> </important>
<para>
This function requires <literal>UPDATE</literal> privilege on the
sequence.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment