X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4BFFB565FD for ; Fri, 11 Mar 2005 14:15:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43289-04 for ; Fri, 11 Mar 2005 14:15:58 +0000 (GMT) Received: from outmx018.isp.belgacom.be (outmx018.isp.belgacom.be [195.238.2.117]) by svr1.postgresql.org (Postfix) with ESMTP id B6B7F556EE for ; Fri, 11 Mar 2005 14:15:56 +0000 (GMT) Received: from outmx018.isp.belgacom.be (localhost [127.0.0.1]) by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j2BEFrJl031796 for ; Fri, 11 Mar 2005 15:15:54 +0100 (envelope-from ) Received: from [10.0.0.5] (166-200.241.81.adsl.skynet.be [81.241.200.166]) by outmx018.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j2BEFnq3031766 for ; Fri, 11 Mar 2005 15:15:49 +0100 (envelope-from ) Mime-Version: 1.0 (Apple Message framework v619.2) Content-Transfer-Encoding: 7bit Message-Id: <5bd6ef364cb5f644245035172a720b30@freeshell.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: pgsql-jdbc@postgresql.org From: patrick Subject: Cannot Retrieve Binary Data Date: Fri, 11 Mar 2005 15:15:49 +0100 X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.492 tagged_above=0 required=5 tests=DNS_FROM_RFC_WHOIS X-Spam-Level: X-Archive-Number: 200503/114 X-Sequence-Number: 12506 Hi all , i'm following the example at http://www.postgresql.org/docs/7.4/interactive/jdbc-binary-data.html trying to retrieve previous stored file (more than 600MB) using the following code: Jdbc3ConnectionPool source = new Jdbc3ConnectionPool(); conn = DriverManager.getConnection("jdbc:postgresql://localhost/backup", "test", "test"); conn.setAutoCommit(false); PreparedStatement ps = conn.prepareStatement("SELECT img FROM images WHERE imgname = ?"); ps.setString(1, "civil.dmg"); ResultSet rs = ps.executeQuery(); if (rs != null) { while (rs.next()) { byte[] imgBytes = rs.getBytes(1); // use the data in some way here } rs.close(); } ps.close(); conn.commit(); during the executeQuery() i got a the following exception java.sql.SQLException: ERROR: invalid memory alloc request size 2017394403 The Postgres version is 8.0.1 (compiled from source with default settings ) running on Darwin Kernel Version 7.8.0 Thanks in advance for any help -patrick