Re: reparsing query

Поиск
Список
Период
Сортировка
От Lukas Fittl
Тема Re: reparsing query
Дата
Msg-id CAP53PkwXmiD36d9n8Mf=af5-=xfRmY0m6v5RjiTMjg97DPqAXA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: reparsing query  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Ответы Re: reparsing query  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Список pgsql-hackers
On Wed, Apr 15, 2015 at 2:43 PM, Qingqing Zhou <zhouqq.postgres@gmail.com> wrote:
Is this a proposal to have a better formatted (JSON etc)
debug_print_parse results?

I've run into the need for this as well for monitoring purposes, my solution was to compile the needed object files into a library (see [0]).

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.

I believe the recent work on deparsing DDL statements relates to some of that (i.e. might be re-usable for this purpose, through an extension), if I'm understanding correctly.

[0]: https://github.com/pganalyze/pg_query

Best,
Lukas

--
Lukas Fittl

Skype: lfittl
Phone: +1 415 321 0630

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PATCH: default_index_tablespace
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Turning off HOT/Cleanup sometimes