Re: execution of nested loop joins

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: execution of nested loop joins
Дата
Msg-id 20051006160621.GE10127@svana.org
обсуждение исходный текст
Ответ на execution of nested loop joins  (Esha Palta <esha@it.iitb.ac.in>)
Список pgsql-hackers
On Thu, Oct 06, 2005 at 09:14:02PM +0530, Esha Palta wrote:
> ExecQual evaluates join conditions one at a time.It captures one
> condition and passes it to function ExecEvalExpr which is actually a
> macro that invokes another function evalfunc(a method of ExprState
> structure).

It's not a "method" of the ExprState structure in the way object
oriented people might think. It's a function pointer that is set to the
function PostgreSQL wants to use to evaluate the expression. It's of
type:

typedef Datum (*ExprStateEvalFunc) (ExprState *expression,                ExprContext *econtext,                bool
*isNull,               ExprDoneCond *isDone); 

It's more like a virtual method where whoever created the structure
decides which method to use. the actual function called will probably
be one of the ones in backend/executor/execQual.c. Object-orientation
for C.

> I am not getting implementation and use of this evalfunc function. Is
> this function used to evaluate the join condition or not. If yes, then
> how it does this.

It does, using one of the defined expression evaluation functions.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Esha Palta
Дата:
Сообщение: execution of nested loop joins
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: PG function call