Re: pgsql: psql: add an optional execution-count limit to \watch.

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Date: 2023-04-07T12:04:00Z
Lists: pgsql-hackers

Attachments

Hi!

On Thu, Apr 6, 2023 at 8:18 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> psql: add an optional execution-count limit to \watch.
>
> \watch can now be told to stop after N executions of the query.

This commit makes tests fail for me.  psql parses 'i' option of
'\watch' using locale-aware strtod(), but 001_basic.pl uses hard-coded
decimal separator.  The proposed fix is attached.

------
Regards,
Alexander Korotkov

Commits

  1. Fix Utils.pm's locale-munging so that Perl itself is also affected.

  2. Fix locale-dependent test case.

  3. psql: add an optional execution-count limit to \watch.