Re: reparsing query - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: reparsing query
Date
Msg-id CAJjS0u0spV=PKF96rxwA=kpdfN880UGFbwDRmqK9CYTmpzzqoA@mail.gmail.com
Whole thread Raw
In response to Re: reparsing query  (Lukas Fittl <lukas@fittl.com>)
Responses Re: reparsing query
Re: reparsing query
List pgsql-hackers
On Wed, Apr 15, 2015 at 5:19 PM, Lukas Fittl <lukas@fittl.com> wrote:
> It'd be interesting to explore if there is some way to make this less
> hack-ish, and enable tools to parse queries in a better way. Essentially
> what is needed is some way to reliably translate SQL into an AST-like
> output, from an outside tool, whilst reusing the current PostgreSQL parser.
>
It is not difficult to output parsed query in some tool readable
format but it comes with a maintain overhead: once tools rely on it,
we have to conform to some schema continuously, like the xml/xmlns. Do
we want to take this? Depends on how far the tools can go with this
exposed information.

We actually already have explain command in json format and tools
drawing/analyzing query plan rely on it. Will that work for your
scenario?

Regards,
Qingqing



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: PATCH: default_index_tablespace
Next
From: Alvaro Herrera
Date:
Subject: Re: Improve sleep processing of pg_rewind TAP tests