Re: Analyze plan of foreign data wrapper

2018-07-03 Thread Mathieu PUJOL
I read it many times but I'am not entirely familiar with concepts of range table and I'am not sure to fully understant all implications. For now I have a workaround by parsing only plan's target list and by checking if resorigtbl is equal to oid of my table. The main drawback is that I can't detect

Re: Analyze plan of foreign data wrapper

2018-07-03 Thread Laurenz Albe
Mathieu PUJOL wrote: > I understand that I should also use varno to check which table is referenced > by varattno. In case of Join, aggregation, etc. Sometimes I get a number or > INNER_VAR or OUTER_VAR. > I am lost on how i could resolve this. > I understand that OUTER_VAR/INNER_VAR are related

Re: Analyze plan of foreign data wrapper

2018-06-29 Thread Mathieu PUJOL
Hi, I understand that I should also use varno to check which table is referenced by varattno. In case of Join, aggregation, etc. Sometimes I get a number or INNER_VAR or OUTER_VAR. I am lost on how i could resolve this. I understand that OUTER_VAR/INNER_VAR are related to joins sub plans. Is outer

Re: Analyze plan of foreign data wrapper

2018-06-28 Thread Laurenz Albe
Mathieu PUJOL wrote: > I'am writing a foreign data wrapper. To avoid returning data for a column > that is not used, I parse 'targetlist' and 'qual' of the Plan. > I'am able to find Var nodes but I can't figure out how i could now if this > node is related to a column my foreign table. For a Var

Analyze plan of foreign data wrapper

2018-06-28 Thread Mathieu PUJOL
Hello! I'am writing a foreign data wrapper. To avoid returning data for a column that is not used, I parse 'targetlist' and 'qual' of the Plan. I'am able to find Var nodes but I can't figure out how i could now if this node is related to a column my foreign table. I guess that the field 'location'