Re: [HACKERS] Early evaluation of constant expresions (with PATCH)
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] Early evaluation of constant expresions (with PATCH) |
Дата | |
Msg-id | 355.938014534@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Early evaluation of constant expresions (with PATCH) (Bernard Frankpitt <frankpit@pop.dn.net>) |
Список | pgsql-hackers |
Bernard Frankpitt <frankpit@pop.dn.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
В списке pgsql-hackers по дате отправления: