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

Поиск
Список
Период
Сортировка
От Juan José Santamaría Flecha
Тема Re: PG compilation error with Visual Studio 2015/2017/2019
Дата
Msg-id CAC+AXB2uv36fbZC7jeCMuLzxycwM+Pkqgqe34Jq-jHknbuDy+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG compilation error with Visual Studio 2015/2017/2019  (davinder singh <davindersingh2692@gmail.com>)
Ответы Re: PG compilation error with Visual Studio 2015/2017/2019
Re: PG compilation error with Visual Studio 2015/2017/2019
Список pgsql-hackers

On Tue, Apr 7, 2020 at 7:44 AM davinder singh <davindersingh2692@gmail.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal \gcsv
Следующее
От: Tom Lane
Дата:
Сообщение: Re: A bug when use get_bit() function for a long bytea string