Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0E5389F9282 for ; Tue, 6 Nov 2007 00:47:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08729-06 for ; Tue, 6 Nov 2007 00:47:16 -0400 (AST) Received: from pd2mo3so.prod.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by postgresql.org (Postfix) with ESMTP id 1CA8F9F9281 for ; Tue, 6 Nov 2007 00:47:16 -0400 (AST) Received: from pd3mr3so.prod.shaw.ca (pd3mr3so-qfe3.prod.shaw.ca [10.0.141.179]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JR2002EGIMIL610@l-daemon> for pgsql-jdbc@postgresql.org; Mon, 05 Nov 2007 21:47:06 -0700 (MST) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd3mr3so.prod.shaw.ca (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0JR200466IMH7T20@pd3mr3so.prod.shaw.ca> for pgsql-jdbc@postgresql.org; Mon, 05 Nov 2007 21:47:06 -0700 (MST) Received: from [192.168.1.100] ([24.68.138.141]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JR20093YIMGE680@l-daemon> for pgsql-jdbc@postgresql.org; Mon, 05 Nov 2007 21:47:05 -0700 (MST) Date: Mon, 05 Nov 2007 20:47:03 -0800 From: Kevin Neufeld Subject: Re: Parsed Query Trees In-reply-to: <6895.1194319534@sss.pgh.pa.us> To: pgsql-jdbc@postgresql.org Message-id: <472FF1C7.4030306@refractions.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <472F6509.10908@refractions.net> <472F9EFC.7020406@opencloud.com> <6895.1194319534@sss.pgh.pa.us> User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/8 X-Sequence-Number: 17763 Hmmm. Thanx guys. I didn't clue in that the parsetrees underwent constant change - they obviously do since query syntax changes all the time. I'm clearly going to have to approach my problem from a different angle. Cheers, Kevin Tom Lane wrote: > Oliver Jowett writes: > >> Kevin Neufeld wrote: >> >>> Does anyone know if a parsed query tree object is exposed in the jdbc >>> API? I couldn't find any such thing, nor could I find it in the >>> developers roadmap. >>> > > >> No, and the reason is that the JDBC driver doesn't actually parse the >> query beyond some basic manipulations to find parameter placeholders and >> so on. All the real parsing happens on the server side, and I don't know >> of a way to get access to the server's query tree as a client. (It's >> debatable how useful that would be, anyway) >> > > I'd very strongly resist exposing the server's parsetrees to clients, > because then changing them would represent a protocol break, and we > change them constantly. > > If you're desperate to have an editing facility like this, put it into > server-side code ... and expect to revise it at every major release. > > regards, tom lane >