Re: [PATCH] Caching for stable expressions with constant arguments v3 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Caching for stable expressions with constant arguments v3
Date
Msg-id 22021.1323296672@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Caching for stable expressions with constant arguments v3  (Marti Raudsepp <marti@juffo.org>)
List pgsql-hackers
Marti Raudsepp <marti@juffo.org> writes:
> Let me rephrase that as a question: Does it seem worthwhile to add a
> new argument to ExecInitExpr to handle those two cases?

Possibly.  Another way would be to keep its API as-is and introduce a
different function name for the other behavior.  I would think that
we'd always know for any given caller which behavior we need, so a
flag as such isn't notationally helpful.

> Does relying
> on the PlanState argument being NULL seem like a bad idea for any
> reason?

Yes, that seemed like a pretty horrid idea when I read your description,
but I hadn't got round to looking at just how awful it might be.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Marti Raudsepp
Date:
Subject: Re: [PATCH] Caching for stable expressions with constant arguments v3
Next
From: Robert Haas
Date:
Subject: Re: documentation issue - extensions