Re: JDBC 3.0 support?

From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Hanasaki JiJi <hanasaki(at)hanaden(dot)com>
Cc: PostgreSQL JDBC - LIST <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC 3.0 support?
Date: 2003-05-07 09:43:56
Message-ID: 1052300635.14269.142.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

INSERT .... RETURNING will work here, but in the meantime

select nextval('sequence_name');
insert into (id,....) values ( result from above, ....)
continue working

Dave
On Tue, 2003-05-06 at 23:13, Hanasaki JiJi wrote:
> Any suggestions for architecture/implemenation in the following situation:?
> - insert a new row
> - primary key is an autoinc / sequence column
> - no other column is sure to be unique
> - need to continue working with the data of the row
> after the insert and possibly do an update
>
> Barry Lind wrote:
> > Hanasaki,
> >
> > The driver is already 3.0 compliant for that. It correctly returns
> > false to DatabaseMetaData.supportsGetGeneratedKeys() indicating that
> > postgresql does not support this functionality. This isn't likely to
> > change unless some significant new functionality is introduced in the
> > server to do this. There isn't really anything the driver can do here
> > since the functionality doesn't exist in the database to automatically
> > return this information.
> >
> > thanks,
> > --Barry
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave(at)micro-automation(dot)net>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Curt Sampson 2003-05-07 10:39:32 Re: Postgres Issue with JDBC
Previous Message Barry Lind 2003-05-07 05:06:39 Re: JDBC 3.0 support?