Re: Windows default locale vs initdb

2024-08-08 Thread Andrew Dunstan
On 2024-08-08 Th 4:08 AM, Ertan Küçükoglu wrote: I already installed Visual Studio 2022 with C++ support as suggested in https://www.postgresql.org/docs/current/install-windows-full.html I cloned codes in the system. But, I cannot find any "src/tools/msvc" directory. It is m

Re: Windows default locale vs initdb

2024-08-08 Thread Ertan Küçükoglu
> > I already installed Visual Studio 2022 with C++ support as suggested in > https://www.postgresql.org/docs/current/install-windows-full.html > I cloned codes in the system. > But, I cannot find any "src/tools/msvc" directory. It is missing. > Document states I need everything in there > "The too

Re: Windows default locale vs initdb

2024-08-06 Thread Thomas Munro
On Tue, Jul 23, 2024 at 11:19 AM Thomas Munro wrote: > On Tue, Jul 23, 2024 at 1:44 AM Andrew Dunstan wrote: > > I have an environment I can use for testing. But what exactly am I > > testing? :-) Install a few "problem" language/region settings, switch > > the system and ensure initdb runs ok?

Re: Windows default locale vs initdb

2024-07-22 Thread Thomas Munro
On Tue, Jul 23, 2024 at 1:44 AM Andrew Dunstan wrote: > I have an environment I can use for testing. But what exactly am I > testing? :-) Install a few "problem" language/region settings, switch > the system and ensure initdb runs ok? I just want to know about any weird unexpected consequences of

Re: Windows default locale vs initdb

2024-07-22 Thread Ertan Küçükoglu
Andrew Dunstan , 22 Tem 2024 Pzt, 16:44 tarihinde şunu yazdı: > I have an environment I can use for testing. But what exactly am I > testing? :-) Install a few "problem" language/region settings, switch > the system and ensure initdb runs ok? > > Other than Turkish, which locales should I install?

Re: Windows default locale vs initdb

2024-07-22 Thread Andrew Dunstan
On 2024-07-21 Su 10:51 PM, Thomas Munro wrote: Ertan Küçükoglu offered to try to review and test this, so here's a rebase. Some notes: * it turned out that the Turkish i/I test problem I mentioned earlier in this thread[1] was just always broken on Windows, we just didn't ever test with UTF-8

Re: Windows default locale vs initdb

2024-07-22 Thread Ertan Küçükoglu
Thomas Munro , 22 Tem 2024 Pzt, 14:00 tarihinde şunu yazdı: > Sorry, I didn't mean to put you on the spot :-) Yeah you'd need to > install a compiler, various libraries and tools to be able to build > form source with a patch. Unfortunately I'm not the best person to > explain how to do that on

Re: Windows default locale vs initdb

2024-07-22 Thread Thomas Munro
On Mon, Jul 22, 2024 at 8:04 PM Ertan Küçükoglu wrote: > I am a complete noob about PostgreSQL development. > I don't know about the PostgreSQL CI system. > I will be needing some help as to how to do the tests. > I have access to different Windows OSes (v10, Server 2022 mainly). > These systems c

Re: Windows default locale vs initdb

2024-07-22 Thread Thomas Munro
On Mon, Jul 22, 2024 at 8:38 PM Zaid Shabbir wrote: > Can you please list down some of the use cases for the patch ? Other than > Turkish, does this patch have an impact on other locales too ? Hi Zaid, Yes, initdb.exe would use BCP47 codes by default for all languages. Who knows which country w

Re: Windows default locale vs initdb

2024-07-22 Thread Zaid Shabbir
Hello Thomas, Can you please list down some of the use cases for the patch ? Other than Turkish, does this patch have an impact on other locales too ? Regards, Zaid On Mon, Jul 22, 2024 at 7:52 AM Thomas Munro wrote: > Ertan Küçükoglu offered to try to review and test this, so here's a rebas

Re: Windows default locale vs initdb

2024-07-22 Thread Ertan Küçükoglu
Hi, I am a complete noob about PostgreSQL development. I don't know about the PostgreSQL CI system. I will be needing some help as to how to do the tests. I have access to different Windows OSes (v10, Server 2022 mainly). These systems can be set to English or Turkish locales if needed. I can also

