Re: [PATCH v4] Add \warn to psql

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH v4] Add \warn to psql
Date: 2019-07-05 21:29:03
Message-ID: 20190705212903.GF24679@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 05, 2019 at 12:38:02PM -0400, Tom Lane wrote:
> I wrote:
> > David Fetter <david(at)fetter(dot)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.

Thanks!

> 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.

+0.5 for back-patching.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Mercha 2019-07-05 21:37:03 Re: Extending PostgreSQL with a Domain-Specific Language (DSL) - Development
Previous Message PG Doc comments form 2019-07-05 21:20:07 Postgres 11: Table Partitioning and Primary Keys