From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: WIN32 pg_import_system_collations |
Date: | 2023-02-27 22:05:23 |
Message-ID: | CAC+AXB3gf1Uho2S9BZ7vBAaqa5Z-3N34cMc7V60EkcO6-dXcZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 27, 2023 at 1:10 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> On 2023-02-26 Su 16:02, Andrew Dunstan wrote:
>
> Now that I have removed the barrier to testing this in the buildfarm, and
> added an appropriate locale setting to drongo, we can see that this test
> fails like this:
>
>
> diff -w -U3 c:/prog/bf/root/HEAD/pgsql.build/src/test/regress/expected/collate.windows.win1252.out c:/prog/bf/root/HEAD/pgsql.build/src/test/regress/results/collate.windows.win1252.out
> --- c:/prog/bf/root/HEAD/pgsql.build/src/test/regress/expected/collate.windows.win1252.out 2023-01-23 04:39:06.755149600 +0000
> +++ c:/prog/bf/root/HEAD/pgsql.build/src/test/regress/results/collate.windows.win1252.out 2023-02-26 17:32:54.115515200 +0000
> @@ -363,16 +363,17 @@
>
> -- to_char
> SET lc_time TO 'de_DE';
> +ERROR: invalid value for parameter "lc_time": "de_DE"
> SELECT to_char(date '2010-03-01', 'DD TMMON YYYY');
> to_char
> -------------
> - 01 MRZ 2010
> + 01 MAR 2010
> (1 row)
>
> SELECT to_char(date '2010-03-01', 'DD TMMON YYYY' COLLATE "de_DE");
> to_char
> -------------
> - 01 MRZ 2010
> + 01 MAR 2010
> (1 row)
>
> -- to_date
>
>
> The last of these is especially an issue, as it doesn't even throw an
> error.
>
> See
> <https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo&dt=2023-02-26%2016%3A56%3A30>
> <https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo&dt=2023-02-26%2016%3A56%3A30>
>
>
> Further investigation shows that if we change the two instances of "de_DE"
> to "de-DE" the tests behave as expected, so it appears that while POSIX
> style aliases have been created for the BCP 47 style locales, using the
> POSIX aliases doesn't in fact work. I cant see anything that turns the
> POSIX locale name back into BCP 47 at the point of use, which seems to be
> what's needed.
>
The command that's failing is "SET lc_time TO 'de_DE';", and that area of
code is untouched by this patch. As mentioned in [1], the problem seems to
come from a Windows bug that the CI images and my development machines have
patched out.
I think we should change the locale name to make the test more robust, as
the attached. But I don't see a problem with making an alias for the
collations.
Regards,
Juan José Santamaría Flecha
Attachment | Content-Type | Size |
---|---|---|
0001-change-locale-name-for-test-collate.windows.win1252.patch | application/octet-stream | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Juan José Santamaría Flecha | 2023-02-27 22:20:51 | Re: WIN32 pg_import_system_collations |
Previous Message | Andres Freund | 2023-02-27 21:45:30 | Re: refactoring relation extension and BufferAlloc(), faster COPY |