Re: Updateable ResultSet doesn't fetch sequence-generated values

From: Kris Jurka <books(at)ejurka(dot)com>
To: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Updateable ResultSet doesn't fetch sequence-generated values
Date: 2009-07-27 06:26:26
Message-ID: alpine.BSO.2.00.0907270224270.10084@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 26 Jul 2009, Clemens Eisserer wrote:

> I am using a library which is using the JDBCRowSet API, in order to bind
> a user-interface with a SQL database. The library relies on auto
> generated primary keys (I am using sequences for this task), however
> after inserting, the key-column with the server-side generated value is
> set to 0. I am porting the application from MySQL-5.0 to PostgreSQL-8.3,
> and MySQL sets the key-column to the value generated by auto_increment.
>
> Am I doing something wrong here, or is it a bug? Is that behaviour
> specified at all?

I don't know whether it's unspecified or a bug, but the PG driver doesn't
do this at the moment.

http://pgfoundry.org/tracker/index.php?func=detail&aid=1010520&group_id=1000224&atid=857

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2009-07-27 06:30:22 Re: No suitable driver found
Previous Message Clemens Eisserer 2009-07-26 20:12:48 Re: Implicit sequence with start value?