pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Fetter <david@fetter.org>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH v4] Add \warn to psql
Date: Fri, 05 Jul 2019 12:38:02 -0400
Message-ID: <27942.1562344682@sss.pgh.pa.us> (raw)
In-Reply-To: <11038.1562098250@sss.pgh.pa.us>
References: <20190427171548.GM28936@fetter.org>
	<alpine.DEB.2.21.1904272158120.29865@lancre>
	<20190428145813.GO28936@fetter.org>
	<alpine.DEB.2.21.1904282015420.29865@lancre>
	<20190429041106.GB2954@fetter.org>
	<alpine.DEB.2.21.1904290822470.8815@lancre>
	<20190429141710.GD2954@fetter.org>
	<10811be6-cd8d-eadb-9b70-7a6e72ed4ee5@gmail.com>
	<alpine.DEB.2.21.1904301543350.24513@lancre>
	<CAKNkYnz8_wOhuHFp953LEvpsStB9Scyikz4HosSk3Q0w1Fa9Pw@mail.gmail.com>
	<20190501073857.GY28936@fetter.org>
	<11038.1562098250@sss.pgh.pa.us>

I wrote:
> David Fetter <david@fetter.org> writes:
>> [ v7-0001-Add-warn-to-psql.patch ]

> I took a look at this.  I have no quibble with the proposed feature,
> and the implementation is certainly simple enough.  But I'm unconvinced
> about the proposed test scaffolding.

I pushed this with the simplified test methodology.

While I was fooling with it I noticed that the existing code for -n
is buggy.  The documentation says clearly that only the first
argument is a candidate to be -n:

        If the first argument is an unquoted <literal>-n</literal> the trailing
        newline is not written.

but the actual implementation allows any argument to be recognized as
-n:

regression=# \echo this -n should not be -n like this
this should not be like thisregression=# 

I fixed that, but I'm wondering if we should back-patch that fix
or leave the back branches alone.

			regards, tom lane





view thread (26+ messages)  latest in thread

Message-ID: <27942.1562344682@sss.pgh.pa.us>
Permalink:  ../27942.1562344682@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27942.1562344682@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@fetter.org, a.zakirov@postgrespro.ru, coelho@cri.ensmp.fr, corey.huinker@gmail.com
  Subject: Re: [PATCH v4] Add \warn to psql
  In-Reply-To: <27942.1562344682@sss.pgh.pa.us>

* 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