Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f26Fexx17595 for ; Tue, 6 Mar 2001 10:40:59 -0500 (EST) (envelope-from maet@gmx.de) Received: (qmail 15096 invoked by uid 0); 6 Mar 2001 15:40:51 -0000 Date: Tue, 6 Mar 2001 16:40:50 +0100 (MET) From: maet@gmx.de To: Peter T Mount Cc: pgsql-interfaces@postgresql.org MIME-Version: 1.0 References: <983879831.3aa4d097bf217@webmail.retep.org.uk> Subject: Re: object id X-Priority: 3 (Normal) X-Authenticated-Sender: #0001688873@gmx.net X-Authenticated-IP: [195.37.47.207] Message-ID: <8085.983893250@www36.gmx.net> X-Mailer: WWW-Mail 1.5 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/55 X-Sequence-Number: 1216 > 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