Re: pg_dump vs PQescapeBytea

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: pg_dump vs PQescapeBytea
Дата
Msg-id 1249417215.3653.108.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на pg_dump vs PQescapeBytea  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_dump vs PQescapeBytea  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: the case for machine-readable error fields
Следующее
От: Robert Haas
Дата:
Сообщение: Re: the case for machine-readable error fields