Re: reparsing query
От | Lukas Fittl |
---|---|
Тема | Re: reparsing query |
Дата | |
Msg-id | CAP53Pky1-K5y1EZypmdhPvzH3UoUd3SLdrokte4-fktydDeStw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: reparsing query (Qingqing Zhou <zhouqq.postgres@gmail.com>) |
Список | pgsql-hackers |
On Wed, Apr 15, 2015 at 8:39 PM, Qingqing Zhou <zhouqq.postgres@gmail.com> wrote:
My thought was more along the lines of making something like raw_parser + nodeToString available through an extension, but with a JSON output format.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?
Sure, that would work - but as I understand adding an explicit SQL command (or function) is not something that would ever be merged into Postgres core. Especially since that command's output could easily change across versions.
Note that an important detail in the monitoring case is that you don't necessarily have the statement's underlying relations available (since you might work with statistics data on a different machine).
Best,
Lukas
--
Lukas Fittl
Skype: lfittl
Phone: +1 415 321 0630
Skype: lfittl
Phone: +1 415 321 0630
В списке pgsql-hackers по дате отправления: