Re: WIN32 pg_import_system_collations

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: 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 12:09:57
Message-ID: df0f862f-177a-c314-42b8-638c39cabfb1@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2023-02-26 Su 16:02, Andrew Dunstan wrote:
>
>
> On 2023-01-03 Tu 08:48, Peter Eisentraut wrote:
>> On 09.12.22 13:48, Juan José Santamaría Flecha wrote:
>>> On Thu, Dec 1, 2022 at 8:46 AM Peter Eisentraut
>>> <peter(dot)eisentraut(at)enterprisedb(dot)com
>>> <mailto:peter(dot)eisentraut(at)enterprisedb(dot)com>> wrote:
>>>
>>>
>>>     What is the status of this now?  I think the other issue has been
>>>     addressed?
>>>
>>>
>>> Yes, that's addressed for MSVC builds. I think there are a couple of
>>> pending issues for MinGW, but those should have their own threads.
>>>
>>> The patch had rotten, so PFA a rebased version.
>>
>> committed
>>
>>
>
> 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>
>
>
>

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.

cheers

andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noel Grandin 2023-02-27 12:14:10 Re: how does postgresql handle LOB/CLOB/BLOB column data that dies before the query ends
Previous Message Dagfinn Ilmari Mannsåker 2023-02-27 11:17:45 Re: meson vs make: missing/inconsistent ENV