When and how many times does ExecSetParamPlan executes?

Поиск
Список
Период
Сортировка
От Vaibhav Kaushal
Тема When and how many times does ExecSetParamPlan executes?
Дата
Msg-id 1301070976.4573.9.camel@localhost
обсуждение исходный текст
Ответы Re: When and how many times does ExecSetParamPlan executes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello all, 

I was going through the Expression Evaluator and was trying to
understand how the expressions are formed and evaluated. I was informed
on the IRC channel that the PARAM nodes are quite important and many
well written client applications use PARAMs for sending query to the
backend. I found while looking at the ExecEvalParam function that a call
is made to the ExecSetParamPlan for the first time when the PARAM is
caught in the ExprState tree.

I am confused about how many times the call is made to the
ExecSetParamPlan funtion. Since the executor runs the expression
evaluator for each tuple (trying to find qual satisfaction) while the
expression tree is created only once, the possibility (from my
viewpoint) is that the ExecSetParamPlan might be called once only; which
would be when the first PARAM is encountered during the query execution.
OR, it might get called individually for each tuple (when the PARAM node
is caught in the tree). 

So I am confused about which case is it? Does it (ExecSetParamPlan) get
called on per-tuple basis or first encounter in the qual/expression
evaluation basis? 

Kindly help.

Regards, 
Vaibhav



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: 2nd Level Buffer Cache
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Set hint bits upon eviction from BufMgr