| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pg_dump vs PQescapeBytea |
| Date: | 2009-08-04 20:27:51 |
| Message-ID: | 20903.1249417671@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Jeff Davis <pgsql(at)j-davis(dot)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 in a SQL string (am
> I wrong here?).
True, but I would think that most people would prefer to use binary
format and not do any conversion/escaping at all in that situation.
I doubt it's worth producing still another variant of PQescapeBytea
for the people who insist on a text conversion for that case. (The
hex mode already made their lives a lot easier, anyway.)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2009-08-04 20:27:53 | Re: the case for machine-readable error fields |
| Previous Message | Jeff Davis | 2009-08-04 20:20:15 | Re: pg_dump vs PQescapeBytea |