Re: how to use query_tree_walker to get all relations used in a query

2023-08-19 Thread Julien Rouhaud
Hi, On Sat, Aug 19, 2023 at 03:26:06PM +0200, Pierre Forstmann wrote: > > I am trying to get the list of all relations used in a SELECT query using > the post parse analyze hook. > > I can get all relations from top level FROM clause but I cannot get them > for a simple subquery like: > > select *

how to use query_tree_walker to get all relations used in a query

2023-08-19 Thread Pierre Forstmann
Hello, I am trying to get the list of all relations used in a SELECT query using the post parse analyze hook. I can get all relations from top level FROM clause but I cannot get them for a simple subquery like: select * from t1 where x1=(select max(x2) from t2); My current code is: static bool