From: ljb <ljb9832@pobox.com>
To: pgsql-docs@postgresql.org
Subject: Re: [GENERAL] Gripe: bytea_output default => data corruption
Date: Thu, 3 Feb 2011 19:38:07 +0000 (UTC)
Message-ID: <iif06v$2et7$1@news.hub.org> (raw)
References: <201102022125.p12LPqd03573@momjian.us>
<201102022127.p12LRnZ04134@momjian.us>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: ljb9832@pobox.com
Subject: Re: [GENERAL] Gripe: bytea_output default => data corruption
In-Reply-To: <iif06v$2et7$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox