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...@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