Unix Technical Forum

definition of evalfunc for execution of join condition

This is a discussion on definition of evalfunc for execution of join condition within the pgsql Hackers forums, part of the PostgreSQL category; --> ExecQual evaluates join conditions one at a time.It captures one condition and passes it to function ExecEvalExpr which is ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 06:12 AM
Esha Palta
 
Posts: n/a
Default definition of evalfunc for execution of join condition

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( which is 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);

The actual function called is probably be one of the ones in backend/executor/execQual.c.
In execQual.c there are routines for evaluating each type of exprState nodes. Routines are normally called via the ExecEvalExpr macro.
Every function in execQual.c calls ExecEvalExpr macro by passing it as argument containing object of ExprState which consist of evalfunc(routine) to call for execution of node.

I am not able to find out definition of function that is passed to ExecEvalExpr macro using an object of ExprState type.
Please help me if you understand the problem.
Basically I want to know the defination of function where join conditions are evaluated(for example may be for Nested Loop Joins)
Thanx in advance
Esha



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 06:12 AM
Jonah H. Harris
 
Posts: n/a
Default Re: definition of evalfunc for execution of join condition

If I understood your question, the following info may be what you're looking
for.

ExecNestLoop gets the join qualifications and passes them to ExecQual for
each outer tuple. Each qualification is checked in ExecQual using the
ExecEvalExpr macro which calls the function pointer evalfunc for each
ExprState. Iff a FALSE qualification result is found, qualification fails
and a FALSE is returned for that tuple. The functions used for
ExprState->evalfunc are defined in ExecInitExpr for each nodeTag.

Is that what you were looking for?


On 10/12/05, Esha Palta <esha@it.iitb.ac.in> 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( which is 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);
>
> The actual function called is probably be one of the ones in
> backend/executor/execQual.c.
> In execQual.c there are routines for evaluating each type of exprState
> nodes. Routines are normally called via the ExecEvalExpr macro.
> Every function in execQual.c calls ExecEvalExpr macro by passing it as
> argument containing object of ExprState which consist of evalfunc(routine)
> to call for execution of node.
>
> I am not able to find out definition of function that is passed to
> ExecEvalExpr macro using an object of ExprState type.
> Please help me if you understand the problem.
> Basically I want to know the defination of function where join conditions
> are evaluated(for example may be for Nested Loop Joins)
> Thanx in advance
> Esha
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>




--
Respectfully,

Jonah H. Harris, Database Internals Architect
EnterpriseDB Corporation
http://www.enterprisedb.com/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:02 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com