pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dionisis Kontominas <dkontominas@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
Date: Thu, 9 Feb 2023 14:49:47 +0100
Message-ID: <20230209144947.1dfad6c0@karst> (raw)
In-Reply-To: <CAH2-WzkbWXvDGq2=ytGckKgkj22a7kuweaphY6iOE55_aVjwsw@mail.gmail.com>
References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com>
	<2550995.1675639480@sss.pgh.pa.us>
	<CAB4Evu30cbKTZrYFh=zf-+TizKtQe28hFcdJpMw5wrEex7++fQ@mail.gmail.com>
	<2556580.1675642741@sss.pgh.pa.us>
	<CAH2-WzkbWXvDGq2=ytGckKgkj22a7kuweaphY6iOE55_aVjwsw@mail.gmail.com>

On Sun, 5 Feb 2023 17:14:44 -0800
Peter Geoghegan <pg@bowt.ie> wrote:

...
> The OP should see the Postgres ICU docs for hints on how to use these
> facilities to make a custom collation that matches whatever their
> requirements are:
> 
> https://www.postgresql.org/docs/current/collation.html#COLLATION-MANAGING

As you are talking about ICU customization to match whatever the requirement we
want, we were wondering if this would be that easy with ICU to build/create such
custom and odd collation (and not just move numbers after latin)? Even
being able to order letter by letter?

For the record, I helped on an issue last week to sort data using the ebcdic
order. ICU was just a pain, especially with this buggy and annoying bug when
sorting numbers after letters[1] and the fact that it takes whatever we feed it
with without complaining for badly formed or impossible collation. We just gave
up.

One of our recommendation was to write a glibc collation file, built/installed
it using localedef and "import" it in PostgreSQL using
pg_import_system_collations(). The customer actually did it and it works like a
charm.

Regards,

[1] remember ?
https://www.postgresql.org/message-id/flat/20200903105727.064665ce%40firost#0a6e89e58eec7679391c8292...





view thread (11+ messages)

Message-ID: <20230209144947.1dfad6c0@karst>
Permalink:  ../20230209144947.1dfad6c0@karst/
Also on:    postgresql.org/message-id/20230209144947.1dfad6c0@karst

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: jgdr@dalibo.com, pg@bowt.ie, tgl@sss.pgh.pa.us, dkontominas@gmail.com
  Subject: Re: Question regarding UTF-8 data and "C" collation on definition of field of table
  In-Reply-To: <20230209144947.1dfad6c0@karst>
  References: <CAB4Evu1nV57hohRkEzs3J5MtDOzLFo-Uo-_TtLbiUB1WEFVOxw@mail.gmail.com> <2550995.1675639480@sss.pgh.pa.us> <CAB4Evu30cbKTZrYFh=zf-+TizKtQe28hFcdJpMw5wrEex7++fQ@mail.gmail.com> <2556580.1675642741@sss.pgh.pa.us> <CAH2-WzkbWXvDGq2=ytGckKgkj22a7kuweaphY6iOE55_aVjwsw@mail.gmail.com> <20230209144947.1dfad6c0@karst>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox