Re: bytea insert difference between 8.3 and 9.x

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Gregg Jaskiewicz <gryzman(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bytea insert difference between 8.3 and 9.x
Date: 2011-09-26 14:12:55
Message-ID: CAHyXU0yezy8ke7Szxoa-h1drXGQNDEWWrmQBvdat8-hBMy7uDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 26, 2011 at 8:50 AM, Gregg Jaskiewicz <gryzman(at)gmail(dot)com> wrote:
> Thanks Merin.
>
> It does, and that's probably what I'll do. Your solution isn't great
> either, because it requires extra function to be run on the postgresql
> side. Me no likeey that ;)

If you are sending a bytea as encoded text, you have to call a
decoding function on the server side no matter what -- it's implicitly
done for you some cases though. the decode() route is x-version and
guarantees hex method of transfer, not the old escaped method which is
stupid and slow.

The only way to not send encoded text is via binary switch in the
protocol...not sure if libpqxx supports this method of execution.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DUPREZ Cédric 2011-09-26 14:13:26 Problem with pg_upgrade from 9.0 to 9.1 under Ubuntu x64
Previous Message Edson Carlos Ericksson Richter 2011-09-26 14:02:32 RES: Does postgresql 9.0.4 use index on PREFIX%SUFFIX queries?