pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add \warn command to psql.
Date: Fri, 05 Jul 2019 16:32:59 +0000
Message-ID: <E1hjR8t-0008FH-AM@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1hjR8t-0008FH-AM@gemulon.postgresql.org>
Permalink:  ../E1hjR8t-0008FH-AM@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hjR8t-0008FH-AM@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add \warn command to psql.
  In-Reply-To: <E1hjR8t-0008FH-AM@gemulon.postgresql.org>
  References: <E1hjR8t-0008FH-AM@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox