Re: How to convert HEX to ASCII?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Marti Raudsepp <marti(at)juffo(dot)org>, Torsten Zuehlsdorff <foo(at)meisterderspiele(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert HEX to ASCII?
Date: 2011-12-02 20:01:26
Message-ID: CAFj8pRCXjOAskm7CYjprgqtP8pT8F2_xRxFydd_00ZUuE0CfJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2011/12/2 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Fri, Dec 2, 2011 at 11:15 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2011/12/2 Merlin Moncure <mmoncure(at)gmail(dot)com>:
>>> On Fri, Dec 2, 2011 at 10:42 AM, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
>>>> Sorry, but AFAICT this makes a mess of encodings and only works by
>>>> pure luck. The server thinks it's sending the client LATIN1 text, but
>>>> it's actually UTF8-encoded and the last decoding step is done by your
>>>> terminal.
>>>
>>> yup -- your're right -- what a coincidence!  I still prefer the 1
>>> liner sql variant vs plpgsql loop though.  nicely done.
>>
>> so bytea_agg - one param aggregate has sense
>>
>> it's very easy to implement it
>
> yup:
>
> create aggregate bytea_agg (bytea)
> (
>  sfunc=byteacat,
>  stype=bytea
> );

this is workaround :)

without a memory preallocating it has same speed like cycle in plpgsql.

Regards

Pavel

>
> merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2011-12-02 20:13:40 \dT+ does not give elements ?
Previous Message Merlin Moncure 2011-12-02 19:47:22 Re: How to convert HEX to ASCII?