Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E5BC59F926B for ; Mon, 5 Nov 2007 23:25:48 -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 68341-01 for ; Mon, 5 Nov 2007 23:25:45 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 171B19F9269 for ; Mon, 5 Nov 2007 23:25:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA63PYrM006896; Mon, 5 Nov 2007 22:25:36 -0500 (EST) To: Oliver Jowett cc: Kevin Neufeld , pgsql-jdbc@postgresql.org Subject: Re: Parsed Query Trees In-reply-to: <472F9EFC.7020406@opencloud.com> References: <472F6509.10908@refractions.net> <472F9EFC.7020406@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Tue, 06 Nov 2007 11:53:48 +1300" Date: Mon, 05 Nov 2007 22:25:34 -0500 Message-ID: <6895.1194319534@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/7 X-Sequence-Number: 17762 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