Re: Cannot Retrieve Binary Data

From: jonathan(dot)lister(at)vaisala(dot)com
To: pch(at)freeshell(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Cannot Retrieve Binary Data
Date: 2005-03-17 10:29:14
Message-ID: 0077BA604D38D311918B00508B444258033B0070@birsrv01.vaisala.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I have also noticed that jdbc driver seems to be able to store larger binary
objects than it can retrieve when using a bytea column.
Is there any guidance on what the recommended maximum size would be for a
bytea column before moving to an OID column .. or is this dependant on
tuning database server parameters?

-----Original Message-----
From: patrick [mailto:pch(at)freeshell(dot)org]
Sent: 14 March 2005 07:34
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Cannot Retrieve Binary Data

On 13 Mar 2005, at 13:36, Oliver Jowett wrote:
>
> 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.
Thanks for the suggestion i will try again

>> 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.
both earlier driver and earlier version of postgresql now i undestand
why my tests were failing.

> 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.

Yes it appear the be the best solution.. thanks for you help

-patrick

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Browse pgsql-jdbc by date

  From Date Subject
Next Message aparna 2005-03-17 13:40:18 postgres-jdbc
Previous Message Javier Yáñez 2005-03-17 09:50:33 Re: Charset encoding patch to JDBC driver