Re: object id

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: object id
Дата
Msg-id 983879831.3aa4d097bf217@webmail.retep.org.uk
обсуждение исходный текст
Ответ на object id  (Martin Schild <maet@gmx.de>)
Список 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 по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: return codes
Следующее
От: "Enrico Comini"
Дата:
Сообщение: JDBC