From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Subject: | Re: psql tests hangs |
Date: | 2023-05-12 04:02:34 |
Message-ID: | CACLU5mS=UV5N6qCJAZpDxmagkuNZM+WjiQdFztdjU1u8VN346g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 11, 2023 at 8:08 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Kirk Wolak <wolakk(at)gmail(dot)com> writes:
> > Can you change the 0.01 to just 1 or 0?
> > I assume it will work then! (and better than a full removal)?
>
> IMO the point of that test is largely to exercise this locale-dependent
> behavior, so I'm very unwilling to dumb it down to that extent.
>
> Sorry, I meant simply as opposed to deleting the test to get it to pass.
> What seems to be happening is that the spawned psql process is making
> a different choice about what the LC_NUMERIC locale is than its parent
> perl process did. That seems like it might be a bug in itself, since
> POSIX is pretty clear about how you're supposed to derive the locale
> from the relevant environment variables. But maybe it's Perl's bug?
>
> regards, tom lane
>
Did you try the print statement that Andrey asked Pavel to try?
Because it gave 2 different results for Pavel. And Pavel's system has the
problem, but yours does not.
cat test.pl
use locale;
my $result = sprintf('SELECT 1 \watch c=3 i=%g', 0.01);
print ">>$result<<\n";
and when Pavel ran it, he got:
[pavel(at)localhost psql]$ perl test.pl
>>SELECT 1 \watch c=3 i=0,01<<
[pavel(at)localhost psql]$ LANG=C perl test.pl
>>SELECT 1 \watch c=3 i=0.01<<
Now I am curious what you get?
Because yours works. This should identify the difference.
Kirk...
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-05-12 04:14:20 | Re: psql tests hangs |
Previous Message | Amit Kapila | 2023-05-12 03:49:03 | Re: running logical replication as the subscription owner |