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 1hjRE9-00083g-Vg for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jul 2019 16:38:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjRE8-0008Bu-Ni for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jul 2019 16:38:24 +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 1hjRE7-0008Ab-K1 for pgsql-hackers@lists.postgresql.org; Fri, 05 Jul 2019 16:38:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjRE5-00070J-EP for pgsql-hackers@postgresql.org; Fri, 05 Jul 2019 16:38:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x65Gc2Rw027943; Fri, 5 Jul 2019 12:38:02 -0400 From: Tom Lane To: David Fetter cc: Arthur Zakirov , Fabien COELHO , Corey Huinker , PostgreSQL Development Subject: Re: [PATCH v4] Add \warn to psql In-reply-to: <11038.1562098250@sss.pgh.pa.us> References: <20190427171548.GM28936@fetter.org> <20190428145813.GO28936@fetter.org> <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> Comments: In-reply-to Tom Lane message dated "Tue, 02 Jul 2019 16:10:50 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27941.1562344682.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 05 Jul 2019 12:38:02 -0400 Message-ID: <27942.1562344682@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. 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 tra= iling newline is not written. but the actual implementation allows any argument to be recognized as -n: regression=3D# \echo this -n should not be -n like this this should not be like thisregression=3D# = I fixed that, but I'm wondering if we should back-patch that fix or leave the back branches alone. regards, tom lane