Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BEC192E0129 for ; Thu, 14 Feb 2008 07:29:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 35931-06 for ; Thu, 14 Feb 2008 07:29:12 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id BAEF72E0128 for ; Thu, 14 Feb 2008 07:29:17 -0400 (AST) Received: from 219-89-39-133.dialup.xtra.co.nz ([219.89.39.133] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JPcGz-0007ce-1A; Fri, 15 Feb 2008 00:29:01 +1300 Message-ID: <47B425F9.4050101@opencloud.com> Date: Fri, 15 Feb 2008 00:28:57 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Simon Riggs CC: josh@agliodbs.com, Stephen Denne , Kris Jurka , PostgreSQL - JDBC Subject: Re: JDBC, prepared queries, and partitioning References: <200802131005.30553.josh@agliodbs.com> <1202939756.16770.517.camel@ebony.site> <200802131423.24613.josh@agliodbs.com> <47B37549.3@opencloud.com> <1202944752.16770.568.camel@ebony.site> <47B37BDA.8020702@opencloud.com> <1202973203.16770.581.camel@ebony.site> <47B3EB3B.5050605@opencloud.com> <1202975013.16770.594.camel@ebony.site> In-Reply-To: <1202975013.16770.594.camel@ebony.site> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/87 X-Sequence-Number: 18294 Simon Riggs wrote: > On Thu, 2008-02-14 at 20:18 +1300, Oliver Jowett wrote: >> Simon Riggs wrote: >> >>> But V3 supports having no parameters at all right? >> Yes, but you're missing the point. If you want to, for example, ask for >> metadata about the 4th parameter to the query, there has to *be* a 4th >> parameter. If you fold everything inline, you lose the various >> advantages that having the parameters out of line give you, such as the >> ability to query the server about their characteristics or stream their >> actual values in a binary form separate to the query, etc. > > Right now, people are choosing to use V2 because of the > parameter-folding characteristics. Those people are giving up the things > you mention, plus much much more. I'm suggesting that we make the > parameter folding an option, to allow people to choose. If they need > access to parameter metadata (or other possibilities) then they won't > take advantage of the parameter-folding option. > > I suggest we put the parameter folding option in now, then in 8.4 keep > the option but make it work via a GUC as Tom suggests. To do this in the driver basically needs a separate protocol path. The infrastructure is there for that, but it's not trivial to implement. You could use the existing v3 code as a basis, but there would be a lot of changes necessary as all of the current v3 code assumes it is working with parameterized queries at the protocol level. Does someone who is affected by this want to pick up this approach and send through some patches? I'm a bit nervous about introducing another protocol path since we have enough trouble trying to maintain the existing ones.. -O