Re: Windows default locale vs initdb

2024-07-21 Thread Thomas Munro
Ertan Küçükoglu offered to try to review and test this, so here's a rebase. Some notes: * it turned out that the Turkish i/I test problem I mentioned earlier in this thread[1] was just always broken on Windows, we just didn't ever test with UTF-8 before Meson took over; it's skipped now, see comm

Re: Windows default locale vs initdb

2023-12-13 Thread Thomas Munro
Here is a thought that occurs to me, as I follow along with Jeff Davis's evolving proposals for built-in collations and ctypes: What would stop us from dropping support for the libc (sic) provider on Windows? That may sound radical and likely to cause extra work for people on upgrade, but how doe

Re: Windows default locale vs initdb

2023-11-19 Thread Thomas Munro
I clicked "Trigger" to get a Mingw test run of this, and it failed[1]. I see why: our function win32_langinfo() believes that it shouldn't call GetLocaleInfoEx() on non-MSVC compilers, so we see 'initdb: error: could not find suitable encoding for locale "en-US"'. I think it has fallback code that

Re: Windows default locale vs initdb

2023-11-19 Thread Thomas Munro
Another country has changed its name, and a Windows OS update has again broken every PostgreSQL cluster in that whole country[1] (or at least those that had accepted initdb's default choice of locale, probably most). Let's get to the bottom of this, because otherwise it is simply going to keep hap

Re: Windows default locale vs initdb

2022-12-22 Thread Thomas Munro
On Fri, Jul 29, 2022 at 3:33 PM Thomas Munro wrote: > On Fri, Jul 22, 2022 at 11:59 PM Juan José Santamaría Flecha > wrote: > > TL;DR; What I want to show through this example is that Windows ACP is not > > modified by setlocale(), it can only be done through the Windows registry > > and only i

Re: Windows default locale vs initdb

2022-07-28 Thread Thomas Munro
On Fri, Jul 22, 2022 at 11:59 PM Juan José Santamaría Flecha wrote: > TL;DR; What I want to show through this example is that Windows ACP is not > modified by setlocale(), it can only be done through the Windows registry and > only in recent releases. Thanks, that was helpful, and so was that S

Re: Windows default locale vs initdb

2022-07-22 Thread Juan José Santamaría Flecha
On Wed, Jul 20, 2022 at 1:44 PM Thomas Munro wrote: > On Wed, Jul 20, 2022 at 10:27 PM Juan José Santamaría Flecha > wrote: > > Still, WIN1252 is not the wrong answer for what we are asking. Even if > you enable UTF-8 support [1], the system will use the current default > Windows ANSI code page

Re: Windows default locale vs initdb

2022-07-20 Thread Thomas Munro
On Wed, Jul 20, 2022 at 10:27 PM Juan José Santamaría Flecha wrote: > On Tue, Jul 19, 2022 at 4:47 AM Thomas Munro wrote: >> As for whether "accordingly" still applies, by the logic of of >> win32_langinfo()... Windows still considers WIN1252 to be the default >> ANSI code page for "en-US", thou

Re: Windows default locale vs initdb

2022-07-20 Thread Juan José Santamaría Flecha
On Tue, Jul 19, 2022 at 4:47 AM Thomas Munro wrote: > As for whether "accordingly" still applies, by the logic of of > win32_langinfo()... Windows still considers WIN1252 to be the default > ANSI code page for "en-US", though it'd work with UTF-8 too. I'm not > sure what to make of that. The g

Re: Windows default locale vs initdb

2022-07-20 Thread Juan José Santamaría Flecha
On Tue, Jul 19, 2022 at 12:59 AM Thomas Munro wrote: > Now that museum-grade Windows has been defenestrated, we are free to > call GetUserDefaultLocaleName(). Here's a patch. > This LGTM. > > I think we should also convert to POSIX format when making the > collname in your pg_import_system_col

Re: Windows default locale vs initdb

2022-07-18 Thread Thomas Munro
On Tue, Jul 19, 2022 at 10:58 AM Thomas Munro wrote: > Here's a patch. I added this to the next commitfest, and cfbot promptly told me about some warnings I needed to fix. That'll teach me to post a patch tested with "ci-os-only: windows". Looking more closely at some error messages that report

Re: Windows default locale vs initdb

2022-07-18 Thread Thomas Munro
On Wed, Dec 15, 2021 at 11:32 PM Juan José Santamaría Flecha wrote: > On Sun, May 16, 2021 at 6:29 AM Noah Misch wrote: >> On Mon, Apr 19, 2021 at 05:42:51PM +1200, Thomas Munro wrote: >> > The question we asked ourselves >> > multiple times in the other thread was how we're supposed to get to >>

Re: Windows default locale vs initdb

2021-12-15 Thread Juan José Santamaría Flecha
On Sun, May 16, 2021 at 6:29 AM Noah Misch wrote: > On Mon, Apr 19, 2021 at 05:42:51PM +1200, Thomas Munro wrote: > > > The question we asked ourselves > > multiple times in the other thread was how we're supposed to get to > > the modern BCP 47 form when creating the template databases. It look

Re: Windows default locale vs initdb

2021-05-15 Thread Noah Misch
On Mon, Apr 19, 2021 at 05:42:51PM +1200, Thomas Munro wrote: > Currently initdb sets up template databases with old-style Windows > locale names reported by the OS, and they seem to have caused us quite > a few problems over the years: > > db29620d "Work around Windows locale name with non-ASCII

Re: Windows default locale vs initdb

2021-04-19 Thread Peter Eisentraut
On 19.04.21 07:42, Thomas Munro wrote: It looks like one possibility, since Vista, is to call GetUserDefaultLocaleName()[2], which doesn't appear to have been discussed before on this list. That doesn't allow you to ask for the default for each individual category, but I don't know if that is ev

Re: Windows default locale vs initdb

2021-04-19 Thread Andrew Dunstan
On 4/19/21 10:26 AM, Dave Page wrote: > > > On Mon, Apr 19, 2021 at 11:52 AM Andrew Dunstan > wrote: > > > My understanding from Microsoft staff at conferences is that > Azure's PostgreSQL SAS runs on  linux, not WIndows. > > > This is from a regular Azure Dat

Re: Windows default locale vs initdb

2021-04-19 Thread Dave Page
On Mon, Apr 19, 2021 at 11:52 AM Andrew Dunstan wrote: > > My understanding from Microsoft staff at conferences is that Azure's > PostgreSQL SAS runs on linux, not WIndows. > This is from a regular Azure Database for PostgreSQL single server: postgres=> select version();

Re: Windows default locale vs initdb

2021-04-19 Thread Pavel Stehule
po 19. 4. 2021 v 12:52 odesílatel Andrew Dunstan napsal: > > > On Mon, Apr 19, 2021 at 4:53 AM Pavel Stehule > wrote: > >> >> >> po 19. 4. 2021 v 7:43 odesílatel Thomas Munro >> napsal: >> >>> Hi, >>> >>> Moving this topic into its own thread from the one about collation >>> versions, because i

Re: Windows default locale vs initdb

2021-04-19 Thread Andrew Dunstan
On Mon, Apr 19, 2021 at 4:53 AM Pavel Stehule wrote: > > > po 19. 4. 2021 v 7:43 odesílatel Thomas Munro > napsal: > >> Hi, >> >> Moving this topic into its own thread from the one about collation >> versions, because it concerns pre-existing problems, and that thread >> is long. >> >> Currently

Re: Windows default locale vs initdb

2021-04-19 Thread Pavel Stehule
po 19. 4. 2021 v 7:43 odesílatel Thomas Munro napsal: > Hi, > > Moving this topic into its own thread from the one about collation > versions, because it concerns pre-existing problems, and that thread > is long. > > Currently initdb sets up template databases with old-style Windows > locale name

Windows default locale vs initdb

2021-04-18 Thread Thomas Munro
Hi, Moving this topic into its own thread from the one about collation versions, because it concerns pre-existing problems, and that thread is long. Currently initdb sets up template databases with old-style Windows locale names reported by the OS, and they seem to have caused us quite a few prob