Re: [HACKERS] Example query causing param_info to be set in plain rel path

2013-12-18 Thread Ashutosh Bapat
I got an example where paths for plain rel require param_info i.e. plain rel scans require to take care of the lateral references. Here's the example from PG regression explain verbose select v.* from (int8_tbl x left join (select q1,(select coalesce(q2,0)) q2 from int8_tbl) y on x.q2 = y.q1)

Re: [HACKERS] Example query causing param_info to be set in plain rel path

2013-10-28 Thread Ashutosh Bapat
No adding OFFSET there too didn't give the expected result. The lateral was handled in subquery and passed as param to the underlying table scan. I am particularly interested in tables (unlike functions or subqueries) since, the table scans are shipped to the datanodes and I wanted to test the eff

Re: [HACKERS] Example query causing param_info to be set in plain rel path

2013-10-25 Thread Tom Lane
Ashutosh Bapat writes: > 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 think you need a lateral reference in a function or VALUES FROM-item. As you say, plain sub-selects ar

[HACKERS] Example query causing param_info to be set in plain rel path

2013-10-25 Thread Ashutosh Bapat
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