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

Поиск
Список
Период
Сортировка
От James Keener
Тема Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?
Дата
Msg-id CAG8g3txKiJjJpYnvHMzdghdTvCCkgJ5izKAvxzuXwJeYEHeybA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?  (John McKown <john.archie.mckown@gmail.com>)
Список pgsql-general
If that's the case, I wonder if OP could write a function that would convert from the ASCII code-point ot the EBCDIC codepoint. For instance, (using the function at https://wiki.postgresql.org/wiki/Binary_Replace) convert A to char 193, `select binary_replace('Anne'::bytea, 'A'::bytea, '\xc1'::bytea);` and then sort by the result of this function.

Jim

On Tue, Dec 12, 2017 at 10:47 AM, John McKown <john.archie.mckown@gmail.com> wrote:
On Tue, Dec 12, 2017 at 9:43 AM, James Keener <jim@jimkeener.com> wrote:
Sorry for spamming the list. It appears that I'm an idiot. Sorry :(

​I guess we're even now. We both made a similar mistake.​

​But, despite my error, I still think the OP's need for an EBCDIC order is to compare output from parallel runs of an application from both an EBCDIC host and and ASCII host, to make sure they are "the same".

--
I have a theory that it's impossible to prove anything, but I can't prove it.

Maranatha! <><
John McKown

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Size of pg_multixact/members increases 11355
Следующее
От: George Neuner
Дата:
Сообщение: Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?