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