small doc fix - using expressions in plpgsql FETCH command

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: small doc fix - using expressions in plpgsql FETCH command
Date: 2018-07-06 07:58:30
Message-ID: CAFj8pRAcvSXcNdUGx43bOK1e3NNPbQny7neoTLN42af+8MYWEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

https://stackoverflow.com/questions/51129336/pl-pgsql-move-with-variable-value/51169438?noredirect=1#comment89349088_51169438

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yotsunaga, Naoki 2018-07-06 08:05:03 RE: automatic restore point
Previous Message Arseny Sher 2018-07-06 07:55:41 Re: pgsql: Fix "base" snapshot handling in logical decoding