Search Postgresql Archives

Re: Analyze plan of foreign data wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 v, v->varattno contains the attribute number of the column.
That is the same as the attnum column in pg_attribute.

If v->varattno == 0, it is a whole-row reference, like in

   SELECT mytab FROM mytab;

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux