Add \warn command to psql.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 02e95a5049f7933cbde1dacf401604ea3fc02aa5
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2019-07-05T16:32:36Z
Releases: 13.0
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

Files

PathChange+/−
doc/src/sgml/ref/psql-ref.sgml modified +16 −4
src/bin/psql/command.c modified +6 −3
src/bin/psql/help.c modified +4 −3
src/bin/psql/tab-complete.c modified +1 −1
src/test/regress/expected/psql.out modified +19 −0
src/test/regress/sql/psql.sql modified +16 −0

Documentation touched

Discussion