Re: function(contants) evaluated for every row - Mailing list pgsql-hackers

From Tom Lane
Subject Re: function(contants) evaluated for every row
Date
Msg-id 16830.1290628342@sss.pgh.pa.us
Whole thread Raw
In response to function(contants) evaluated for every row  (Bruce Momjian <bruce@momjian.us>)
Responses Re: function(contants) evaluated for every row
Re: function(contants) evaluated for every row
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Notice the to_date()'s were not converted to constants in EXPLAIN so
> they are evaluated for every row.  to_date() is marked STABLE.

> Is this something we should improve?

No.  This is per expectation.  Only IMMUTABLE functions can be folded to
constants in advance of the query.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: function(contants) evaluated for every row
Next
From: Bruce Momjian
Date:
Subject: Re: function(contants) evaluated for every row