From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add \gdesc psql command.
Date: Tue, 05 Sep 2017 22:17:55 +0000
Message-ID: <E1dpMAN-0004oq-O6@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Add \gdesc psql command.
This command acts somewhat like \g, but instead of executing the query
buffer, it merely prints a description of the columns that the query
result would have. (Of course, this still requires parsing the query;
if parse analysis fails, you get an error anyway.) We accomplish this
using an unnamed prepared statement, which should be invisible to psql
users.
Pavel Stehule, reviewed by Fabien Coelho
Discussion: https://postgr.es/m/CAFj8pRBhYVvO34FU=EKb=nAF5t3b++krKt1FneCmR0kuF5m-QA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/49ca462eb165dea297f1f110e8eac064308e9d51
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 19 ++++++
src/bin/psql/command.c | 20 ++++++
src/bin/psql/common.c | 131 ++++++++++++++++++++++++++++++++++++-
src/bin/psql/help.c | 3 +-
src/bin/psql/settings.h | 3 +-
src/bin/psql/tab-complete.c | 2 +-
src/test/regress/expected/psql.out | 85 ++++++++++++++++++++++++
src/test/regress/sql/psql.sql | 36 ++++++++++
8 files changed, 293 insertions(+), 6 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Add \gdesc psql command.
In-Reply-To: <E1dpMAN-0004oq-O6@gemulon.postgresql.org>
References: <E1dpMAN-0004oq-O6@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