From rhauch@revelytix.com Wed Aug 9 23:36:37 2006 X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 94B0C9FB2D5 for ; Wed, 9 Aug 2006 20:36:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 43717-09 for ; Wed, 9 Aug 2006 23:36:29 +0000 (UTC) X-Greylist: delayed 00:24:16.757708 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id E215F9FB2D6 for ; Wed, 9 Aug 2006 20:36:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from acrux.lunarpages.com (acrux.lunarpages.com [216.227.209.189]) by svr4.postgresql.org (Postfix) with ESMTP id BAEE65AF02A for ; Wed, 9 Aug 2006 23:12:10 +0000 (GMT) Received: from 24-216-183-147.dhcp.stls.mo.charter.com ([24.216.183.147] helo=[127.0.0.1]) by acrux.lunarpages.com with esmtpa (Exim 4.52) id 1GAxFC-0001Y3-U3 for pgsql-jdbc@postgresql.org; Wed, 09 Aug 2006 16:13:47 -0700 Message-ID: <44DA6BC2.7040903@revelytix.com> Date: Wed, 09 Aug 2006 18:12:02 -0500 From: Randall Hauch User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problem with JDBC and Large Objects X-Enigmail-Version: 0.94.0.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - acrux.lunarpages.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - revelytix.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.376 tagged_above=0 required=5 tests=HTML_30_40, HTML_MESSAGE, MIME_HTML_ONLY X-Spam-Level: X-Archive-Number: 200608/54 X-Sequence-Number: 15581 I'm using the latest JDBC driver (8.1-407) with PostgreSQL 8.1.3 (on Windows) and PostgreSQL 8.1.4 (on Debian).  I've searched the archives, and found several applicable thread that were never responded to or apparently resolved:
I'm using JDBC to store (binary) files in a database, and have tried storing the content in a BYTEA column and using the Large Object API and storing a OID column in my table.  I am able to upload various files into the database, but when I download them the 0xFF characters in the uploaded files have all been stripped.  I've looked for a configuration setting, but don't see anything of use.  (The database or client character encodings should not apply to binary data.)

Any suggestions?  Is this a bug?  (If it is a bug, it seems hard to believe that nobody has run across this.)

Thanks in advance!

Randall


From oliver@opencloud.com Thu Aug 10 07:18:04 2006 X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5A2029FB2D5 for ; Thu, 10 Aug 2006 04:18:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 42273-03 for ; Thu, 10 Aug 2006 04:17:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 15A2F9FB2E3 for ; Thu, 10 Aug 2006 04:17:54 -0300 (ADT) Received: from 203-118-178-246.bliink.ihug.co.nz ([203.118.178.246] helo=[10.1.1.6]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1GB4ng-0001sC-6z; Thu, 10 Aug 2006 19:17:52 +1200 Message-ID: <44DADD9E.9090108@opencloud.com> Date: Thu, 10 Aug 2006 19:17:50 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Randall Hauch CC: pgsql-jdbc@postgresql.org Subject: Re: Problem with JDBC and Large Objects References: <44DA6BC2.7040903@revelytix.com> In-Reply-To: <44DA6BC2.7040903@revelytix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.033 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/56 X-Sequence-Number: 15583 Randall Hauch wrote: > I'm using the latest JDBC driver (8.1-407) with PostgreSQL 8.1.3 (on > Windows) and PostgreSQL 8.1.4 (on Debian). I've searched the archives, > and found several applicable thread that were never responded to or > apparently resolved: > > * http://archives.postgresql.org/pgsql-bugs/2001-04/msg00216.php > * http://mail-archive.objectweb.org/dods/2001-11/msg00007.html > > I'm using JDBC to store (binary) files in a database, and have tried > storing the content in a BYTEA column and using the Large Object API and > storing a OID column in my table. So.. which one did you see the problem with, LOB or bytea? > I am able to upload various files > into the database, but when I download them the 0xFF characters in the > uploaded files have all been stripped. I've looked for a configuration > setting, but don't see anything of use. (The database or client > character encodings should not apply to binary data.) Weird. Do you have a testcase I can try? -O