Where the Quals are actually 'List'ed

Started by Vaibhav Kaushalalmost 15 years ago3 messages
#1Vaibhav Kaushal
vaibhavkaushal123@gmail.com

Hi,

I find that ExecInitExpr creates a ExprState tree (and so say the
comments above the function in the source). Also, it seems to decide
which function would get called when the expression is to be evaluated
when ExecQual runs, by setting the function pointer, for example:

bstate->xprstate.evalfunc = (ExprStateEvalFunc)ExecEvalAnd;

But ExecQual goes through a List, whereas, ExecInitExpr creates a tree.
So is that same tree converted to a qual list or are we adding some more
information.

Vaibhav (*_*)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Vaibhav Kaushal (#1)
Re: Where the Quals are actually 'List'ed

Vaibhav Kaushal <vaibhavkaushal123@gmail.com> writes:

Hi,
I find that ExecInitExpr creates a ExprState tree (and so say the
comments above the function in the source). Also, it seems to decide
which function would get called when the expression is to be evaluated
when ExecQual runs, by setting the function pointer, for example:

bstate->xprstate.evalfunc = (ExprStateEvalFunc)ExecEvalAnd;

But ExecQual goes through a List, whereas, ExecInitExpr creates a tree.
So is that same tree converted to a qual list or are we adding some more
information.

ExecInitExpr produces a List of state trees from a List of expr trees
--- look at the last case in its switch.

regards, tom lane

#3Vaibhav Kaushal
vaibhavkaushal123@gmail.com
In reply to: Tom Lane (#2)
Re: Where the Quals are actually 'List'ed

On Mon, 2011-02-07 at 11:16 -0500, Tom Lane wrote:

Vaibhav Kaushal <vaibhavkaushal123@gmail.com> writes:

Hi,
I find that ExecInitExpr creates a ExprState tree (and so say the
comments above the function in the source). Also, it seems to decide
which function would get called when the expression is to be evaluated
when ExecQual runs, by setting the function pointer, for example:

bstate->xprstate.evalfunc = (ExprStateEvalFunc)ExecEvalAnd;

But ExecQual goes through a List, whereas, ExecInitExpr creates a tree.
So is that same tree converted to a qual list or are we adding some more
information.

ExecInitExpr produces a List of state trees from a List of expr trees
--- look at the last case in its switch.

regards, tom lane

Thanks a lot for the help sir. Got the point :)

-Vaibhav(*_*)