On Tue, 2009-08-04 at 13:35 -0400, Tom Lane wrote:
> I speculated about fixing that by inventing a "PQescapeByteaHex"
> function, but that was pure brain fade :-(.  The hex format for
> bytea still requires one backslash in the value, so you still have
> to know standard_conforming_strings to get it right.

On a related topic: right now it's impossible to safely escape (using
libpq alone) bytea data for use as a text-format argument to a
parameterized query. This is because PQescapeBytea returns a string that
is both escaped for bytea and escaped for inclusion in a SQL string (am
I wrong here?).

It's a pretty minor issue, but a little inconsistent. Is it worth
addressing?

Regards,
        Jeff Davis


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to