Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4D0579FB79C for ; Tue, 13 Feb 2007 19:38:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 31063-10 for ; Tue, 13 Feb 2007 19:38:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id BC5869FB73B for ; Tue, 13 Feb 2007 19:38:29 -0400 (AST) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20070213233827.55044; Tue, 13 Feb 2007 23:38:27 Message-ID: <45D24BF2.6010405@kensystem.com> Date: Tue, 13 Feb 2007 16:38:26 -0700 From: Ken Johanson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Kris Jurka CC: pgsql-jdbc@postgresql.org Subject: Re: Synthesize support for Statement.getGeneratedKeys()? References: <4580E681.3080106@kensystem.com> <45B9A9D6.2080100@kensystem.com> <45BECBA1.8080508@kensystem.com> In-Reply-To: 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.002 tagged_above=0 required=5 tests=BAYES_50, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200702/52 X-Sequence-Number: 16608 Kris Jurka wrote: > > > On Mon, 29 Jan 2007, Ken Johanson wrote: > >> Hi Kris, were you able to look at this? If time wont permit that I'll >> dig back in; though I'd prefer not to duplicate any work your're >> doing, of course. > > Taking another look the obvious problem is that you haven't touched > AbstractJdbc3Statement.getGeneratedKeys. It still reads: > > public ResultSet getGeneratedKeys() throws SQLException > { > return createDriverResultSet(new Field[0], new Vector()); > } > > So an empty ResultSet is not surprising. > > Kris Jurka Kris, sorry my response is late. Sometimes I get distracted by life :-) Thanks for pointing that out. I missed the obvious. The following replacement for that methods works; I can get the generated keys (in conjunction with my previous patches). I have not tested this exhaustively, nor given though about the correctness of the null-normalization below; is this enough for you or someone to commit the changes? Thanks, Ken public ResultSet getGeneratedKeys() throws SQLException { return result==null ? createDriverResultSet(new Field[0], new Vector()) : result.getResultSet(); }