Re: psql \watch 2nd argument: iteration count - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: psql \watch 2nd argument: iteration count
Date
Msg-id ZA+/GxNFpenHq9dS@paquier.xyz
Whole thread Raw
In response to Re: psql \watch 2nd argument: iteration count  (Andrey Borodin <amborodin86@gmail.com>)
Responses Re: psql \watch 2nd argument: iteration count
List 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

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Allow logical replication to copy tables in binary format
Next
From: Tom Lane
Date:
Subject: Re: ICU 54 and earlier are too dangerous