"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > I am trying to figure out the best way to extract this information. Is there > any > existing code to get all attributes used in the expressions ? Or do I need > to walk the tree and extract that information ?
There are a number of near matches in backend/optimizer/util/var.c, but nothing that has exactly the API you probably want, which I'd think would be to extract a bitmapset of the varattnos of level-zero Vars. contain_var_reference() could be used repeatedly but that seems tremendously inefficient. I'd suggest coding up some new function using what's there for reference. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org