Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 617949FB66C for ; Fri, 16 Feb 2007 00:30:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 26749-09 for ; Fri, 16 Feb 2007 00:30:54 -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 E72DF9FB67E for ; Fri, 16 Feb 2007 00:30:53 -0400 (AST) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20070216043049.2205; Fri, 16 Feb 2007 04:30:49 Message-ID: <45D53379.8070902@kensystem.com> Date: Thu, 15 Feb 2007 21:30:49 -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> <45D24BF2.6010405@kensystem.com> <45D3E22F.9050009@kensystem.com> <45D4311A.6050308@gtech-ua.com> <45D4EF6A.4000608@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/78 X-Sequence-Number: 16634 Kris Jurka wrote: > > The correct version check should be written: > if (connection.haveMinimumServerVersion("8.2")) > I will correct this. > I'm also not sure about the getGeneratedKeys method. Should we throw an > Exception instead of returning an empty ResultSet if there weren't any > generated keys? I checked and the spec says: "If this Statement object did not generate any keys, an empty ResultSet object is returned." If there is an implied rules elsewhere that it is not this simple, I dont know. Otherwise it seems correct. Also do we need to do better tracking of what comes > from generated keys vs just regular results? I believe you are correct; if that method is called not-after executeUpdate(String sql, ?), it should throw and exception.. or something... the spec does not seem to elaborate on this. Once people start using > this functionality we'll need some better error checking. Agreed in full.