Re: Parsed Query Trees - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Parsed Query Trees
Date
Msg-id 6895.1194319534@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parsed Query Trees  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Parsed Query Trees
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> 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

pgsql-jdbc by date:

Previous
From: "Andres Olarte"
Date:
Subject: How to get the SQL query from a PreparedStatement?
Next
From: Kevin Neufeld
Date:
Subject: Re: Parsed Query Trees