From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: psql: Rename meta-command \close to \close_prepared
Date: Tue, 24 Jun 2025 04:14:44 +0000
Message-ID: <E1uTv3U-0034dH-1k@gemulon.postgresql.org> (raw)
psql: Rename meta-command \close to \close_prepared
\close has been introduced in d55322b0da60 to be able to close a
prepared statement using the extended protocol in psql. Per discussion,
the name "close" is ambiguous. At the SQL level, CLOSE is used to close
a cursor. At protocol level, the close message can be used to either
close a statement or a portal.
This patch renames \close to \close_prepared to avoid any ambiguity and
make it clear that this is used to close a prepared statement. This new
name has been chosen based on the feedback from the author and the
reviewers.
Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://postgr.es/m/3e694442-0df5-4f92-a08f-c5d4c4346b85@eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fc39b286ad7262a4aac8ff9a34f244763bed7a53
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 8 ++++----
doc/src/sgml/release-18.sgml | 2 +-
src/bin/psql/command.c | 12 ++++++------
src/bin/psql/common.c | 2 +-
src/bin/psql/help.c | 3 ++-
src/bin/psql/tab-complete.in.c | 2 +-
src/test/regress/expected/psql.out | 14 +++++++-------
src/test/regress/expected/psql_pipeline.out | 6 +++---
src/test/regress/sql/psql.sql | 12 ++++++------
src/test/regress/sql/psql_pipeline.sql | 6 +++---
10 files changed, 34 insertions(+), 33 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: psql: Rename meta-command \close to \close_prepared
In-Reply-To: <E1uTv3U-0034dH-1k@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