From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | davinder singh <davindersingh2692(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PG compilation error with Visual Studio 2015/2017/2019 |
Date: | 2020-04-07 15:00:18 |
Message-ID: | CAC+AXB2uv36fbZC7jeCMuLzxycwM+Pkqgqe34Jq-jHknbuDy+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Apr 7, 2020 at 7:44 AM davinder singh <davindersingh2692(at)gmail(dot)com>
wrote:
>
> You need to enable NLS support in the config file. Let me know if that
> answers your question.
>
Yes, I can see where this is coming from now, thanks.
Currently, it is using _create_locale it behaves similarly to
> GetLocaleInfoEx i.e. it also only checks the format only difference is for
> a bigger set.
> I thought of using GetLocaleInfoEx for the fix because it behaves
> similarly to the already existing and a similar issue was resolved earlier
> using the same. I have attached the patch, let me know your thoughts.
>
You are right, that the way to get the locale name information is through
GetLocaleInfoEx().
A couple of comments on the patch:
* I think you could save a couple of code lines, and make it clearer, by
merging both tests on _MSC_VER into a single #if... #else and leaving as
common code:
+ }
+ else
+ return NULL;
+#endif /*_MSC_VER && _MSC_VER < 1900*/
* The logic on "defined(_MSC_VER) && (_MSC_VER >= 1900)" is defined as
"_WIN32_WINNT >= 0x0600" on other parts of the code. I would
recommend using the later.
* This looks like a spurious change:
- sizeof(iso_lc_messages), NULL);
+ sizeof(iso_lc_messages), NULL);
Regards,
Juan José Santamaría Flecha
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-04-07 15:02:43 | Re: A bug when use get_bit() function for a long bytea string |
Previous Message | Pavel Stehule | 2020-04-07 14:56:45 | Re: proposal \gcsv |