Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 3CBA32E0247 for ; Thu, 14 Feb 2008 01:59:57 -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 72113-04 for ; Thu, 14 Feb 2008 01:59:52 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 546292E0246 for ; Thu, 14 Feb 2008 01:59:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1E5xRpw001443; Thu, 14 Feb 2008 00:59:27 -0500 (EST) To: Oliver Jowett cc: Simon Riggs , josh@agliodbs.com, Stephen Denne , Kris Jurka , PostgreSQL - JDBC Subject: Re: JDBC, prepared queries, and partitioning In-reply-to: <47B37F51.2010003@opencloud.com> 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> <47B37F51.2010003@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Thu, 14 Feb 2008 12:37:53 +1300" Date: Thu, 14 Feb 2008 00:59:26 -0500 Message-ID: <1442.1202968766@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/82 X-Sequence-Number: 18289 Oliver Jowett writes: > Another possibility is to make the unnamed statement behaviour in the > server more aggressive. Upthread I suggested making that conditional on a GUC variable ... does that seem reasonable? We've touched on how a "clean" solution to this would require a protocol change, but I'm not convinced that a change at the protocol-message level is all that great a solution. That way means that only the lowest layer on the client side has any direct access to the options; and that layer is really the least likely to understand what the best choice for a given query is. So you immediately are faced with having to design client-side APIs to expose the behavior upward. For instance JDBC would need to expose an API to calling applications, and the same for libpq and other client libraries. If we drive this off a GUC variable then the extra signaling is already solved, or at worst soluble with a general-purpose API addition that can address other issues too. regards, tom lane