On Fri, Oct 4, 2013 at 4:42 AM, Karol Trzcionka <karlikt@gmail.com> wrote:
> W dniu 04.10.2013 02:51, Robert Haas pisze:
>> Do you have a link to previous discussion on the mailing list?
> Sorry, most of discussion was at IRC channel.
>> I'm not positive there's enough information available
>> at that stage, but if p_target_rangetblentry is populated at that
>> point, you should be able to make AFTER.x translate to a Var
>> referencing that range table entry.
> It's not enough. Even if we know "where we are", there are more issues.
> The main question is: how should we pass information about "hello, I'm
> specific Var, don't evaluate me like others"?
My point is that AFTER.x doesn't appear to need any special marking;
it means the same thing as target_table.x. BEFORE.x *does* need some
kind of special marking, and I admit I'm not sure what that should
look like. Maybe an RTE is OK, but letting that RTE get into the join
planning machinery does not seem good; that's going to result in funky
special cases all over the place.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company