Re: WIN32 pg_import_system_collations
От | Peter Eisentraut |
---|---|
Тема | Re: WIN32 pg_import_system_collations |
Дата | |
Msg-id | 9f1c24f0-9340-8044-94e7-5f5389a53d08@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: WIN32 pg_import_system_collations (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>) |
Ответы |
Re: WIN32 pg_import_system_collations
|
Список | 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.
В списке pgsql-hackers по дате отправления: