From: ljb <ljb9832@pobox.com>
To: pgsql-general@postgresql.org
Subject: Re: Gripe: bytea_output default => data corruption
Date: Fri, 22 Oct 2010 22:06:07 +0000 (UTC)
Message-ID: <i9t1sf$2vvn$1@news.hub.org> (raw)
References: <AANLkTi=SH6s3FcsCf0quZm09-XgncTnQPR18-Z6GVqsU@mail.gmail.com>
<201010212129.o9LLTBl21612@momjian.us>
<i9qhd8$1v7u$1@news.hub.org>
<AANLkTikV2u1+YwO+hzcoLyiWeH=hR0okY8Jz8YjwY0KA@mail.gmail.com>
vivek@khera.org wrote:
>...
> I had some hoops thru which I had to jump to make our app compatible with
> both 8.x and 9.x so we could safely migrate our servers without having to
> coordinate a code push. It wasn't that bad, but part of the problem is that
> the DBD::Pg driver does not understand the new format... but it does
> unescape the "\x" marker for me to a simple "x", since that follows the
> traditional un-escaping rules for values returned from Pg. I don't like
> overriding defaults in the DB settings unless I *really* have to.
Although DBD::Pg uses libpq, linking it with the PostgreSQL-9.0 libpq
doesn't fix the escape/unescape problem. (I'm sure you already know this.)
That's because DBD::Pg implements its own string and bytea escape and
unescape functions, for some reason, and does not use PQescapeStringConn
etc. (I wonder if that makes it vulnerable to the security problems fixed
8.1.4?)
I probably would have just gone ahead and deployed 9.0 servers with
"bytea_output='escape'" in their postgresql.conf files. Permanent work-around.
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, pgsql-general@postgresql.org
Subject: Re: Gripe: bytea_output default => data corruption
In-Reply-To: <i9t1sf$2vvn$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