Minor point about contrib/xml2 functions "IMMUTABLE" marking - Mailing list pgsql-hackers

From John Gray
Subject Minor point about contrib/xml2 functions "IMMUTABLE" marking
Date
Msg-id pan.2005.10.10.13.08.06.858309@azuli.co.uk
Whole thread Raw
Responses Re: Minor point about contrib/xml2 functions "IMMUTABLE" marking
List pgsql-hackers
Hi,

I did see the message about the change of the function signatures to
include IMMUTABLE and thought "Yes, that makes sense" - however, it has
now occurred to me that:

1. xpath_table uses a SELECT query to fetch the data it uses, so should
presumably be marked STABLE?

2. xslt_process is to be considered IMMUTABLE if the stylesheet or
document are literal values, but if either is a URL then they are fetched
on evaluation. An optimisation down to one call of xslt_process (using the
URL contents current at that point) almost certainly conforms with "least
surprise" for most use cases, but it's not strictly true as a second call
could return a different result - comments?

It may be that neither of these has a significant practical impact for
most users, but I thought it might be worth flagging, now that I've been
working on contrib/xml2 again[*]

Regards

John

[*] I've written an XML output function that composes the XML document
structure based on the SQL join hierarchy; I'll post something on hackers
for comments in the near future. This may or may not have been rendered
redundant by the SQL/XML work recently added!


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: LDAP Authentication?
Next
From: Daniel Schuchardt
Date:
Subject: COALESCE bug