I have applied the following patch which adds documentation and an
improved error message for an installation that does not use
--with-libxml.
---
Nikolay Samokhvalov wrote:
> On 4/5/07, Bruce Momjian <[EMAIL PROTECTED]> wrote:
> >
> > Nikolay Samokhvalov wrote:
> > [...]
> > > If I am wrong and it's better to leave libxml2-free capabilities, then
> > IMHO
> > > we need to reflect it explicitly in the docs, what requires libxml2, and
> > > what doesn't
> >
> > Agreed, let's do the later and update the documentation.
>
>
> So, you are agreed that I am wrong :-) Well... I would be happy hear some
> arguments, but I cannot insist on it :-)
>
>
> Also, do we
> > output a helpful message if someone tries to use a libxml2 function that
> > isn't available.
>
>
> Yep, here it is:
>
> INSERT INTO xmltest VALUES (1, 'one');
> ERROR: no XML support in this installation
>
> I suppose we should change it to "no libxml2 support in this installation",
> shouldn't we?
>
>
>
> --
> Best regards,
> Nikolay
--
Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/datatype.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v
retrieving revision 1.193
diff -c -c -r1.193 datatype.sgml
*** doc/src/sgml/datatype.sgml 2 Apr 2007 15:27:02 - 1.193
--- doc/src/sgml/datatype.sgml 5 Apr 2007 01:42:38 -
***
*** 3202,3212
advantage over storing XML data in a text field is that it
checks the input values for well-formedness, and there are support
functions to perform type-safe operations on it; see .
! In particular, the xml type can store well-formed
documents, as defined by the XML standard, as well
as content fragments, which are defined by the
production XMLDecl? content in the XML
--- 3202,3214
advantage over storing XML data in a text field is that it
checks the input values for well-formedness, and there are support
functions to perform type-safe operations on it; see . Use of this data type requires the
! installation to have been built with configure
! --with-libxml.
! The xml type can store well-formed
documents, as defined by the XML standard, as well
as content fragments, which are defined by the
production XMLDecl? content in the XML
Index: doc/src/sgml/func.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.374
diff -c -c -r1.374 func.sgml
*** doc/src/sgml/func.sgml 2 Apr 2007 15:27:02 - 1.374
--- doc/src/sgml/func.sgml 5 Apr 2007 01:42:42 -
***
*** 7511,7517
linkend="datatype-xml"> for information about the xml
type. The function-like expressions xmlparse
and xmlserialize for converting to and from
!type xml are not repeated here.
--- 7511,7519
linkend="datatype-xml"> for information about the xml
type. The function-like expressions xmlparse
and xmlserialize for converting to and from
!type xml are not repeated here. Use of many of these
!xml functions requires the installation to have been built
!with configure --with-libxml.
Index: src/backend/utils/adt/xml.c
===
RCS file: /cvsroot/pgsql/src/backend/utils/adt/xml.c,v
retrieving revision 1.39
diff -c -c -r1.39 xml.c
*** src/backend/utils/adt/xml.c 2 Apr 2007 03:49:39 - 1.39
--- src/backend/utils/adt/xml.c 5 Apr 2007 01:42:44 -
***
*** 112,118
#define NO_XML_SUPPORT() \
ereport(ERROR, \
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
! errmsg("no XML support in this installation")))
#define _textin(str) DirectFunctionCall1(textin, CStringGetDatum(str))
--- 112,118
#define NO_XML_SUPPORT() \
ereport(ERROR, \
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
! errmsg("feature not supported; no libxml support in this installation")))
#define _textin(str) DirectFunctionCall1(textin, CStringGetDatum(str))
---(end of broadcast)---
TIP 6: explain analyze is your friend