pgsql: Add \warn command to psql. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Add \warn command to psql.
Date
Msg-id E1hjR8t-0008FH-AM@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Tomas Vondra
Date:
Subject: pgsql: Fix pg_mcv_list_items() to produce text[]
Next
From: Tomas Vondra
Date:
Subject: pgsql: Remove unused variable in statext_mcv_serialize()