Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: ljb <ljb9832(at)pobox(dot)com>, PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: [GENERAL] Gripe: bytea_output default => data corruption
Date: 2010-10-25 23:18:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-general
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Yikes, you are right!  I see:

> 	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

In response to


pgsql-docs by date

Next:From: Katharina kuhnDate: 2010-10-26 22:02:49
Previous:From: ljbDate: 2010-10-22 22:06:07
Subject: Re: Gripe: bytea_output default => data corruption

pgsql-general by date

Next:From: zhong ming wuDate: 2010-10-26 01:29:18
Subject: Re: What is "return code" for WAL send command
Previous:From: Latrous, YoussefDate: 2010-10-25 20:33:53
Subject: Re: Wrong SYSID in WAL segment

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group