aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/plpgsql.sgml24
-rw-r--r--doc/src/sgml/ref/fetch.sgml2
2 files changed, 5 insertions, 21 deletions
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 5b2aac618e3..d6688e13f48 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3196,6 +3196,10 @@ FETCH <optional> <replaceable>direction</replaceable> { FROM | IN } </optional>
<literal>BACKWARD</literal>.
Omitting <replaceable>direction</replaceable> is the same
as specifying <literal>NEXT</literal>.
+ In the forms using a <replaceable>count</replaceable>,
+ the <replaceable>count</replaceable> can be any integer-valued
+ expression (unlike the SQL <command>FETCH</command> command,
+ which only allows an integer constant).
<replaceable>direction</replaceable> values that require moving
backward are likely to fail unless the cursor was declared or opened
with the <literal>SCROLL</literal> option.
@@ -3234,26 +3238,6 @@ MOVE <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> <
</para>
<para>
- The <replaceable>direction</replaceable> clause can be any of the
- variants allowed in the SQL <xref linkend="sql-fetch"/>
- command, namely
- <literal>NEXT</literal>,
- <literal>PRIOR</literal>,
- <literal>FIRST</literal>,
- <literal>LAST</literal>,
- <literal>ABSOLUTE</literal> <replaceable>count</replaceable>,
- <literal>RELATIVE</literal> <replaceable>count</replaceable>,
- <literal>ALL</literal>,
- <literal>FORWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>, or
- <literal>BACKWARD</literal> <optional> <replaceable>count</replaceable> | <literal>ALL</literal> </optional>.
- Omitting <replaceable>direction</replaceable> is the same
- as specifying <literal>NEXT</literal>.
- <replaceable>direction</replaceable> values that require moving
- backward are likely to fail unless the cursor was declared or opened
- with the <literal>SCROLL</literal> option.
- </para>
-
- <para>
Examples:
<programlisting>
MOVE curs1;
diff --git a/doc/src/sgml/ref/fetch.sgml b/doc/src/sgml/ref/fetch.sgml
index 5ef63f00583..e802be61c8c 100644
--- a/doc/src/sgml/ref/fetch.sgml
+++ b/doc/src/sgml/ref/fetch.sgml
@@ -99,7 +99,7 @@ FETCH [ <replaceable class="parameter">direction</replaceable> [ FROM | IN ] ] <
This page describes usage of cursors at the SQL command level.
If you are trying to use cursors inside a <application>PL/pgSQL</application>
function, the rules are different &mdash;
- see <xref linkend="plpgsql-cursors"/>.
+ see <xref linkend="plpgsql-cursor-using"/>.
</para>
</note>
</refsect1>