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

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
Дата
Msg-id CAH2-Wzkoc3pD3SR=MA=W4FyHFicDypcw2NGUEZDdWbODHiTbKg@mail.gmail.com
обсуждение исходный текст
Ответ на Is it possible to sort strings in EBCDIC order in PostgreSQL server?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Ответы RE: Is it possible to sort strings in EBCDIC order in PostgreSQLserver?  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-general
On Sun, Dec 10, 2017 at 11:09 PM, Tsunakawa, Takayuki
<tsunakawa.takay@jp.fujitsu.com> wrote:
> 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. 

There is no need for embarrassment. I think that you mean that you'd
like to get behavior equivalent to the "C" locale with an EBCDIC
encoding. Right? I think that you could use ICU to do this with some
work. ICU collations are not tied to a particular encoding, unlike the
libc collations (they support most but not all collations).

That said, the idea of an "EBCDIC collation" seems limiting. Why
should a system like DB2 for the mainframe (that happens to use EBCDIC
as its encoding) not have a more natural, human-orientated collation
even while using EBCDIC? ISTM that the point of using the "C" locale
(with EBDIC or with UTF-8 or with any other encoding) is to get a
performance benefit where the actual collation's behavior doesn't
matter much to users. Are you sure it's really important to be
*exactly* compatible with EBCDIC order? As long as you're paying for a
custom collation, why not just use a collation that is helpful to
humans?

--
Peter Geoghegan


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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: How to know if a database has changed
Следующее
От: Paul Ramsey
Дата:
Сообщение: SearchSysCache() tutorial?