Tom Lane wrote:
> It looks to me like the problem is that some rewrite code got placed in
> pg_parse_and_plan() in postgres.c --- there is some UNION-handling stuff
> going on *after* the call to QueryRewrite(), and evidently that stuff
> is not duplicated in the EXPLAIN case. Probably the right fix is to
> move all that logic inside QueryRewrite() --- but I don't want to touch
> it without confirmation from someone who knows the parser/planner
> better.
It is the job of QueryRewrite() to puzzle/shuffle the nodes
of parsetrees before the planner get's them.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #