Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjVmb-0002i3-4Q for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jul 2019 21:30:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjVla-0006QD-Ba for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jul 2019 21:29:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjVlZ-0006Q5-Vo for pgsql-hackers@lists.postgresql.org; Fri, 05 Jul 2019 21:29:14 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjVlT-0001NF-1z for pgsql-hackers@postgresql.org; Fri, 05 Jul 2019 21:29:12 +0000 Received: by fetter.org (Postfix, from userid 1001) id 1F33F40965; Fri, 5 Jul 2019 23:29:04 +0200 (CEST) Date: Fri, 5 Jul 2019 23:29:03 +0200 From: David Fetter To: Tom Lane Cc: Arthur Zakirov , Fabien COELHO , Corey Huinker , PostgreSQL Development Subject: Re: [PATCH v4] Add \warn to psql Message-ID: <20190705212903.GF24679@fetter.org> References: <20190429041106.GB2954@fetter.org> <20190429141710.GD2954@fetter.org> <10811be6-cd8d-eadb-9b70-7a6e72ed4ee5@gmail.com> <20190501073857.GY28936@fetter.org> <11038.1562098250@sss.pgh.pa.us> <27942.1562344682@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27942.1562344682@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jul 05, 2019 at 12:38:02PM -0400, Tom Lane wrote: > I wrote: > > David Fetter 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 -n 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 http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate