Re: reparsing query

From: Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com>
To: Lukas Fittl <lukas(at)fittl(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andrzej Barszcz <abusinf(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reparsing query
Date: 2015-04-16 03:39:04
Message-ID: CAJjS0u0spV=PKF96rxwA=kpdfN880UGFbwDRmqK9CYTmpzzqoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 15, 2015 at 5:19 PM, Lukas Fittl <lukas(at)fittl(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-04-16 03:51:05 Re: Improve sleep processing of pg_rewind TAP tests
Previous Message Amit Kapila 2015-04-16 03:33:25 Re: PATCH: default_index_tablespace