On Wed, May 6, 2020 at 11:01 PM Juan José Santamaría Flecha <juanjo.santama...@gmail.com> wrote: > > On Wed, May 6, 2020 at 6:41 AM Amit Kapila <amit.kapil...@gmail.com> wrote: >> >> On Wed, May 6, 2020 at 4:19 AM Juan José Santamaría Flecha >> > >> > I think that the definition of get_iso_localename() should be consistent >> > across all versions, that is HEAD like back-patched. >> > >> >> Fair enough. I have changed such that get_iso_localename is the same >> in HEAD as it is backbranch patches. I have attached backbranch >> patches for the ease of verification. > > > LGTM, and I see no regression in the manual SQL tests, so no further comments > from my part. >
Thanks, Juan and Davinder for verifying the latest patches. I think this patch is ready to commit unless someone else has any comments. I will commit and backpatch this early next week (probably on Monday) unless I see more comments. To summarize, this is a longstanding issue of Windows build (NLS enabled builds) for Visual Studio 2015 and later releases. Visual Studio 2015 and later versions should still be able to do the same as Visual Studio 2012, but the declaration of locale_name is missing in _locale_t, causing the code compilation to fail, hence this patch falls back instead on to enumerating all system locales by using EnumSystemLocalesEx to find the required locale name. If the input argument is in Unix-style then we can get ISO Locale name directly by using GetLocaleInfoEx() with LCType as LOCALE_SNAME. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com