From: Nils Gösche <cartan@cartan.de>
To: pgsql-odbc@postgresql.org
Subject: Empty bytea values on 9.2.1
Date: Mon, 29 Oct 2012 18:58:14 +0100
Message-ID: <006a01cdb5fe$f8400c00$e8c02400$@de> (raw)
Hi!
On an 8.4 installation, I have a table with a bytea column. In some rows, the
value of this column has length 0. When I query that table with a normal SELECT,
using the ODBC driver from C#, I get a byte[] object of length 0 on those rows.
So far so good.
Now, I dumped the database and restored it on a 9.2.1 installation. The tables
look the same on the new installation: Zero length of the bytea values in some
columns. However, if I try to retrieve such rows with the exact same program as
above, with the same ODBC driver, same connection string except the host name,
suddenly I get a byte[] object of length 1! And the one byte in that array
appears to be random!
At first, I thought it might be a Postgres bug. I wrote a simple program that
uses Npgsql to retrieve those rows, however, the behavior wasn't reproducible
anymore that way. It occurs only if I use ODBC. So, I suspect there is something
in the ODBC driver causing this.
Can anybody else confirm this?
Regards,
--
Nils Gösche
"Don't ask for whom the <CTRL-G> tolls."
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: cartan@cartan.de
Subject: Re: Empty bytea values on 9.2.1
In-Reply-To: <006a01cdb5fe$f8400c00$e8c02400$@de>
References: <006a01cdb5fe$f8400c00$e8c02400$@de>
* 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