small doc fix - using expressions in plpgsql FETCH command - Mailing list pgsql-hackers

From Pavel Stehule
Subject small doc fix - using expressions in plpgsql FETCH command
Date
Msg-id CAFj8pRAcvSXcNdUGx43bOK1e3NNPbQny7neoTLN42af+8MYWEA@mail.gmail.com
Whole thread Raw
Responses Re: small doc fix - using expressions in plpgsql FETCH command  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi

PLpgSQL FETCH documentation is has ref on SQL FETCH command. SQL FETCH allows only int constants as count. PLpgSQL allows any expressions. In this case documentation is not clear, and people can be messy - and apply SQL FETCH limits on PLpgSQL FETCH.


I propose some small enhancing

diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 5b2aac618e..b65cb11d00 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3250,7 +3250,8 @@ MOVE <optional> <replaceable>direction</replaceable> { FROM | IN } </optional> <
      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.
+     with the <literal>SCROLL</literal> option. The <replaceable>count</replaceable>
+     can be any expressions with integer result or integer constant.
     </para>
 
     <para>

Options, notes?

Regards

Pavel

pgsql-hackers by date:

Previous
From: Arseny Sher
Date:
Subject: Re: pgsql: Fix "base" snapshot handling in logical decoding
Next
From: "Yotsunaga, Naoki"
Date:
Subject: RE: automatic restore point