Re: EBCDIC sorting as a use case for ICU rules

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Peter Eisentraut" <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Jeff Davis <pgsql(at)j-davis(dot)com>, Jonathan S(dot) Katz <jkatz(at)postgresql(dot)org>
Subject: Re: EBCDIC sorting as a use case for ICU rules
Date: 2023-07-17 08:10:19
Message-ID: 004738a3-60f0-4dc5-9bbf-e107c00c2262@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:

> You can use whitespace in the rules. For example,
>
> CREATE COLLATION ebcdic (provider='icu', locale='und',
> rules=$$

Nice, it's clearly better that the piece of code I had in the
previous patch.
It can also be made more compact by grouping consecutive
code points, for instance <*a-r for 'a' to 'r'
I changed it that way, and also moved '^' before '[' and ']',
since according to [1], '^' is at location 0xB0 and '[' and ']'
at 0xBA and 0xBB.

Updated patch attached.

[1] https://en.wikipedia.org/wiki/EBCDIC#Code_page_layout

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite

Attachment Content-Type Size
collation-icu-rules-v2.patch text/plain 4.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-07-17 08:55:23 Re: Some revises in adding sorting path
Previous Message Michael Paquier 2023-07-17 07:59:53 Re: The same 2PC data maybe recovered twice