Re: Is there a way to view a rewritten query?
От | Chris Green |
---|---|
Тема | Re: Is there a way to view a rewritten query? |
Дата | |
Msg-id | 20041203090357.GB627@areti.co.uk обсуждение исходный текст |
Ответ на | Is there a way to view a rewritten query? (Jonathan Knopp <pgsql@delegated.net>) |
Список | pgsql-general |
On Thu, Dec 02, 2004 at 09:32:35PM -0800, Jonathan Knopp wrote: > 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. > someone please tell me there's a simple way of doing this cause i'm > ready to take a hammer to my computer. > One rather clumsy way to do it is to have a script which drops the whole query and rule set and then recreates it. I do this when creating views. I have a separate window open with my editor showing the script in question, nicely formatted. In the psql window I can then just \i the script and see the diagnostics, then go back to the edit window and edit the original and try again. -- Chris Green (chris@areti.co.uk) "Never ascribe to malice, that which can be explained by incompetence."
В списке pgsql-general по дате отправления: