Re: XMLPARSE() evaluated multiple times? - Mailing list pgsql-performance

From Tom Lane
Subject Re: XMLPARSE() evaluated multiple times?
Date
Msg-id 26293.1248119643@sss.pgh.pa.us
Whole thread Raw
In response to XMLPARSE() evaluated multiple times?  (Tim Landscheidt <tim@tim-landscheidt.de>)
List pgsql-performance
Tim Landscheidt <tim@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

pgsql-performance by date:

Previous
From: Kenny Gorman
Date:
Subject: Re: Used computers?
Next
From: Krade
Date:
Subject: Re: Full text search with ORDER BY performance issue