public inbox for [email protected]help / color / mirror / Atom feed
Re: Windows installation problem at post-install step 3+ messages / 3 participants [nested] [flat]
* Re: Windows installation problem at post-install step @ 2024-07-23 00:28 Thomas Munro <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Thomas Munro @ 2024-07-23 00:28 UTC (permalink / raw) To: Sandeep Thakkar <[email protected]>; +Cc: Ertan Küçükoglu <[email protected]>; Adrian Klaver <[email protected]>; [email protected]; Dave Page <[email protected]> On Mon, Jul 22, 2024 at 11:51 PM Sandeep Thakkar <[email protected]> wrote: > EDB's windows installer gets the locales on the system using the https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/scripts/windows/getlocales/getloca... and then substitute some patterns (https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/pgserver.xml.in#L2850) I'm not sure why we do that but that is the old code and probably @Dave Page may know but I'm not sure if that piece of code is responsible for this change in encoding in this case. Ah, so it's calling EnumSystemLocales(). Interestingly, the documentation for that function says: "Note For interoperability reasons, the application should prefer the EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is migrating toward the use of locale names instead of locale identifiers for new locales. Any application that will be run only on Windows Vista and later should use EnumSystemLocalesEx." That seems to be talking about this exact issue, that we're supposed to be using "locale names". I'm a little confused about the terminology for the various types of names and identifiers but if you follow the link to a example program[1] you can see that it's talking about the BCP47 "en-US" kind, that we want. (That quote makes it sound like a new thing, but Vista came out ~17 years ago.) So one idea would be that in v18, we not only change initdb.exe to pick a BCP47 locale name by default as I proposed in that other thread[2], but also in the v18 version of the EDB installer you consider switching that code over to EnumSystemLocalesEx(). Then we can start to kiss goodbye to the bad old names. People would still propagate them into the future with pg_upgrade I guess, and it'd be up to users to replace them by updating their catalogs manually. Does that make sense? [1] https://learn.microsoft.com/en-us/windows/win32/intl/nls--name-based-apis-sample [2] https://www.postgresql.org/message-id/flat/CA%2BhUKGJ%3DXThErgAQRoqfCy1bKPxXVuF0%3D2zDbB%2BSxDs59pv7... ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Windows installation problem at post-install step @ 2024-07-23 08:28 Dave Page <[email protected]> parent: Thomas Munro <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Dave Page @ 2024-07-23 08:28 UTC (permalink / raw) To: Thomas Munro <[email protected]>; +Cc: Sandeep Thakkar <[email protected]>; Ertan Küçükoglu <[email protected]>; Adrian Klaver <[email protected]>; [email protected] On Tue, Jul 23, 2024 at 1:27 AM Thomas Munro <[email protected]> wrote: > On Mon, Jul 22, 2024 at 11:51 PM Sandeep Thakkar > <[email protected]> wrote: > > EDB's windows installer gets the locales on the system using the > https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/scripts/windows/getlocales/getloca... > and then substitute some patterns ( > https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/pgserver.xml.in#L2850) > I'm not sure why we do that but that is the old code and probably @Dave > Page may know but I'm not sure if that piece of code is responsible for > this change in encoding in this case. > > Ah, so it's calling EnumSystemLocales(). Interestingly, the > documentation for that function says: > > "Note For interoperability reasons, the application should prefer the > EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is > migrating toward the use of locale names instead of locale identifiers > for new locales. Any application that will be run only on Windows > Vista and later should use EnumSystemLocalesEx." > > That seems to be talking about this exact issue, that we're supposed > to be using "locale names". I'm a little confused about the > terminology for the various types of names and identifiers but if you > follow the link to a example program[1] you can see that it's talking > about the BCP47 "en-US" kind, that we want. (That quote makes it > sound like a new thing, but Vista came out ~17 years ago.) > Vista is when they added support for BCP47, but of course, back when that code was written we were primarily supporting older versions of Windows still, back to Windows 2000 iirc. > > So one idea would be that in v18, we not only change initdb.exe to > pick a BCP47 locale name by default as I proposed in that other > thread[2], but also in the v18 version of the EDB installer you > consider switching that code over to EnumSystemLocalesEx(). Then we > can start to kiss goodbye to the bad old names. People would still > propagate them into the future with pg_upgrade I guess, and it'd be up > to users to replace them by updating their catalogs manually. Does > that make sense? > Yes, it does (spitballing: might be nice if we could automatically update the catalogs as well). -- Dave Page VP, Chief Architect, Database Infrastructure EDB: https://www.enterprisedb.com ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Windows installation problem at post-install step @ 2024-07-23 09:53 Sandeep Thakkar <[email protected]> parent: Dave Page <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Sandeep Thakkar @ 2024-07-23 09:53 UTC (permalink / raw) To: Dave Page <[email protected]>; +Cc: Thomas Munro <[email protected]>; Ertan Küçükoglu <[email protected]>; Adrian Klaver <[email protected]>; [email protected] On Tue, Jul 23, 2024 at 1:58 PM Dave Page <[email protected]> wrote: > > > On Tue, Jul 23, 2024 at 1:27 AM Thomas Munro <[email protected]> > wrote: > >> On Mon, Jul 22, 2024 at 11:51 PM Sandeep Thakkar >> <[email protected]> wrote: >> > EDB's windows installer gets the locales on the system using the >> https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/scripts/windows/getlocales/getloca... >> and then substitute some patterns ( >> https://github.com/EnterpriseDB/edb-installers/blob/REL-16/server/pgserver.xml.in#L2850) >> I'm not sure why we do that but that is the old code and probably @Dave >> Page may know but I'm not sure if that piece of code is responsible for >> this change in encoding in this case. >> >> Ah, so it's calling EnumSystemLocales(). Interestingly, the >> documentation for that function says: >> >> "Note For interoperability reasons, the application should prefer the >> EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is >> migrating toward the use of locale names instead of locale identifiers >> for new locales. Any application that will be run only on Windows >> Vista and later should use EnumSystemLocalesEx." >> >> That seems to be talking about this exact issue, that we're supposed >> to be using "locale names". I'm a little confused about the >> terminology for the various types of names and identifiers but if you >> follow the link to a example program[1] you can see that it's talking >> about the BCP47 "en-US" kind, that we want. (That quote makes it >> sound like a new thing, but Vista came out ~17 years ago.) >> > > Vista is when they added support for BCP47, but of course, back when that > code was written we were primarily supporting older versions of Windows > still, back to Windows 2000 iirc. > > yes, that's right. In existing branches, will replacing the EnumSystemLocales() with EnumSystemLocalesEx() plus the source code path being worked upon by Thomas fix the issue? Can give it a try > >> So one idea would be that in v18, we not only change initdb.exe to >> pick a BCP47 locale name by default as I proposed in that other >> thread[2], but also in the v18 version of the EDB installer you >> consider switching that code over to EnumSystemLocalesEx(). Then we >> can start to kiss goodbye to the bad old names. People would still >> propagate them into the future with pg_upgrade I guess, and it'd be up >> to users to replace them by updating their catalogs manually. Does >> that make sense? >> > > Yes, it does (spitballing: might be nice if we could automatically update > the catalogs as well). > > -- > Dave Page > VP, Chief Architect, Database Infrastructure > EDB: https://www.enterprisedb.com > > -- Sandeep Thakkar ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-07-23 09:53 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-07-23 00:28 Re: Windows installation problem at post-install step Thomas Munro <[email protected]> 2024-07-23 08:28 ` Dave Page <[email protected]> 2024-07-23 09:53 ` Sandeep Thakkar <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox