| From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: pg_dump vs PQescapeBytea |
| Date: | 2009-08-04 20:20:15 |
| Message-ID: | 1249417215.3653.108.camel@monkey-cat.sm.truviso.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2009-08-04 20:27:51 | Re: pg_dump vs PQescapeBytea |
| Previous Message | Tom Lane | 2009-08-04 20:19:24 | Re: the case for machine-readable error fields |