PQescapeBytea* version for parameters

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема PQescapeBytea* version for parameters
Дата
Msg-id 87fy44chki.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответы Re: PQescapeBytea* version for parameters
Список pgsql-hackers
Currently libpq provides a function to escape byteas to include directly in
the query string. But if you're using PQexecParam you still need to do one
layer of quoting but don't need to double the backslashes which PQescapeBytea
does if you have standard_conforming_strings set off.

Do we want something like this which provides a PQescapeByteaParam for
escaping bytea strings before passing them as text-mode parameters in
PQexecParam?

I cheated here and just passed true to standard_conforming_strings which
happens to do what we want. It might be better to provide an additional
parameter to PQescapeByteaInternal which tells it to only escape \ and NUL and
not other binary characters and '.

I didn't document it yet, I'll do that if people agree we want it.



--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Dead code as a result of plan cache invalidation?
Следующее
От: Darcy Buskermolen
Дата:
Сообщение: Re: Why so many out-of-disk-space failures on buildfarm machines?