Gregory Stark <stark@enterprisedb.com> writes:
> This crashes, apparently it tries to look up the result type on a NULL
> planstate:
Tsk tsk, running CVS HEAD without Asserts?
It looks like things are getting initialized in the wrong order. Maybe
we need to attach the initplan lower down.
> Incidentally, why are the parentheses required around the second branch of the
> union?
AFAICT, the spec's grammar won't let you put WITH there at all, even
with the parens; but it's definitely invalid without --- note their
distinction between <query expression> and <query expression body>.
We'll see if we can make it work in PG though.
regards, tom lane