Re: psql tests hangs

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Cc: Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-11T12:59:43Z
Lists: pgsql-hackers
Hi


čt 11. 5. 2023 v 11:36 odesílatel Andrey M. Borodin <x4mmm@yandex-team.ru>
napsal:

>
>
> > On 10 May 2023, at 09:58, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> >
> > When I remove this test, then all tests passed
>
> Hi Pavel!
>
> Can you plz share how sprintf('SELECT 1 \watch c=3 i=%g', 0.01) is
> formatting 0.01 on your system?
> And try to run that string against psql.
>
> As an alternative I propose to use "i=0”. I hope 0 is more
> locale-independent (but I’m not sure)… But the test's coverage will
> decrease.
>
> Best regards, Andrey Borodin.
>
>
[pavel@localhost psql]$ cat test.pl
use locale;
my $result = sprintf('SELECT 1 \watch c=3 i=%g', 0.01);
print ">>$result<<\n";

[pavel@localhost psql]$ perl test.pl
>>SELECT 1 \watch c=3 i=0,01<<
[pavel@localhost psql]$ LANG=C perl test.pl
>>SELECT 1 \watch c=3 i=0.01<<

Regards

Pavel

Commits

  1. Tighten usage of PSQL_WATCH_PAGER.

  2. Add tab-completion for newly added SUBSCRIPTION options.

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

  4. Handle empty or all-blank PAGER setting more sanely in psql.