Re: PQescapeByteaConn and the new hex encoding - Mailing list pgsql-hackers

From Matteo Beccati
Subject Re: PQescapeByteaConn and the new hex encoding
Date
Msg-id 4B3501C7.4070901@beccati.com
Whole thread Raw
In response to Re: PQescapeByteaConn and the new hex encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PQescapeByteaConn and the new hex encoding  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Il 25/12/2009 18:54, Tom Lane ha scritto:
> Matteo Beccati<php@beccati.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.


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: info about patch: using parametrised query in psql
Next
From: Pavel Stehule
Date:
Subject: proposal for 8.5, listagg aggregate function, WIP patch