When "debug_print_parse" is "on", only the Query structure tree is dumped, the raw parse tree is not dumped to log. In some cases, viewing raw parse trees are also helpful. It is very hard to view a tree by watching variables in a debugger, so I added the following code in my local:
When I debug the code, I care more about Query structure, debug_print_parse is enough for me.
In the debugger, various tools are available, including nodeToString() and Python scripts.
I usually use the gdbpg tools in [1]. But it was too old. It can't support the newest version well.
Before submitting this trivial patch, I still want to confirm with the community if it's intentional to not dump raw parse tree? If we really don't want to dump raw parse tree again "debug_print_parse", are you ok to add a new option "debug_print_raw_parse"?
If you want to add this, I prefer to "debug_print_raw_parse". You should also add documentation to explain this new GUC.