agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Forbid FOR PORTION OF with WHERE CURRENT OF
Date: Mon, 29 Jun 2026 13:26:52 +0000
Message-ID: <E1weC0i-000ecO-0g@gemulon.postgresql.org> (raw)

Forbid FOR PORTION OF with WHERE CURRENT OF

It is not clear how the implicit condition of FOR PORTION OF should
interact with the use of a cursor.  Normally, we forbid combining
WHERE CURRENT OF with other WHERE conditions.  The SQL standard only
includes FOR PORTION OF with <update statement: searched> and <delete
statement: searched>, not <update statement: positioned> or <delete
statement: positioned>, so it is easy for us to exclude the
functionality, at least for now.

Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://www.postgresql.org/message-id/flat/CA%2BrenyUEKPexUYsH4qeU8_o1jqKsUkEWca1keS6n21shgG1g%2BA%4...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bc3ae886a759f2d3fd5f1b92f5fbeeccfee9e7a9

Modified Files
--------------
doc/src/sgml/ref/delete.sgml                 |  7 ++---
doc/src/sgml/ref/update.sgml                 |  7 ++---
src/backend/parser/analyze.c                 | 10 +++++++
src/test/regress/expected/for_portion_of.out | 42 ++++++++++++++++++++++++++++
src/test/regress/sql/for_portion_of.sql      | 28 +++++++++++++++++++
5 files changed, 86 insertions(+), 8 deletions(-)



Message-ID: <E1weC0i-000ecO-0g@gemulon.postgresql.org>
Permalink:  ../E1weC0i-000ecO-0g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1weC0i-000ecO-0g@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Forbid FOR PORTION OF with WHERE CURRENT OF
  In-Reply-To: <E1weC0i-000ecO-0g@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox