Add \warn command to psql.
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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
- [PATCH v1] Add \echo_stderr to psql 32 messages · 2019-04-21 → 2019-07-09