pgsql: Add \warn command to psql.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add \warn command to psql.
Date: 2019-07-05 16:32:59
Message-ID: E1hjR8t-0008FH-AM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add \warn command to psql.

This is like \echo except that the text is sent to stderr not stdout.

In passing, fix a pre-existing bug in \echo and \qecho: per documentation
the -n switch should only be recognized when it is the first argument,
but actually any argument matching "-n" was treated as a switch.
(Should we back-patch that?)

David Fetter (bug fix by me), reviewed by Fabien Coelho

Discussion: https://postgr.es/m/20190421183115.GA4311@fetter.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/02e95a5049f7933cbde1dacf401604ea3fc02aa5

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 20 ++++++++++++++++----
src/bin/psql/command.c | 9 ++++++---
src/bin/psql/help.c | 7 ++++---
src/bin/psql/tab-complete.c | 2 +-
src/test/regress/expected/psql.out | 19 +++++++++++++++++++
src/test/regress/sql/psql.sql | 16 ++++++++++++++++
6 files changed, 62 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2019-07-05 16:52:14 pgsql: Remove unused variable in statext_mcv_serialize()
Previous Message Tomas Vondra 2019-07-05 15:55:28 pgsql: Speed-up build of MCV lists with many distinct values