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 5865652A71 for ; Sun, 13 Mar 2005 12:45:58 +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 14561-04 for ; Sun, 13 Mar 2005 12:45:49 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 8FDF3565AC for ; Sun, 13 Mar 2005 12:45:47 +0000 (GMT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1DASKX-00039b-00; Mon, 14 Mar 2005 01:36:25 +1300 Message-ID: <423433C6.7090805@opencloud.com> Date: Mon, 14 Mar 2005 01:36:22 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0 (X11/20041228) X-Accept-Language: en-us, en MIME-Version: 1.0 To: patrick Cc: pgsql-jdbc@postgresql.org Subject: Re: Cannot Retrieve Binary Data References: <5bd6ef364cb5f644245035172a720b30@freeshell.org> <42320813.9040605@opencloud.com> In-Reply-To: X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/134 X-Sequence-Number: 12526 patrick wrote: > There's no way to stream a bytea ? how postgres support bytea with 1G if > is not possible to insert and select ? You need to use the binary parameter/result format (at the protocol level). The current JDBC driver uses the binary format for bytea parameters, but the text format for resultsets. psql uses the text format for both, I believe. > FYI: > i tried the same Test with postgres 7.4.7 and earlier and is even worst > i was not able to insert. > The JDBC Driver Return Out_Of_Memory during the query execution I assume you mean with an earlier version of the driver? Earlier driver versions used the text format for both parameters and results, and also used a large amount of temporary heap space for large bytea parameters. You may want to look at using the large-object interface if you are dealing with extremely large data; it allows random read/write access to the data without transferring it all across the wire in one go. -O