Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TStbO-0006jP-MR for pgsql-odbc@postgresql.org; Mon, 29 Oct 2012 17:58:18 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TStbM-0003JV-Hd for pgsql-odbc@postgresql.org; Mon, 29 Oct 2012 17:58:17 +0000 Received: from Endor (business-188-111-109-220.static.arcor-ip.net [188.111.109.220]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MXnnj-1TwIq01O0V-00WLtV; Mon, 29 Oct 2012 18:58:15 +0100 From: =?utf-8?Q?Nils_G=C3=B6sche?= To: Subject: Empty bytea values on 9.2.1 Date: Mon, 29 Oct 2012 18:58:14 +0100 Message-ID: <006a01cdb5fe$f8400c00$e8c02400$@de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac21/uSJJEu1M3+UTfGuH1drWJEZTg== Content-Language: de X-Provags-ID: V02:K0:4HGzCaXZXvZnKnWNIJzEh194H1heS3XG0QdNge9ZoEH J+rxXtmiNCvB8ka5N9NJxrYSBU6vWrp9YwiXXZK0XkgcOthg2G og0WrXBeCgmi46iZ7b30haGVYb6lClDGyck72KNfYLNmv+28nz QAI9goU2myxdk6oVHCpD/+cRGtMB5NWOG/uVzyO6GSsKd7bGdm i44M7Ukrr5HPpFfZ3QKRHIaU99C7eZUTRyR+eFo66q+9fucmHF fUPO4iFFV3SKXOm3FSlCm6mp9GrsM89gMgRMch8UfneXLBD4Nq B3akE9KWF43cD3LblD9PFmAkwrcc8FkBOhueJu47XLDMjGQFxD sbdz0TB96+cQWf+50Zgw= X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/10 X-Sequence-Number: 10969 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, --=20 Nils G=C3=B6sche "Don't ask for whom the tolls."