Re: [PATCH v4] Add \warn to psql

2019-07-08 Thread David G. Johnston
On Mon, Jul 8, 2019 at 8:35 PM Bruce Momjian wrote: > On Mon, Jul 8, 2019 at 11:29:00PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > On Fri, Jul 5, 2019 at 11:29:03PM +0200, David Fetter wrote: > > >>> I fixed that, but I'm wondering if we should back-patch that fix > > >>> or leave

Re: [PATCH v4] Add \warn to psql

2019-07-08 Thread Bruce Momjian
On Mon, Jul 8, 2019 at 11:29:00PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Jul 5, 2019 at 11:29:03PM +0200, David Fetter wrote: > >>> 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. > > >

Re: [PATCH v4] Add \warn to psql

2019-07-08 Thread Tom Lane
Bruce Momjian writes: > On Fri, Jul 5, 2019 at 11:29:03PM +0200, David Fetter wrote: >>> 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. > Uh, if this was done in a major release I am thinking we have to mention

Re: [PATCH v4] Add \warn to psql

2019-07-08 Thread Bruce Momjian
On Fri, Jul 5, 2019 at 11:29:03PM +0200, David Fetter wrote: > > 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

Re: [PATCH v4] Add \warn to psql

2019-07-05 Thread David Fetter
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

Re: [PATCH v4] Add \warn to psql

2019-07-05 Thread Tom Lane
Fabien COELHO writes: > I agree that using TAP test if another simpler option is available is not > a good move. > However, in the current state, as soon as there is some variation a test > is removed and coverage is lost, but they could be kept if the check could > be against a regexp. I'm

Re: [PATCH v4] Add \warn to psql

2019-07-05 Thread Tom Lane
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

Re: [PATCH v4] Add \warn to psql

2019-07-03 Thread Fabien COELHO
Hello Tom, The point is that there would be at least *one* TAP tests so that many other features of psql, although not all, can be tested. [...] Yeah, but the point I was trying to make is that that's mostly down to laziness. Not always. I agree that using TAP test if another simpler

Re: [PATCH v4] Add \warn to psql

2019-07-03 Thread Tom Lane
Fabien COELHO writes: > The point is that there would be at least *one* TAP tests so that many > other features of psql, although not all, can be tested. I have been > reviewing quite a few patches without tests because of this lack of > infrastructure, and no one patch is ever going to

Re: [PATCH v4] Add \warn to psql

2019-07-03 Thread Fabien COELHO
Hello Tom, 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. Spinning up a new PG instance is a *hell* of a lot of overhead to pay for testing something that could

Re: [PATCH v4] Add \warn to psql

2019-07-02 Thread Tom Lane
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. Spinning up a new PG instance is a *hell* of a lot of

Re: [PATCH v4] Add \warn to psql

2019-05-01 Thread Fabien COELHO
I guess that you have a verbose ~/.psqlrc. Can you try with adding -X to psql option when calling psql from the tap test? Ah, true. This patch works for me: diff --git a/src/bin/psql/t/001_psql.pl b/src/bin/psql/t/001_psql.pl index 32dd43279b..637baa94c9 100644 ---

Re: [PATCH v4] Add \warn to psql

2019-05-01 Thread David Fetter
On Wed, May 01, 2019 at 10:05:44AM +0300, Arthur Zakirov wrote: > (Unfortunately I accidentally sent my previous two messages using my personal > email address because of my email client configuration. This address is not > verified by PostgreSQL.org services and messages didn't reach hackers

Re: [PATCH v4] Add \warn to psql

2019-05-01 Thread Arthur Zakirov
(Unfortunately I accidentally sent my previous two messages using my personal email address because of my email client configuration. This address is not verified by PostgreSQL.org services and messages didn't reach hackers mailing lists, so I recent latest message). On Tue, Apr 30, 2019 at 4:46

Re: [PATCH v4] Add \warn to psql

2019-04-30 Thread Fabien COELHO
About v5: applies, compiles, global & local make check ok, doc gen ok. Very minor comment: \qecho is just before \o in the embedded help, where it should be just after. Sorry I did not see it on the preceding submission. Unfortunately new TAP test doesn't pass on my machine. I'm not good

Re: [PATCH v4] Add \warn to psql

2019-04-29 Thread Fabien COELHO
Hello David, About v5: applies, compiles, global & local make check ok, doc gen ok. Very minor comment: \qecho is just before \o in the embedded help, where it should be just after. Sorry I did not see it on the preceding submission. Done. Patch v6 applies, compiles, global & local make

Re: [PATCH v4] Add \warn to psql

2019-04-29 Thread David Fetter
On Mon, Apr 29, 2019 at 08:30:18AM +0200, Fabien COELHO wrote: > > Hello David, > > About v5: applies, compiles, global & local make check ok, doc gen ok. > > Very minor comment: \qecho is just before \o in the embedded help, where it > should be just after. Sorry I did not see it on the

Re: [PATCH v4] Add \warn to psql

2019-04-29 Thread Fabien COELHO
Hello David, About v5: applies, compiles, global & local make check ok, doc gen ok. Very minor comment: \qecho is just before \o in the embedded help, where it should be just after. Sorry I did not see it on the preceding submission. -- Fabien.

Re: [PATCH v4] Add \warn to psql

2019-04-28 Thread David Fetter
On Sun, Apr 28, 2019 at 08:22:09PM +0200, Fabien COELHO wrote: > > Hello David, > > About v4: applies, compiles, global & local "make check" ok. Doc gen ok. > > Code & help look ok. > > About the doc: I do not understand why the small program listing contains an > "\echo :variable". It no

Re: [PATCH v4] Add \warn to psql

2019-04-28 Thread Fabien COELHO
Hello David, About v4: applies, compiles, global & local "make check" ok. Doc gen ok. Code & help look ok. About the doc: I do not understand why the small program listing contains an "\echo :variable". Also, the new entry should probably be between the \w & \watch entries instead of

[PATCH v4] Add \warn to psql

2019-04-28 Thread David Fetter
ttp://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate >From 76ce9a85f92ec4f2283ee967b3067e3f3efda232 Mon Sep 17 00:00:00 2001 From: David Fetter Date: Sun, 21 Apr 2019 11:08:40 -0700 Subject: [PATCH v4] Add \warn to