Re: [GENERAL] possible to create multivalued index from xpath() results in 8.3?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] possible to create multivalued index from xpath() results in 8.3?
Date: 2007-11-21 15:27:38
Message-ID: 10361.1195658858@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> The spec doesn't allow casts between xml and text (varchar) at all. The way
> I appear to have derived the current behavior from the spec is that this is
> interpreted as an implicit XMLSERIALIZE call in the context of a prepared
> statement, which is defined to observe the XML option, as per clause 17.3
> (part 14). This was the clostest piece of spec that described conversion
> from xml to character types. Now with the xpath functionality, there is
> certainly a strong use case for ignoring this altogether and just serializing
> with the XML option set to "content".

Given the actual behavior of xmltotext_with_xmloption, it certainly
seems like a pretty useless error check. Also, xml_out doesn't behave
that way, so why should xmltotext?

The volatility markings of xml_in and texttoxml seem wrong too.
It looks to me like we need:

xml_in should be STABLE because it depends on xmloption
xml_recv ditto (OK already)
xml_out correctly(?) marked IMMUTABLE
xml_send is STABLE, OK because it depends on client_encoding
texttoxml should be STABLE because it depends on xmloption
xmltotext remove xmloption dependency, mark as IMMUTABLE

Should we force initdb to correct these pg_proc entries, or just quietly
change pg_proc.h?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo De León 2007-11-21 15:41:03 Re: Table filter
Previous Message Pau Marc Munoz Torres 2007-11-21 15:22:13 loading a funtion script from a file

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2007-11-21 15:29:57 Re: backup_label and server start
Previous Message Simon Riggs 2007-11-21 14:49:51 Re: Postgres 8.3 archive_command