Re: HOT patch, missing things - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HOT patch, missing things
Date
Msg-id 18229.1187100477@sss.pgh.pa.us
Whole thread Raw
In response to Re: HOT patch, missing things  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
List pgsql-hackers
"Pavan Deolasee" <pavan.deolasee@gmail.com> 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Testing the async-commit patch
Next
From: Tom Lane
Date:
Subject: Re: HOT patch, missing things