Re: [HACKERS] Early evaluation of constant expresions (with PATCH)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bernard Frankpitt <frankpit(at)pop(dot)dn(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Early evaluation of constant expresions (with PATCH)
Date: 1999-09-22 15:35:34
Message-ID: 355.938014534@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bernard Frankpitt <frankpit(at)pop(dot)dn(dot)net> writes:
>> .... (Actually, now
>> that I look at it, it looks like the functions rather than the
>> operators are missing the necessary preinitialization. Perhaps at
>> the place where you chose to put this in, setFcache has already
>> been done?)

> The functions work because the funcid field in the Func node is already
> filled in, and the EvalQual code uses this field to generate the
> Fcache.

Oh, OK. Cool. For some reason I was thinking that the planner
was supposed to generate the fcache entry somewhere along the line.

> All points well taken. I don't have time to do this thoroughly right
> now, but I will get back to it.

OK, or I will work on it if I get to it before you do. As Thomas
remarked, you've provided a great starting point --- thanks!

I know I already have one patch from you that I promised to integrate,
but I'm up to my ass in buffer refcount bugs :-(. As soon as I can come
up for air, I will stick in this code, though I think I will call it
from somewhere near cnfify per prior discussion.

>> Bruce points out in another reply that the proiscachable field of
>> pg_proc is intended for exactly this purpose.

> Perhaps adding another option to create function is in order here.

Actually, create function *has* an iscachable option which sets that
field. According to glimpse, it's the only code in the system that
knows the field exists :-(

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-09-22 15:48:29 Re: [DOCS] INSTALL file (was Re: [HACKERS] Re: HISTORY for 6.5.2)
Previous Message Bernard Frankpitt 1999-09-22 15:34:32 Re: [HACKERS] Early evaluation of constant expresions (with PATCH)