Re: Traversing targetlist to find accessed columns

2022-12-03 Thread Tom Lane
Amin writes: > Having a query, I am trying to find out all the columns that need to be > accessed (their varattno and vartype). I have access to a targetlist > representing a tree like this. So, I am looking for a function that > recursively traverses the tree and gives me the VARs. So, for SELECT

Traversing targetlist to find accessed columns

2022-12-03 Thread Amin
Hi, Having a query, I am trying to find out all the columns that need to be accessed (their varattno and vartype). I have access to a targetlist representing a tree like this. So, I am looking for a function that recursively traverses the tree and gives me the VARs. So, for SELECT a,b,b+c from tab