[HACKERS] pg_dump vs PQescapeBytea

2009-08-04 Thread Tom Lane
I mentioned in http://archives.postgresql.org/message-id/21837.1248215...@sss.pgh.pa.us that pg_dump has a bug in its handling of large objects, which is directly related to the fact that it's still using the deprecated function PQescapeBytea. The reason PQescapeBytea is deprecated is that it has

Re: [HACKERS] pg_dump vs PQescapeBytea

2009-08-04 Thread Jeff Davis
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

Re: [HACKERS] pg_dump vs PQescapeBytea

2009-08-04 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: 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