mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Various fixes in the logic of XML functions:
- Add new SQL command SET XML OPTION (also available via regular GUC) to control the DOCUMENT vs. CONTENT option in implicit parsing and serialization operations. - Subtle corrections in the handling of the standalone property in xmlroot(). - Allow xmlroot() to work on content fragments. - Subtle corrections in the handling of the version property in xmlconcat(). - Code refactoring for producing XML declarations.
This commit is contained in:
@@ -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/include/utils/xml.h,v 1.12 2007/01/20 09:27:20 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/xml.h,v 1.13 2007/01/25 11:53:51 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -34,6 +34,14 @@ extern Datum xmlconcat2(PG_FUNCTION_ARGS);
|
||||
extern Datum texttoxml(PG_FUNCTION_ARGS);
|
||||
extern Datum xmlvalidate(PG_FUNCTION_ARGS);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XML_STANDALONE_YES,
|
||||
XML_STANDALONE_NO,
|
||||
XML_STANDALONE_NO_VALUE,
|
||||
XML_STANDALONE_OMITTED
|
||||
} XmlStandaloneType;
|
||||
|
||||
extern xmltype *xmlconcat(List *args);
|
||||
extern xmltype *xmlelement(XmlExprState *xmlExpr, ExprContext *econtext);
|
||||
extern xmltype *xmlparse(text *data, bool is_doc, bool preserve_whitespace);
|
||||
@@ -53,4 +61,12 @@ typedef enum
|
||||
|
||||
extern XmlBinaryType xmlbinary;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XMLOPTION_DOCUMENT,
|
||||
XMLOPTION_CONTENT
|
||||
} XmlOptionType;
|
||||
|
||||
extern XmlOptionType xmloption;
|
||||
|
||||
#endif /* XML_H */
|
||||
|
Reference in New Issue
Block a user