Marti Raudsepp <> writes:
> On Sun, Dec 4, 2011 at 22:53, Heikki Linnakangas
> <> 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

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to