pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter T Mount <peter@retep.org.uk>
To: Martin Schild <maet@gmx.de>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: object id
Date: Tue, 06 Mar 2001 06:57:11 -0500 (EST)
Message-ID: <983879831.3aa4d097bf217@webmail.retep.org.uk> (raw)
In-Reply-To: <3AA37334.20564E8C@gmx.de>
References: <3AA37334.20564E8C@gmx.de>

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/



view thread (7+ messages)  latest in thread

Message-ID: <983879831.3aa4d097bf217@webmail.retep.org.uk>
Permalink:  ../983879831.3aa4d097bf217@webmail.retep.org.uk/
Also on:    postgresql.org/message-id/983879831.3aa4d097bf217@webmail.retep.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: peter@retep.org.uk, maet@gmx.de
  Subject: Re: object id
  In-Reply-To: <983879831.3aa4d097bf217@webmail.retep.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox