Re: object id - Mailing list pgsql-interfaces

From Peter T Mount
Subject Re: object id
Date
Msg-id 983879831.3aa4d097bf217@webmail.retep.org.uk
Whole thread Raw
In response to object id  (Martin Schild <maet@gmx.de>)
List pgsql-interfaces
Quoting Martin Schild <maet@gmx.de>:

> Hi,
> 
> I'm using the setBytes() method of jdbc to store a large object to
> database. Now i want to store the object id to another table. Is there
> a
> 
> possibility to get the oid of an object directly after the object is
> stored to store this id into another table.

setBytes() actually stores the large object's OID in that column, so to get the
oid, simply use getInt() or getString() on the same column.

Only getBytes() & get*Stream() methods (as well as the set* equivalents) 
actually operate on the large object itself. The others would see just the oid 
value.

Peter

-- 
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/


pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: Re: return codes
Next
From: "Enrico Comini"
Date:
Subject: JDBC