From 7888b52076562ba770ccfd863dc3c3c984788703 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Nov 2007 12:21:05 +0000 Subject: Make casts from xml to text independent of the XML option setting, thus immutable and indexable. Also fix the volatility settings of some other XML-related functions. --- src/backend/utils/adt/xml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/xml.c') diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 777910791aa..07ca7a8e780 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.60 2007/11/25 12:08:11 petere Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.61 2007/11/27 12:21:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -535,7 +535,8 @@ xmltotext(PG_FUNCTION_ARGS) { xmltype *data = PG_GETARG_XML_P(0); - PG_RETURN_TEXT_P(xmltotext_with_xmloption(data, xmloption)); + /* It's actually binary compatible. */ + return (text *) data; } -- cgit v1.2.3