Re: psql \watch 2nd argument: iteration count

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andrey Borodin <amborodin86(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, sfrost(at)snowman(dot)net, peter(dot)eisentraut(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Subject: Re: psql \watch 2nd argument: iteration count
Date: 2023-03-14 00:26:03
Message-ID: ZA+/GxNFpenHq9dS@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 12, 2023 at 08:59:44PM -0700, Andrey Borodin wrote:
> I've tried this approach, but could not come up with sufficiently
> different error messages...
>
>> Wouldn't it be better to have a couple of regression
>> tests, as well?
> Added two tests.

It should have three tests with one for ERANGE on top of the other
two. Passing down a value like "10e400" should be enough to cause
strtod() to fail, as far as I know.

+ if (sleep == 0)
+ continue;

While on it, forgot to comment on this one.. Indeed, this choice to
authorize 0 and not wait between two commands is more natural.

I have tweaked things as bit as of the attached, and ran pgindent.
What do you think?
--
Michael

Attachment Content-Type Size
v7-0001-Fix-incorrect-argument-handling-in-psql-watch.patch text/x-diff 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-03-14 00:26:17 Re: ICU 54 and earlier are too dangerous
Previous Message Peter Smith 2023-03-14 00:06:46 Re: Allow logical replication to copy tables in binary format