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