Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CF2DD634B59 for ; Mon, 27 Jul 2009 04:00:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 23236-02-6 for ; Mon, 27 Jul 2009 07:00:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail.postgresql.org (Postfix) with ESMTP id 3498E6359EC for ; Mon, 27 Jul 2009 03:26:28 -0300 (ADT) Received: by leary.csoft.net (Postfix, from userid 1112) id 6A055A2E2; Mon, 27 Jul 2009 02:26:26 -0400 (EDT) Date: Mon, 27 Jul 2009 02:26:26 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Clemens Eisserer cc: pgsql-jdbc@postgresql.org Subject: Re: Updateable ResultSet doesn't fetch sequence-generated values In-Reply-To: <194f62550907261310v740cd3f9p8a98fa0a81fcf4f7@mail.gmail.com> Message-ID: References: <194f62550907261310v740cd3f9p8a98fa0a81fcf4f7@mail.gmail.com> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.025 tagged_above=-10 required=5 tests=AWL=0.025 X-Spam-Level: X-Archive-Number: 200907/68 X-Sequence-Number: 19836 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