Andrew Dunstan <> writes:
> On 02/13/2012 11:00 AM, Tom Lane wrote:
>> This is surely fixable by passing a bit more information down.  If you
>> (Andrew) have something that covers everything but this issue, pass it
>> over and I'll take a whack at it.

> What I have fixes one of the three cases I have identified that appear 
> to need fixing, the one that caused the json tests to crash with your 
> original partial patch. See 
> <>. I 
> won't have time to return to this for a few days. The two remaining 
> cases should be fairly independent I think. If you don't get to this 
> before then I'll look at the flatten_join_alias_vars_mutator case again 
> and try to fix it based on the above, and then give you what I've got.

OK, I fixed this up and committed it.  I made some cosmetic changes
(the most notable being that the definition of RowExpr is really
changing here, and so should its comment).  The adjust_appendrel_attrs
situation was fixed by passing in the PlannerInfo, which is something
that probably should have been made available all along --- there are
very few nontrivial functions in the planner that don't need it.

I'm still a bit annoyed by the behavior I mentioned here,
that we don't get "real" column names from an unflattened VALUES RTE.
Might be worth looking into that, but I don't have time for it.

                        regards, tom lane

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to