Example query causing param_info to be set in plain rel path

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Example query causing param_info to be set in plain rel path
Date: 2013-10-25 09:22:12
Message-ID: CAFjFpRcqVjq1VqhtGgmc6UA0fty1Ya7AZRqhShH31EZVSaEy2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,
In order to test various cases of LATERAL join in Postgres-XC, I am trying
to find a query where RelOptInof->lateral_relids would get set for plain
base relations. I tried various examples like below. But none of them was
able to set lateral_relids in RelOptInfo of the involved relations. I am
using current master branch.

select * from tab1 left join lateral (select * from tab2 where tab2.val =
tab1.val2) q using(val);
This just pulled up the qual at higher level.

select * from tab1 left join lateral (select sum(val2) sum_val2, val from
tab2 where tab2.val2 = tab1.val2 group by tab2.val) q using(val);

This at least caused the outer reference to be added as parameter, but
again no lateral_relid.

Is there an example query (however impractial query it would be), which can
make the lateral_relids set in RelOptInfo of plain base relation?
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2013-10-25 10:02:35 Document update in alter_foreign_data_wrapper.sgml
Previous Message Kyotaro HORIGUCHI 2013-10-25 06:25:50 Re: Re: Using indexes for ORDER BY and PARTITION BY clause in windowing functions