Re: When do we lose column names?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: When do we lose column names?
Date: 2012-02-14 22:39:58
Message-ID: 10731.1329259198@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> 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
> <https://bitbucket.org/adunstan/pgdevel/changesets/tip/rowexprs>. 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,
http://archives.postgresql.org/pgsql-hackers/2011-11/msg01031.php
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-02-14 22:54:03 Re: Bugs/slowness inserting and indexing cubes
Previous Message Alexander Korotkov 2012-02-14 22:09:24 Re: Bugs/slowness inserting and indexing cubes