Re: Collation versions on Windows (help wanted, apply within)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Collation versions on Windows (help wanted, apply within)
Date: 2019-11-11 02:32:44
Message-ID: CA+hUKGL5-=cvST28MRxaY5=33X1OWLYyYzisXtT9gTRsmVHWEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 9, 2019 at 10:20 AM Juan José Santamaría Flecha
<juanjo(dot)santamaria(at)gmail(dot)com> wrote:
>> Do any Windows hackers want to help get it into shape? Some things to
>> do: test it, verify that the _WIN32_WINNT >= 0x0600 stuff makes sense
>> (why do we target such ancient Windows releases anyway?)
>
> You have to keep in mind that _WIN32_WINNT also applies to MinGW, so any build with those tools will use a value of 0x0501 and this code will be ifdef'd out.
>
> As from where this value comes, my take is that it has not been revised in a long time [1]. Windows 7 , Server 2008 and 2008 R2 support will end next year [2] [3], maybe you can make a case for updating this value.

Ah, I see, thanks. I think what I have is OK for now then. If
someone else who is closer to the matter wants to argue that we should
always target Vista+ (for example on MinGW) in order to access this
functionality, I'll let them do that separately.

>> see if there is way we could use GetNLSVersion() (no "Ex") to make this work on
>> older Windows system
>
> Older systems is just Windows Server 2003, not sure if it is worth any effort.

Cool. Nothing to do here then.

> 16387 | en_us | 2200 | 10 | c | t | 24 | en-US | en-US | 6020f,6020f

Thanks for testing!

On Sat, Nov 9, 2019 at 11:04 PM Juan José Santamaría Flecha
<juanjo(dot)santamaria(at)gmail(dot)com> wrote:
> There is a major and a minor version. The attached patch applies on top the previous.

Perfect. I've merged this into the patch.

It's interesting that minor version changes mean no order changed but
new code points were added; that must be useful if your system
prevents you from using code points before you add them, I guess (?).
I don't understand the difference between the NLS and "defined"
versions, but at this stage I don't think we can try to be too fancy
here, think we're just going to have to assume we need both of them
and treat this the same way across all providers: if it moves, reindex
it.

Attachment Content-Type Size
0001-Add-collation-versions-for-Windows-v2.patch application/octet-stream 2.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-11-11 03:15:23 Re: dropdb --force
Previous Message Amit Kapila 2019-11-11 02:23:53 Re: Ordering of header file inclusion