[email protected] 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.

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Reply via email to