pgsql: Add \gdesc psql command.

Started by Tom Lanealmost 9 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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: /messages/by-id/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