Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8DC84636252 for ; Fri, 3 Apr 2009 18:16:56 -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 20852-05 for ; Fri, 3 Apr 2009 18:16:50 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 29AE7635E49 for ; Fri, 3 Apr 2009 18:16:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mx1.hub.org (Postfix) with ESMTP id C8891125A927 for ; Fri, 3 Apr 2009 18:16:54 -0300 (ADT) Received: from [192.168.1.141] (adsl-71-128-101-241.dsl.irvnca.pacbell.net [71.128.101.241]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail63.csoft.net (Postfix) with ESMTP id F076328406; Fri, 3 Apr 2009 17:16:51 -0400 (EDT) Message-ID: <49D67CC1.80100@ejurka.com> Date: Fri, 03 Apr 2009 14:16:49 -0700 From: Kris Jurka User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Scott Murphy CC: pgsql-jdbc@postgresql.org Subject: Re: autogenerated keys is not supported in 8.4dev-700 as specified in the changelog References: <8A40010480284A7F9F26B653131E8FF5@pictageinc.com> In-Reply-To: <8A40010480284A7F9F26B653131E8FF5@pictageinc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/2 X-Sequence-Number: 19449 Scott Murphy wrote: > > The changelog for 8.4dev-700 says: > > "Implement basic generated keys support." > > I still get "org.postgresql.util.PSQLException: Returning autogenerated keys > is not supported." > > If I get the latest source and build it myself, it works. > > Are autogenerated keys not supported in dev-700? They are for Statements, but not PreparedStatements. That was overlooked and didn't go into the -700 release, but has gone into CVS since then. > Also, I noticed that the way it is written, all statements return generated > keys. "RETURNING" is added to all insert statements. You should only get generated keys if you ask for them. Apparently you're always asking for them or there is some kind of bug going on. > Wouldn't it be better to let the developer add RETURNING to their SQL > statement rather than forcing all columns back? That way if the > developer expects generated keys, they just need to modify their SQL. Developers are free to completely ignore the getGeneratedKeys interface and write RETURNING statements themselves. The whole point is to do it portably so your code works against other databases as well. > When do you guys plan on the next dev70x release? > There are no firm plans at the moment, probably another month or two. Kris Jurka