From: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> |
---|---|
To: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Subject: | Re: EBCDIC sorting as a use case for ICU rules |
Date: | 2023-08-24 14:26:53 |
Message-ID: | 20230824162653.34eb3bad@karst |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Sorry to chime in so lately, I was waiting for some customer feedback.
On Wed, 21 Jun 2023 15:28:38 +0200
"Daniel Verite" <daniel(at)manitou-mail(dot)org> wrote:
> At a conference this week I was asked if ICU could be able to
> sort like EBCDIC [2].
> It turns out it has been already asked on
> -general a few years ago [3] with no satisfactory answer at the time ,
> and that it can be implemented with rules in v16.
We worked with a customer few months ago about this question and end up with a
procedure to build new locale/collation for glibc and load them in PostgreSQL
[1].
Our customer built the fr_ebcdic locale file themselves, based on the EBCDIC
IBM500 codepage (including about the same characters than iso 8859-1) and share
it under the BY-CC licence. See in attachment.
The procedure is quite simple:
1. copy this file under "/usr/share/i18n/locales/fr_ebcdic"
2. build it using "localedef -c -i fr_ebcdic -f UTF-8 fr_ebcdic.UTF-8"
3. restart your PostgreSQL instance (because of localeset weird behavior)
4. "pg_import_system_collations('schema')" or create the collation, eg.:
CREATE COLLATION fr_ebcdic (
PROVIDER = libc,
LC_COLLATE = fr_ebcdic.utf8,
LC_CTYPE = fr_ebcdic.utf8
);
Now, same question than for the ICU: do we want to provide documentation about
this? Online documentation about such feature are quite arid. In fact, this
could be useful in various other way than just EBCDIC.
Regards,
[1] https://www.postgresql.org/message-id/20230209144947.1dfad6c0%40karst
Attachment | Content-Type | Size |
---|---|---|
fr_ebcdic | application/octet-stream | 14.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2023-08-24 14:32:02 | Re: PostgreSQL 16 release announcement draft |
Previous Message | Chapman Flack | 2023-08-24 14:19:29 | Re: Vectorization of some functions and improving pg_list interface |