From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add \gdesc psql command. |
Date: | 2017-09-05 22:17:55 |
Message-ID: | E1dpMAN-0004oq-O6@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-09-06 01:47:18 | pgsql: doc: Clarify pg_inherits description |
Previous Message | Tom Lane | 2017-09-05 20:41:41 | pgsql: Fix psql's --help=commands output line count. |