Re: PQescapeByteaConn and the new hex encoding

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Matteo Beccati <php(at)beccati(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PQescapeByteaConn and the new hex encoding
Date: 2009-12-25 18:36:38
Message-ID: 4B350636.4010605@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matteo Beccati wrote:
> Il 25/12/2009 18:54, Tom Lane ha scritto:
>> Matteo Beccati<php(at)beccati(dot)com> writes:
>>> However, before taking a look at the actual code and understanding its
>>> behaviour, I tried using "SET bytea_output = 'escape'" and I was
>>> expecting PQescapeByteaConn to honour it.
>>
>> Why? PQescapeByteaConn's charter is to produce something that will work
>> on the given connection, no more and no less.
>
> Makes complete sense :)
>
> I was just trying to find a way to get the PHP function
> pg_escape_bytea (which uses PQescapeByteaConn if available) to
> generate a backwards compatible escaped string. It's probably just a
> corner case though and it can be dealt with at the client side, if
> necessary.
>
>
>

There is plenty of reason to use hex format wherever possible - we
expect it to be much more efficient to process on the server side.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-12-25 18:40:53 ORDER BY clause in aggregate doesn't work well with multi argument aggregates
Previous Message Pavel Stehule 2009-12-25 18:29:50 proposal for 8.5, listagg aggregate function, WIP patch