From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: ljb <ljb9832@pobox.com>
Cc: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: Re: [GENERAL] Gripe: bytea_output default => data corruption
Date: Mon, 25 Oct 2010 19:18:49 -0400
Message-ID: <8604.1288048729@sss.pgh.pa.us> (raw)
In-Reply-To: <201010212342.o9LNgEu17871@momjian.us>
References: <201010212342.o9LNgEu17871@momjian.us>
Bruce Momjian <bruce@momjian.us> writes:
> Yikes, you are right! I see:
> http://www.postgresql.org/docs/9.0/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING> PQescapeByteaConn
> ...
> Certain byte values must be escaped (but all byte values can be escaped)
> when used as part of a bytea literal in an SQL statement. In general, to
> --> escape a byte, it is converted into the three digit octal number equal
> to the octet value, and preceded by usually two backslashes. The single
> quote (') and backslash (\) characters have special alternative escape
> sequences. See Section 8.4 for more information. PQescapeByteaConn
> performs this operation, escaping only the minimally required bytes.
> Can someone suggest some updated wording? Thanks.
I think we should simply remove the description of *how* the escaping is
performed, and state only that the function produces a suitably escaped
literal string. Anything else is not future-proof, and could someday
break the way this wording did.
regards, tom lane
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: tgl@sss.pgh.pa.us, bruce@momjian.us, ljb9832@pobox.com
Subject: Re: [GENERAL] Gripe: bytea_output default => data corruption
In-Reply-To: <8604.1288048729@sss.pgh.pa.us>
* 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