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

From: James Keener <jim(at)jimkeener(dot)com>
To: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>
Cc: "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-12 16:06:29
Message-ID: CAG8g3txKiJjJpYnvHMzdghdTvCCkgJ5izKAvxzuXwJeYEHeybA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)archie(dot)mckown(at)gmail(dot)com>
wrote:

> On Tue, Dec 12, 2017 at 9:43 AM, James Keener <jim(at)jimkeener(dot)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
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim Gündüz 2017-12-12 16:31:04 Re: Missing RHEL rpm(pg_catcheck-10) in postgres 10 repo.
Previous Message David G. Johnston 2017-12-12 16:05:53 Re: Size of pg_multixact/members increases 11355