Re: [PATCH] Caching for stable expressions with constant arguments v3
От | Tom Lane |
---|---|
Тема | Re: [PATCH] Caching for stable expressions with constant arguments v3 |
Дата | |
Msg-id | 136.1323106270@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCH] Caching for stable expressions with constant arguments v3 (Marti Raudsepp <marti@juffo.org>) |
Ответы |
Re: [PATCH] Caching for stable expressions with constant
arguments v3
|
Список | pgsql-hackers |
Marti Raudsepp <marti@juffo.org> writes: > On Sun, Dec 4, 2011 at 22:53, Heikki Linnakangas > <heikki.linnakangas@enterprisedb.com> wrote: >> This comment in RelationGetExpressions() also worries me: > [...] >> Do the injected CacheExprs screw up that equality? Or the constraint >> exclusion logic in predtest.c? > I suspect these cases are guaranteed not to produce any CacheExprs. > They're always immutable expressions. If they contain Var references > they're stored as is (not cachable); if not, they're folded to a > constant. > But I will have to double-check all the callers; it might be a good > idea to disable caching anyway in these cases. I think if you have some call sites inject CacheExprs and others not, it will get more difficult to match up expressions that should be considered equal. On the whole this seems like a bad idea. What is the reason for having such a control boolean in the first place? regards, tom lane
В списке pgsql-hackers по дате отправления: