Re: [HACKERS] --enable-xml instead of --with-libxml?
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] --enable-xml instead of --with-libxml? |
Дата | |
Msg-id | 200704050147.l351lSi18429@momjian.us обсуждение исходный текст |
Ответы |
Re: [HACKERS] --enable-xml instead of --with-libxml?
|
Список | pgsql-patches |
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 <bruce@momjian.us> 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, '<value>one</value>'); > 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 <bruce@momjian.us> 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 -0000 1.193 --- doc/src/sgml/datatype.sgml 5 Apr 2007 01:42:38 -0000 *************** *** 3202,3212 **** advantage over storing XML data in a <type>text</type> field is that it checks the input values for well-formedness, and there are support functions to perform type-safe operations on it; see <xref ! linkend="functions-xml">. </para> <para> ! In particular, the <type>xml</type> type can store well-formed <quote>documents</quote>, as defined by the XML standard, as well as <quote>content</quote> fragments, which are defined by the production <literal>XMLDecl? content</literal> in the XML --- 3202,3214 ---- advantage over storing XML data in a <type>text</type> field is that it checks the input values for well-formedness, and there are support functions to perform type-safe operations on it; see <xref ! linkend="functions-xml">. Use of this data type requires the ! installation to have been built with <command>configure ! --with-libxml</>. </para> <para> ! The <type>xml</type> type can store well-formed <quote>documents</quote>, as defined by the XML standard, as well as <quote>content</quote> fragments, which are defined by the production <literal>XMLDecl? content</literal> 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 -0000 1.374 --- doc/src/sgml/func.sgml 5 Apr 2007 01:42:42 -0000 *************** *** 7511,7517 **** linkend="datatype-xml"> for information about the <type>xml</type> type. The function-like expressions <function>xmlparse</function> and <function>xmlserialize</function> for converting to and from ! type <type>xml</type> are not repeated here. </para> <sect2> --- 7511,7519 ---- linkend="datatype-xml"> for information about the <type>xml</type> type. The function-like expressions <function>xmlparse</function> and <function>xmlserialize</function> for converting to and from ! type <type>xml</type> are not repeated here. Use of many of these ! <type>xml</type> functions requires the installation to have been built ! with <command>configure --with-libxml</>. </para> <sect2> 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 -0000 1.39 --- src/backend/utils/adt/xml.c 5 Apr 2007 01:42:44 -0000 *************** *** 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))
В списке pgsql-patches по дате отправления: