Re: Is there a way to view a rewritten query?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is there a way to view a rewritten query?
Дата
Msg-id 22245.1102092164@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is there a way to view a rewritten query?  (Jonathan Knopp <pgsql@delegated.net>)
Список pgsql-general
Jonathan Knopp <pgsql@delegated.net> writes:
> I'm trying to set up some complex rules and having a hard time figuring
> out why they won't work. Being able to see the query after all the rules
> have been applied would be a huge help, but I can't seem to find a way
> to do this. log_statement only shows the original. debug_print_rewritten
> works, but displays it in such a way as to be virtually unusable.

Sorry, but that's all there is.  The rewriter isn't a source-to-source
transformation.

(If you feel like hacking, it might be interesting to try applying
the ruleutils.c functions to the rewritten querytree, but I'm quite
unsure how readable the result will be.)

            regards, tom lane

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

Предыдущее
От: "Ed L."
Дата:
Сообщение: Re: reclaiming diskspace bloat w/near-zero downtime
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Indexes?