Re: pg_dump vs PQescapeBytea

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


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

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