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 ([EMAIL PROTECTED]) "Never ascribe to malice, that which can be explained by incompetence." ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly