pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: improve description of plpgsql's FETCH and MOVE commands.
Date: Mon, 22 Jul 2024 23:44:48 +0000
Message-ID: <E1sW2i0-000mBy-Vl@gemulon.postgresql.org> (raw)

Doc: improve description of plpgsql's FETCH and MOVE commands.

We were not being clear about which variants of the "direction"
clause are permitted in MOVE.  Also, the text seemed to be
written with only the FETCH/MOVE NEXT case in mind, so it
didn't apply very well to other variants.

Also, document that "MOVE count IN cursor" only works if count
is a constant.  This is not the whole truth, because some other
cases such as a parenthesized expression will also work, but
we want to push people to use "MOVE FORWARD count" instead.
The constant case is enough to cover what we allow in plain SQL,
and that seems sufficient to claim support for.

Update a comment in pl_gram.y claiming that we don't document
that point.

Per gripe from Philipp Salvisberg.

Discussion: https://postgr.es/m/172155553388.702.7932496598218792085@wrigleys.postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9aa644f92959eca29680595e725a6e71b273f08d

Modified Files
--------------
doc/src/sgml/plpgsql.sgml    | 29 +++++++++++++++++++++++------
src/pl/plpgsql/src/pl_gram.y | 10 +++++-----
2 files changed, 28 insertions(+), 11 deletions(-)



view thread (8+ messages)  latest in thread

Message-ID: <E1sW2i0-000mBy-Vl@gemulon.postgresql.org>
Permalink:  ../E1sW2i0-000mBy-Vl@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sW2i0-000mBy-Vl@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Doc: improve description of plpgsql's FETCH and MOVE commands.
  In-Reply-To: <E1sW2i0-000mBy-Vl@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox