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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
Дата
Msg-id 22976.1513003579@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is it possible to sort strings in EBCDIC order in PostgreSQL server?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-general
"Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com> writes:
> It is embarrassing to ask such a thing, but is there any way to sort character column values in EBCDIC order inside
thePostgreSQL server?  i.e. is it possible to use EBCDIC collation in PostgreSQL, say, by using ICU or something?  We
needto run on a certain mainframe. 

> I see almost no hope from the following, but let me make sure.
> https://www.postgresql.org/message-id/flat/28548.1424884373%40sss.pgh.pa.us#28548.1424884373@sss.pgh.pa.us

> "Hmm ... EBCDIC ... is that mandatory?  Because there are a pretty large
> number of ASCII dependencies in PG, mostly arising from our support of
> multibyte character sets, which are all expected to be ASCII supersets.
> If there's not a way to run the server process in ASCII-land, you're
> likely dead in the water.  I would not want to try to ferret out all
> the dependencies."

As I recall, that question was about converting the server to use
EBCDIC strings everywhere.  That seems impractical for the reasons
I mentioned.  But you could probably sort according to EBCDIC order
if you were willing to accept some inefficiency: internal to the
comparison function, convert each string to EBCDIC on each call.

Another way you could imagine is to store EBCDIC strings embedded
in bytea values.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Ray Stell
Дата:
Сообщение: PostgreSQL is so hip again
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Removing INNER JOINs