Re: [GENERAL] Gripe: bytea_output default => data corruption

Поиск
Список
Период
Сортировка
От ljb
Тема Re: [GENERAL] Gripe: bytea_output default => data corruption
Дата
Msg-id iif06v$2et7$1@news.hub.org
обсуждение исходный текст
Ответ на Re: [GENERAL] Gripe: bytea_output default => data corruption  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: [GENERAL] Gripe: bytea_output default => data corruption  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
bruce@momjian.us wrote:
>...
>> Based on this report, I have created the attached documentation patch
>> which clarifies the libpq behavior for escaping bytea.  I am planning to
>> backpatch this to 9.0 as well.

This change says PQescapeBytea is unable to adjust its behavior based on
bytea_output, implying that PQescapeByteaConn does adjust its behavior
based on byte_output. Wrong! Neither one knows or cares about the bytea_output
parameter, which is solely for the backend to tell it how to present bytea
data to the front-end. Not for the front-ends at all.

(See why we need this behavior documented?)

Non-use of 'standard_conforming_strings' is also wrong, in the current
(pre-patched) docs. PQescapeBytea does adjust its behavior for
standard_conforming_strings, but only for the single-connection case. See
similar text for PQescapeString.

Regarding the first paragraph changed, it seems off to me.  "PQescapeByteConn
escapes such bytes using either hex encoding..." tells me that when hex
encoding is used, PQescapeByte encodes only bytes that need escaping. Not
true - hex encoding encodes (not escapes) every byte.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Change to kernel-resources
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Change to documentation headers