Skip site navigation (1) Skip section navigation (2)

Re: XMLPARSE() evaluated multiple times?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Landscheidt <tim(at)tim-landscheidt(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: XMLPARSE() evaluated multiple times?
Date: 2009-07-20 19:54:03
Message-ID: 26293.1248119643@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Tim Landscheidt <tim(at)tim-landscheidt(dot)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

In response to

pgsql-performance by date

Next:From: KradeDate: 2009-07-20 20:48:54
Subject: Re: Full text search with ORDER BY performance issue
Previous:From: Kenny GormanDate: 2009-07-20 19:21:02
Subject: Re: Used computers?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group