Hao Lee <mixt...@gmail.com> writes:
>    When we debugging or hacking the internal, the tedious things is to
> debug step by step the code, so that make sure the PostgreSQL generates the
> right raw syntax tree or query tree or the plans.  Therefore, i think if we
> have a uitility statment to show that, such as, we can using the explain
> statment to ouput  the raw syntax tree of a sql or the query tree, etc

FWIW, I usually just insert pprint() calls at appropriate places (or
even more usually, call it from gdb after setting a breakpoint somewhere).
The places where you want to see a node tree are varied and unpredictable,
so I rather doubt that a utility statement of this sort would be very
helpful.

See also the debug_print_parse, debug_print_rewritten, debug_print_plan
GUCs, which already do more or less what you're suggesting.

All of the above end up dumping into the postmaster log, not to the
client, but IME that's about as convenient if not more so.  You'd be
putting the output into a file anyway.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to