X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A118D52828 for ; Wed, 15 Jun 2005 10:37:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99577-09 for ; Wed, 15 Jun 2005 13:37:07 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 9F0AA52818 for ; Wed, 15 Jun 2005 10:37:05 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DiY4r-0005Pl-E1; Thu, 16 Jun 2005 01:37:09 +1200 Message-ID: <42B02F05.7000209@opencloud.com> Date: Thu, 16 Jun 2005 01:37:09 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: List Subject: Re: patch for passing the cts References: <2BC23AE7-6381-41BA-AE89-CC81D1C932A7@fastcrypt.com> <42AF6682.6000405@opencloud.com> <42AFB291.6070405@opencloud.com> <379C1838-A611-4DB0-92D5-EF78C2FCFB1E@fastcrypt.com> In-Reply-To: <379C1838-A611-4DB0-92D5-EF78C2FCFB1E@fastcrypt.com> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/78 X-Sequence-Number: 13040 Dave Cramer wrote: > What about making the output of the current query parser a little more > flexible, and putting some of the intelligence in the executor. > > More specifically, the parser currently breaks things up into fragments > which are very easily re-assembled by the executor. Instead use the > strategy below The parsing is protocol-specific (different handling of multiple-statement queries is the main thing), and we only need the extra parsing complexity when we are handling a {call} escape. We need an escape parser anyway since the backend doesn't know anything about the JDBC escapes, so we'll have two parse steps going on anyway unless you want to integrate that, too, into the query executor. I can't see an obvious clean way of integrating this with the call escape handling without duplicating lots of code and entangling the high-level statement code with the low-level protocol details. I'd prefer to see the query rewriting for {call} all happen in one place in a protocol-independent way, and ideally only for the case when {call} is actually used. I really don't have any spare time for working on this in any detail :( I'll swallow my objections if nothing better comes along, but I fear that code turning into an unmaintainable mess. -O