Re: Collation versioning
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Julien Rouhaud <rjuju123@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, Laurenz Albe <laurenz.albe@cybertec.at>, Douglas Doole <dougdoole@gmail.com>, Christoph Berg <myon@debian.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-11-03T00:51:25Z
Lists: pgsql-hackers
Attachments
- fix_locale_versioning_on_windows.patch (text/plain) patch
On Tue, 3 Nov 2020 at 12:29, David Rowley <dgrowleyml@gmail.com> wrote: > Running low on ideas for now, so thought I'd post this in case it > someone thinks of something else. FWIW, the attached does fix the issue for me. It basically just calls the function that converts the windows-type "English_New Zealand.1252" locale name string into, e.g. "en_NZ". Then, since GetNLSVersionEx() wants yet another variant with a - rather than an _, I've just added a couple of lines to swap the _ for a -. There's a bit of extra work there since IsoLocaleName() just did the opposite, so perhaps doing it that way was lazy of me. I'd have invented some other function if I could have thought of a meaningful name for it, then just have the ISO version of it swap - for _. It would be good if this could also be tested on Visual Studio version 12 as I see IsoLocaleName() does something else for anything before 15. I only have 10 and 17 installed and I see we don't support anything before 12 on master per: "Unable to determine Visual Studio version: Visual Studio versions before 12.0 aren't supported. at L:/Projects/Postgres/d/src/tools/msvc/Mkvcbuild.pm line 93." David
Commits
-
Doc: Document known problem with Windows collation versions.
- 1bf946bd43e5 14.0 landed
-
Add collation versions for FreeBSD.
- ca051d8b101d 14.0 landed
-
Tolerate version lookup failure for old style Windows locale names.
- 9f12a3b95dd5 14.0 landed
-
Track collation versions for indexes.
- 257836a75585 14.0 landed
-
Add pg_depend.refobjversion.
- cd6f479e79f3 14.0 landed
-
Remove pg_collation.collversion.
- 7d1297df0830 14.0 landed
-
Fix the MSVC build for versions 2015 and later.
- a169155453e3 13.0 cited
-
Add collation versions for Windows.
- 352f6f2df60f 13.0 cited
-
Implement type regcollation
- a2b1faa0f279 13.0 landed
-
Use libc version as a collation version on glibc systems.
- d5ac14f9ccdd 13.0 landed
- 9f90b1d08d79 13.0 landed
-
Make type "name" collation-aware.
- 586b98fdf1aa 12.0 cited