Re: [GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-21 Thread Ronan Dunklau
So, according to your advice, I've looked at the IndexScan implementation and here is what I came up with. At execution time, if I find an operation expression involving a Param, the param expression is evaluated with ExecEvalExpr (after being "initted" on the fly), and then considered exactly the

Re: [GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-20 Thread Tom Lane
Ronan Dunklau writes: > Now, if I query my table like this (a subquery, joined on the outer query), > what info should I be able to parse from the PlanState ? > select name, (select max(value) from test t2 where t2.name = t1.name) as max > from test t1; > I don't really know much about postgresq

[GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-20 Thread Ronan Dunklau
Hello. Sorry if this is not the appropriate mailing list, but I understood that I needed to post here first. Warning: I'm not a native english speaker ;) I'm implementing a Foreign Data Wrapper, and I'm trying to "optimize" it by parsing the required columns and simple "quals" from the foreignsc