]> granicus.if.org Git - postgresql/commit
Add \gdesc psql command.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Sep 2017 22:17:47 +0000 (18:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Sep 2017 22:17:47 +0000 (18:17 -0400)
commit49ca462eb165dea297f1f110e8eac064308e9d51
tree2e90d6bfe5b3be5d91b9fa8966dcbe274cb6f717
parent6e427aa4e5f3ad79a79b463c470daf93fa15767b
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
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/help.c
src/bin/psql/settings.h
src/bin/psql/tab-complete.c
src/test/regress/expected/psql.out
src/test/regress/sql/psql.sql