From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix use of cursor sensitivity terminology
Date: Wed, 07 Apr 2021 06:13:42 +0000
Message-ID: <E1lU1Re-0004h6-GW@gemulon.postgresql.org> (raw)
Fix use of cursor sensitivity terminology
Documentation and comments in code and tests have been using the terms
sensitive/insensitive cursor incorrectly relative to the SQL standard.
(Cursor sensitivity is only relevant for changes made in the same
transaction as the cursor, not for concurrent changes in other
sessions.) Moreover, some of the behavior of PostgreSQL is incorrect
according to the SQL standard, confusing the issue further. (WHERE
CURRENT OF changes are not visible in insensitive cursors, but they
should be.)
This change corrects the terminology and removes the claim that
sensitive cursors are supported. It also adds a test case that checks
the insensitive behavior in a "correct" way, using a change command
not using WHERE CURRENT OF. Finally, it adds the ASENSITIVE cursor
option to select the default asensitive behavior, per SQL standard.
There are no changes to cursor behavior in this patch.
Discussion: https://www.postgresql.org/message-id/flat/96ee8b30-9889-9e1b-b053-90e10c050e85%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/dd13ad9d39a1ba41cf329b6fe408b49be57c7b88
Modified Files
--------------
doc/src/sgml/ecpg.sgml | 4 +--
doc/src/sgml/ref/declare.sgml | 49 +++++++++++++++++++++--------------
src/backend/catalog/sql_features.txt | 2 +-
src/backend/parser/analyze.c | 19 +++++++++-----
src/backend/parser/gram.y | 5 +++-
src/bin/psql/tab-complete.c | 2 +-
src/include/nodes/parsenodes.h | 3 ++-
src/include/parser/kwlist.h | 1 +
src/test/regress/expected/portals.out | 37 +++++++++++++++++++++++++-
src/test/regress/sql/portals.sql | 17 +++++++++++-
10 files changed, 105 insertions(+), 34 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Fix use of cursor sensitivity terminology
In-Reply-To: <E1lU1Re-0004h6-GW@gemulon.postgresql.org>
References: <E1lU1Re-0004h6-GW@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