Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C850A632C96 for ; Fri, 1 May 2009 18:06:11 -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 76895-03 for ; Fri, 1 May 2009 18:06:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail3.videx.com (mail3.videx.com [65.122.251.14]) by mail.postgresql.org (Postfix) with ESMTP id E367F632A2C for ; Fri, 1 May 2009 18:06:07 -0300 (ADT) Received: from [191.10.58.1] ([191.10.58.1]) (authenticated user adamb@videx.com) by mail3.videx.com for pgsql-jdbc@postgresql.org; Fri, 1 May 2009 14:06:04 -0700 Message-ID: <49FB6438.9060000@videx.com> Date: Fri, 01 May 2009 14:06:00 -0700 From: Adam B User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: A basic Statement.getGeneratedKeys() implementation (patch attached) References: <49FB5E2D.4020105@videx.com> In-Reply-To: Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.673 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.672 X-Spam-Level: * X-Archive-Number: 200905/8 X-Sequence-Number: 19558 =3C!DOCTYPE html PUBLIC =22-//W3C//DTD HTML 4=2E01 Transitional//EN=22=3E= =3Chtml=3E =3Chead=3E =3Cmeta content=3D=22text/html=3Bcharset=3DUS-ASCII=22 http-equiv=3D=22Co= ntent-Type=22=3E =3C/head=3E =3Cbody bgcolor=3D=22=22 text=3D=22=23000000=22=3E Kris Jurka wrote=3A =3Cblockquote cite=3D=22mid=3APine=2EBSO=2E4=2E64=2E0905011649310=2E13271= =40leary=2Ecsoft=2Enet=22 type=3D=22cite=22=3E=3Cbr=3E =3Cbr=3E On Fri=2C 1 May 2009=2C Adam B wrote=3A =3Cbr=3E =3Cbr=3E =3Cblockquote type=3D=22cite=22=3EOur webapp relies heavily on JDBC=27s= Statement=2EgetGeneratedKeys=28=29 =3Cbr=3E abstraction=2E=26nbsp=3B We are investigating switching from Mysql to Postg= re so I =3Cbr=3E created a basic implementation of this feature in the 8=2E3-604 version of =3Cbr=3E the driver=2E=26nbsp=3B The diff patch is attached=2E =3Cbr=3E =3C/blockquote=3E =3Cbr=3E This has some pretty severe restrictions and some more that aren=27t mentioned =28overriding getUpdateCount=28=29=2C not using the V2 protocol w= hich has nothing to do with JDBC2/3=29=2E=26nbsp=3B We=27ve implemented generate= d key support in CVS for the upcoming 8=2E4 release that is more robust=2C but makes some other tradeoffs =28returning all columns rather that just a single key=29=2E=26nbsp=3B Could you test this out in your application=3F= =3Cbr=3E =3C/blockquote=3E I=27d be glad to give that a try=2E=26nbsp=3B I=27m all for an official imp= lementation as long as it=27s reasonably fast=2E=26nbsp=3B However I probably wont be a= ble to get to it for about a week =28vacation=29=2E=3Cbr=3E =3Cblockquote cite=3D=22mid=3APine=2EBSO=2E4=2E64=2E0905011649310=2E13271= =40leary=2Ecsoft=2Enet=22 type=3D=22cite=22=3E=3Cbr=3E CVS info here=3A =3Cbr=3E =3Cbr=3E =3Ca class=3D=22moz-txt-link-freetext=22 href=3D=22http=3A//jdbc=2Epostgres= ql=2Eorg/development/cvs=2Ehtml=22=3Ehttp=3A//jdbc=2Epostgresql=2Eorg/devel= opment/cvs=2Ehtml=3C/a=3E =3Cbr=3E =3Cbr=3E A thread discussing how it doesn=27t work for a Spring application here=3A= =3Cbr=3E =3Cbr=3E =3Ca class=3D=22moz-txt-link-freetext=22 href=3D=22http=3A//archives=2Epost= gresql=2Eorg//pgsql-jdbc/2009-04/threads=2Ephp=2300081=22=3Ehttp=3A//archiv= es=2Epostgresql=2Eorg//pgsql-jdbc/2009-04/threads=2Ephp=2300081=3C/a=3E =3Cbr=3E =3Cbr=3E Kris Jurka =3Cbr=3E =3C/blockquote=3E =3Cbr=3E =3CBR /=3E =3CBR /=3E =3CHR /=3E Videx=26nbsp=3BInc=2E=26nbsp=3B1105=26nbsp=3BN=2E=26nbsp=3BE=2E=26nbsp=3BCi= rcle=26nbsp=3BBlvd=2E=26nbsp=3BCorvallis=26nbsp=3BOR=26nbsp=3B97330=26nbsp= =3B=28541=29=26nbsp=3B758-0521=3CBR /=3E CONFIDENTIAL=26nbsp=3BCOMMUNICATION=3A=26nbsp=3BThe=26nbsp=3Bemail=26nbsp= =3Bmessage=26nbsp=3Band=26nbsp=3Bany=26nbsp=3Battachments=26nbsp=3Bare=26nb= sp=3Bintended=26nbsp=3Bonly=26nbsp=3Bfor=26nbsp=3Bthe=26nbsp=3Baddressee=2E= =26nbsp=3B=26nbsp=3BThey=26nbsp=3Bmay=26nbsp=3Bbe=26nbsp=3Bprivileged=2C=26= nbsp=3Bconfidential=2C=26nbsp=3Band=26nbsp=3Bprotected=26nbsp=3Bfrom=26nbsp= =3Bdisclosure=2E=26nbsp=3BIf=26nbsp=3Byou=26nbsp=3Bare=26nbsp=3Bnot=26nbsp= =3Bthe=26nbsp=3Bintended=26nbsp=3Brecipient=2C=26nbsp=3Bany=26nbsp=3Bdissem= ination=2C=26nbsp=3Bdistribution=2C=26nbsp=3Bor=26nbsp=3Bcopying=26nbsp=3Bi= s=26nbsp=3Bexpressly=26nbsp=3Bprohibited=2E=26nbsp=3B=26nbsp=3BIf=26nbsp=3B= you=26nbsp=3Breceived=26nbsp=3Bthis=26nbsp=3Bemail=26nbsp=3Bmessage=26nbsp= =3Bin=26nbsp=3Berror=2C=26nbsp=3Bplease=26nbsp=3Bnotify=26nbsp=3Bthe=26nbsp= =3Bsender=26nbsp=3Bimmediately=26nbsp=3Bby=26nbsp=3Breplying=26nbsp=3Bto=26= nbsp=3Bthis=26nbsp=3Be-mail=26nbsp=3Bmessage=26nbsp=3Bor=26nbsp=3Bby=26nbsp= =3Btelephone=3CBR /=3E =3C/body=3E =3C/html=3E