From: | Peter Mount <peter(at)retep(dot)org(dot)uk> |
---|---|
To: | "Rafal Piotrowski (CSCS)" <Rafal(dot)Piotrowski(at)CSCS(dot)CH> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] problem with getBytes |
Date: | 1999-11-22 19:28:37 |
Message-ID: | Pine.LNX.4.10.9911221926540.19044-100000@maidast.retep.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Mon, 22 Nov 1999, Rafal Piotrowski (CSCS) wrote:
> Hi,
>
> Configuration:
> - PostgreSQL 6.5.1
> - JDBC for JDK 1.2
>
> Problem:
>
> I have a table which looks like this:
> -------+-----------+---------------+---------------+--------------+------------
> id:int | name:text | language:text | filename:text | comment:text |
> content:oid
> -------+-----------+---------------+---------------+--------------+------------
> 1 |a name |English |a file name |
> |1102724
> -------+-----------+---------------+---------------+--------------+------------
> The problem starts when I use getBytes("content"). I am getting the
> following error:
> FastPath call returned ERROR: lo_tell: invalid large object
> descriptor (0)
> So, as you can see the oid is not zero. Does anyone know what is going
> on?
As of 6.5, you must setAutoCommit(false) before using large objects. This
is because the backend now requires an open Transaction for them.
> One more thing, setBytes method, does work, but only if the array of
> bytes is not too big. (I don't know the exact size) :-(
You may need to look at the LargeObject api, which is additional to the
JDBC api.
Peter
--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Mount | 1999-11-22 19:40:06 | Re: [INTERFACES] table very big !!!!! |
Previous Message | Rafal Piotrowski (CSCS) | 1999-11-22 18:10:05 | problem with getBytes |