Re: Optimze usage of immutable functions as relation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Optimze usage of immutable functions as relation
Date
Msg-id 19453.1564166435@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimze usage of immutable functions as relation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> * It would be useful for the commentary to point out that in principle we
> could pull up any immutable (or, probably, even just stable) expression;
> but we don't, (a) for fear of multiple evaluations of the result costing
> us more than we can save, and (b) because a primary goal is to let the
> constant participate in further const-folding, and of course that won't
> happen for a non-Const.

BTW, so far as I can see, none of the test cases demonstrate that such
further const-folding can happen.  Since this is all pretty processing-
order-sensitive, I think an explicit test that that's possible would
be a good idea.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimze usage of immutable functions as relation
Next
From: Tom Lane
Date:
Subject: Re: seems like a bug in pgbench -R