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

2023-04-18 Thread Tom Lane
Aleksander Alekseev writes: >> The attached makes check-world pass for me under these conflicting >> environment settings, but it's kind of a scary change. Thoughts? > FWIW my MacOS and Linux laptops have no complaints about the patch. I realized that we don't actually need to "use locale" in U

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

2023-04-10 Thread Aleksander Alekseev
Hi, > The attached makes check-world pass for me under these conflicting > environment settings, but it's kind of a scary change. Thoughts? FWIW my MacOS and Linux laptops have no complaints about the patch. -- Best regards, Aleksander Alekseev

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

2023-04-10 Thread Tom Lane
Aleksander Alekseev writes: >> Hmm, so psql is honoring the LC_NUMERIC setting in that environment, >> but perl isn't. For me, it appears that adding 'use locale;' to >> the test script will fix it ... can you confirm if it's OK for you? > Right, src/bin/psql/t/001_basic.pl has "use locale;" sin

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

2023-04-10 Thread Aleksander Alekseev
Hi Tom, > Aleksander Alekseev writes: > > The test still fails under the following conditions: > > > $ env | grep UTF-8 > > LANG=en_US.UTF-8 > > LC_ALL=en_US.UTF-8 > > LC_NUMERIC=ru_RU.UTF-8 > > Hmm, so psql is honoring the LC_NUMERIC setting in that environment, > but perl isn't. For me, it app

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

2023-04-10 Thread Tom Lane
Aleksander Alekseev writes: > The test still fails under the following conditions: > $ env | grep UTF-8 > LANG=en_US.UTF-8 > LC_ALL=en_US.UTF-8 > LC_NUMERIC=ru_RU.UTF-8 Hmm, so psql is honoring the LC_NUMERIC setting in that environment, but perl isn't. For me, it appears that adding 'use local

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

2023-04-10 Thread Aleksander Alekseev
Hi, > I wonder if we can setup as least some buildfarm members to exercise > TAP tests on non-C locales. > > > > The proposed fix is attached. > > > > LGTM, will push in a bit (unless you want to?) > > Please push. The test still fails under the following conditions: ``` $ env | grep UTF-8 LC_AD

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

2023-04-07 Thread Alexander Korotkov
On Fri, Apr 7, 2023 at 5:00 PM Tom Lane wrote: > Alexander Korotkov writes: > > On Thu, Apr 6, 2023 at 8:18 PM Tom Lane wrote: > >> psql: add an optional execution-count limit to \watch. > > > This commit makes tests fail for me. psql parses 'i' option of > > '\watch' using locale-aware strtod(

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

2023-04-07 Thread Tom Lane
Alexander Korotkov writes: > On Thu, Apr 6, 2023 at 8:18 PM Tom Lane wrote: >> psql: add an optional execution-count limit to \watch. > 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. H

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

2023-04-07 Thread Alexander Korotkov
Hi! On Thu, Apr 6, 2023 at 8:18 PM Tom Lane 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 u

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

2023-04-06 Thread Tom Lane
psql: add an optional execution-count limit to \watch. \watch can now be told to stop after N executions of the query. With the idea that we might want to add more options to \watch in future, this patch generalizes the command's syntax to a list of name=value options, with the interval allowed t