Re: Implementing JDBC3 methods (Was: JDBC and fetching the

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Implementing JDBC3 methods (Was: JDBC and fetching the
Date: 2002-09-18 20:54:31
Message-ID: 1032382471.21616.92.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Michael,

What do you see as a generatedKey? you mean a serial type?

if you are writing for the driver then you can easily get the last
inserted oid

Dave
On Wed, 2002-09-18 at 10:58, Michael Paesold wrote:
> Dave,
>
> So do you think it would be a very bad idea to implement the new methods in
> JDBC3 in a way that depends on OID's? Is there any other way to get the
> information about the just inserted generated keys from the backend?
>
> Michael
>
> Dave Cramer wrote:
>
> > Michael,
> >
> > Well, the method in the driver will work for you.
> >
> > dave
> > On Wed, 2002-09-18 at 10:21, Michael Paesold wrote:
> > > Dave Cramer wrote:
> > >
> > > > There is or was actually a method in the driver ResultSet.getLastOID
> > > > which allowed you to do this.You will have to cast the resultset into
> a
> > > > AbstractJdbc(x)ResultSet, where x is the version; but Daryl's way is
> > > > much better since oid's can wrap, and there is a possiblity that they
> > > > don't exist ( you can turn them off in postgres).
> > > >
> > > > Dave
> > >
> > > I don't really care that oid's can wrap. I don't need them as sequences.
> > > Instead I was just looking for the easiest way to get a reference to the
> row
> > > I just inserted.
> > >
> > > So my considerations about getGeneratedKeys() would only work if oid's
> are
> > > not turned off -- very bad for a driver...
> > >
> > > Michael
>
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Paesold 2002-09-18 21:43:14 Re: Implementing JDBC3 methods (Was: JDBC and fetching theOID of an insert)
Previous Message Barry Lind 2002-09-18 17:11:04 Re: just curious