From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | 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: | 2022-11-07 15:08:17 |
Message-ID: | 9f1c24f0-9340-8044-94e7-5f5389a53d08@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04.11.22 23:08, Juan José Santamaría Flecha wrote:
> Ok, I can definitely improve the comments for that function.
>
> Also consider describing in the commit message what you are doing in
> more detail, including some of the things that have been discussed in
> this thread.
>
> Going through the thread for the commit message, I think that maybe the
> collation naming remarks were not properly addressed. In the current
> version the collations retain their native name, but an alias is created
> for those with a shape that we can assume a POSIX equivalent exists.
This looks pretty good to me. The refactoring of the non-Windows parts
makes sense. The Windows parts look reasonable on manual inspection,
but again, I don't have access to Windows here, so someone else should
also look it over.
A small style issue: Change return (TRUE) to return TRUE.
The code
+ if (strlen(localebuf) == 5 && localebuf[2] == '-')
might be too specific. At least on some POSIX systems, I have seen
locales with a three-letter language name. Maybe you should look with
strchr() and not be too strict about the exact position.
For the test patch, why is a separate test for non-UTF8 needed on
Windows. Does the UTF8 one not work?
+ version() !~ 'Visual C\+\+'
This probably won't work for MinGW.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-11-07 15:14:58 | Re: Improve logging when using Huge Pages |
Previous Message | Ronan Dunklau | 2022-11-07 14:53:42 | Re: Add proper planner support for ORDER BY / DISTINCT aggregates |