Tim Landscheidt <t...@tim-landscheidt.de> writes:
> It seems that XMLPARSE() is called for every row without
> PostgreSQL realizing that it is IMMUTABLE.

Indeed, the system doesn't consider it immutable.  None of the examples
you show would benefit if it did, though.

I believe there are GUC-parameter dependencies that prevent us from
treating it as truly immutable, but if you want to ignore that
consideration and force constant-folding anyway, you could wrap it
in a SQL function that's marked as IMMUTABLE.

                        regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to