Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
Date: 2017-12-11 08:52:21
Message-ID: 1512982341.2699.17.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tsunakawa, Takayuki wrote:
> It is embarrassing to ask such a thing, but is there any way to sort character column values in EBCDIC order inside the PostgreSQL server?
> i.e. is it possible to use EBCDIC collation in PostgreSQL, say, by using ICU or something? We need to run on a certain mainframe.
>
> I see almost no hope from the following, but let me make sure.

That should not be too difficult. PostgreSQL is extensible!

Just define operators that implement <, <=, =, >= and > for EBCDIC,
create an operator class for these (for indexing) and use
ORDER BY ... USING.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Luuk 2017-12-11 09:55:35 Re: Display table entries using partial column entry
Previous Message David Rowley 2017-12-11 07:15:23 Re: Removing INNER JOINs