Re: PG compilation error with Visual Studio 2015/2017/2019

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, davinder singh <davindersingh2692(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG compilation error with Visual Studio 2015/2017/2019
Date: 2020-04-17 18:43:35
Message-ID: CAC+AXB3tdnzvci=piTNqbgXx3m1T42hPQmyU6_+-3W_QLw5VWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 17, 2020 at 10:33 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:

>
> I see some differences in the output when _create_locale() is used vs.
> when GetLocaleInfoEx() is used. Forex.
>

Thanks for the thorough review.

> The function IsoLocaleName() header comment says "Convert a Windows
> setlocale() argument to a Unix-style one", so I was expecting above
> cases which gives valid values with _create_locale() should also work
> with GetLocaleInfoEx(). If it is fine for GetLocaleInfoEx() to return
> an error for the above cases, then we need an explanation of the same
> and probably add a few comments as well. So, I am not sure if we can
> conclude that GetLocaleInfoEx() is an alternative to _create_locale()
> at this stage.
>

We can get a match for those locales in non-ISO format by enumerating
available locales with EnumSystemLocalesEx(), and trying to find a match.

Please find a new patch for so.

Regards,

Juan José Santamaría Flecha

Attachment Content-Type Size
0001-PG-compilation-error-with-VS-2015-2017-2019_v06.patch application/octet-stream 5.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2020-04-17 19:00:15 Re: Build errors in VS
Previous Message Andres Freund 2020-04-17 18:42:29 Re: Should we add xid_current() or a int8->xid cast?