Re: possible to create multivalued index from xpath() results in 8.3? - Mailing list pgsql-general

From Tom Lane
Subject Re: possible to create multivalued index from xpath() results in 8.3?
Date
Msg-id 22363.1195616296@sss.pgh.pa.us
Whole thread Raw
In response to Re: possible to create multivalued index from xpath() results in 8.3?  ("Matt Magoffin" <postgresql.org@msqr.us>)
List pgsql-general
"Matt Magoffin" <postgresql.org@msqr.us> writes:
> Ugh, you're right of course! Somehow I had this wrong. So I tried to
> create an index on the xml[] result by casting to text[] but I got the
> "function must be immutable" error. Is there any reason the xml[] to
> text[] cast is not immutable?

Hmm ... I see that xmltotext() is marked 'stable' in pg_proc.h,
but texttoxml() is marked 'immutable', which is at best inconsistent.
It looks to me like they both depend on the GUC setting "xmloption",
which would mean they should both be stable.  Peter, is there a bug
there?  Also, is there a way to get rid of the GUC dependency so that
there's a reasonably safe way to index XML values?

            regards, tom lane

pgsql-general by date:

Previous
From: "Matt Magoffin"
Date:
Subject: Re: possible to create multivalued index from xpath() results in 8.3?
Next
From: Richard Broersma Jr
Date:
Subject: Re: VB ADODB .Open failing