Forbid FOR PORTION OF with WHERE CURRENT OF
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-06-29T13:17:10Z
Releases:
19 (unreleased)
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%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/delete.sgml | modified | +3 −4 |
| doc/src/sgml/ref/update.sgml | modified | +3 −4 |
| src/backend/parser/analyze.c | modified | +10 −0 |
| src/test/regress/expected/for_portion_of.out | modified | +42 −0 |
| src/test/regress/sql/for_portion_of.sql | modified | +28 −0 |
Discussion
- FOR PORTION OF should not allow WHERE CURRENT OF 2 messages · 2026-06-17 → 2026-06-29