Re: Problem in ExecEvalExpr function

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: sandeep satpal <sandeep(at)it(dot)iitb(dot)ac(dot)in>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem in ExecEvalExpr function
Date: 2005-10-18 13:38:05
Message-ID: 36e682920510180638k182ee870s84749bb7782b7668@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sandeep,

You seem to be having a lot of trouble understanding the evaluation code
which isn't that complex. Are you still trying to do that case-insensitive
comparison? If so, I seriously recommend that you just look at the citext
project on gborg and stop messing around in the backend, it's just going to
get ya into trouble.

On 10/18/05, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
>
> On Tue, Oct 18, 2005 at 02:38:39PM +0530, sandeep satpal wrote:
> >
> > Hi,
> >
> > I have some doubts related to ExecEvalExpr functions which is used to
> > executing the expression.
>
> Since they are operators, they go through ExecEvalOper. However, after
> the first call they go through ExecMakeFunctionResult. The operator has
> an oid which is used to find the function and it is eventually called
> using FunctionCallInvoke.
>
> Note, ExecEvalExpr is a macro, so you can't break on it.
>
> > Here we are finding the subexpression recursively.
> > But I am not able to find it out that where exactly the comparison
> taking
> > place.
> > For eg.
> > relation A
> > id name age
> > relation B
> > name age status
> >
> > if query is
> > select id , name , age , status from A , B where A.name <http://A.name>=
> B.name <http://B.name> and A.age
> > = B.age.
>
> Note that if the operator appears in the OPERATOR CLASS and the
> optimizer has determined that it can use an index, it won't go through
> this code at all, instead using the compare function in _bt_compare.
>
> > Then parser find this "and" condition and divide this into two
> expression.
> > But I am not getting in which function exactly these comparison between
> > tupleslot taking place.
>
> FunctionCallInvoke will be calling the function for operator =.
>
> Have a nice day,
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)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.
>
>
>

--
Respectfully,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2005-10-18 14:52:11 Call for translators
Previous Message Martijn van Oosterhout 2005-10-18 09:35:27 Re: Problem in ExecEvalExpr function