Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> One thing that concerns me about making even greater use of "$n" is
> the potential for confusion with generic plan parameters.
True.
> Another possibility is to put the SubPlan and InitPlan names inline,
> rather than outputting "FROM SubPlan ...". I had a go at hacking that
> up and this was the result:
> Output: (($3 = (InitPlan 1).$0) AND ($4 = (InitPlan 1).$1) AND
> ((($1 = (SubPlan 2).$3) AND ($2 = (SubPlan 2).$4))))
Hmm. I guess what bothers me about that is that it could be read to
suggest that the initplan or subplan is evaluated again for each
output parameter. Perhaps it'll be sufficiently clear as long as
we keep the labeling
> InitPlan 1 (returns $0,$1)
> SubPlan 2 (returns $3,$4)
but I'm not sure. Anybody else have an opinion?
(I didn't read your changes to the code yet --- I think at this
point we can just debate proposed output without worrying about
how to implement it.)
regards, tom lane