Re: Parsed Query Trees

From: Kevin Neufeld <kneufeld(at)refractions(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Parsed Query Trees
Date: 2007-11-06 04:47:03
Message-ID: 472FF1C7.4030306@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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 <oliver(at)opencloud(dot)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
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2007-11-06 07:45:46 Re: How to get the SQL query from a PreparedStatement?
Previous Message Tom Lane 2007-11-06 03:25:34 Re: Parsed Query Trees