Re: object id

From: maet(at)gmx(dot)de
To: Peter T Mount <peter(at)retep(dot)org(dot)uk>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: object id
Date: 2001-03-06 15:40:50
Message-ID: 8085.983893250@www36.gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc

> 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

O.K. but is it possible to get the oid during or directly after inserting
the object into the table without a query to find the column again? I want to
insert an object at the same time into different tables and they should have
the same oid so i can use a join on these tables.

thanks,
Martin

--
Sent through GMX FreeMail - http://www.gmx.net

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message helen 2001-03-06 17:58:41 ODBC Call Failed -
Previous Message Peter T Mount 2001-03-06 15:11:36 Re: JDBC

Browse pgsql-jdbc by date

  From Date Subject
Next Message Catalin CIOCOIU 2001-03-06 16:16:57 Re: JBuilder4 ...
Previous Message The Hermit Hacker 2001-03-06 12:17:31 Re: JBuilder4 ...