Re: [INTERFACES] problem with getBytes
От | Peter Mount |
---|---|
Тема | Re: [INTERFACES] problem with getBytes |
Дата | |
Msg-id | Pine.LNX.4.10.9911221926540.19044-100000@maidast.retep.org.uk обсуждение исходный текст |
Ответ на | problem with getBytes ("Rafal Piotrowski (CSCS)" <Rafal.Piotrowski@CSCS.CH>) |
Список | 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@retep.org.uk Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgresJava PDF Generator: http://www.retep.org.uk/pdf
В списке pgsql-interfaces по дате отправления: