From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
Date: Mon, 11 Dec 2017 09:52:21 +0100
Message-ID: <1512982341.2699.17.camel@cybertec.at> (raw)
In-Reply-To: <0A3221C70F24FB45833433255569204D1F84A7AD@G01JPEXMBYT05>
References: <0A3221C70F24FB45833433255569204D1F84A7AD@G01JPEXMBYT05>
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
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: laurenz.albe@cybertec.at, tsunakawa.takay@jp.fujitsu.com
Subject: Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
In-Reply-To: <1512982341.2699.17.camel@cybertec.at>
References: <0A3221C70F24FB45833433255569204D1F84A7AD@G01JPEXMBYT05> <1512982341.2699.17.camel@cybertec.at>
* 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