Update FSM on WAL replay. This is a bit limited; the FSM is only updated
[PostgreSQL.git] / src / include / utils / xml.h
blob3989271a5a7d6c28163d4156a8cc6b8c2bacbc06
1 /*-------------------------------------------------------------------------
3 * xml.h
4 * Declarations for XML data type support.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
15 #ifndef XML_H
16 #define XML_H
18 #include "fmgr.h"
19 #include "nodes/execnodes.h"
20 #include "nodes/primnodes.h"
22 typedef struct varlena xmltype;
24 #define DatumGetXmlP(X) ((xmltype *) PG_DETOAST_DATUM(X))
25 #define XmlPGetDatum(X) PointerGetDatum(X)
27 #define PG_GETARG_XML_P(n) DatumGetXmlP(PG_GETARG_DATUM(n))
28 #define PG_RETURN_XML_P(x) PG_RETURN_POINTER(x)
30 extern Datum xml_in(PG_FUNCTION_ARGS);
31 extern Datum xml_out(PG_FUNCTION_ARGS);
32 extern Datum xml_recv(PG_FUNCTION_ARGS);
33 extern Datum xml_send(PG_FUNCTION_ARGS);
34 extern Datum xmlcomment(PG_FUNCTION_ARGS);
35 extern Datum xmlconcat2(PG_FUNCTION_ARGS);
36 extern Datum texttoxml(PG_FUNCTION_ARGS);
37 extern Datum xmltotext(PG_FUNCTION_ARGS);
38 extern Datum xmlvalidate(PG_FUNCTION_ARGS);
39 extern Datum xpath(PG_FUNCTION_ARGS);
41 extern Datum table_to_xml(PG_FUNCTION_ARGS);
42 extern Datum query_to_xml(PG_FUNCTION_ARGS);
43 extern Datum cursor_to_xml(PG_FUNCTION_ARGS);
44 extern Datum table_to_xmlschema(PG_FUNCTION_ARGS);
45 extern Datum query_to_xmlschema(PG_FUNCTION_ARGS);
46 extern Datum cursor_to_xmlschema(PG_FUNCTION_ARGS);
47 extern Datum table_to_xml_and_xmlschema(PG_FUNCTION_ARGS);
48 extern Datum query_to_xml_and_xmlschema(PG_FUNCTION_ARGS);
50 extern Datum schema_to_xml(PG_FUNCTION_ARGS);
51 extern Datum schema_to_xmlschema(PG_FUNCTION_ARGS);
52 extern Datum schema_to_xml_and_xmlschema(PG_FUNCTION_ARGS);
54 extern Datum database_to_xml(PG_FUNCTION_ARGS);
55 extern Datum database_to_xmlschema(PG_FUNCTION_ARGS);
56 extern Datum database_to_xml_and_xmlschema(PG_FUNCTION_ARGS);
58 typedef enum
60 XML_STANDALONE_YES,
61 XML_STANDALONE_NO,
62 XML_STANDALONE_NO_VALUE,
63 XML_STANDALONE_OMITTED
64 } XmlStandaloneType;
66 extern xmltype *xmlconcat(List *args);
67 extern xmltype *xmlelement(XmlExprState *xmlExpr, ExprContext *econtext);
68 extern xmltype *xmlparse(text *data, XmlOptionType xmloption, bool preserve_whitespace);
69 extern xmltype *xmlpi(char *target, text *arg, bool arg_is_null, bool *result_is_null);
70 extern xmltype *xmlroot(xmltype *data, text *version, int standalone);
71 extern bool xml_is_document(xmltype *arg);
72 extern text *xmltotext_with_xmloption(xmltype *data, XmlOptionType xmloption_arg);
74 extern char *map_sql_identifier_to_xml_name(char *ident, bool fully_escaped, bool escape_period);
75 extern char *map_xml_name_to_sql_identifier(char *name);
76 extern char *map_sql_value_to_xml_value(Datum value, Oid type);
78 extern void AtEOXact_xml(void);
80 typedef enum
82 XMLBINARY_BASE64,
83 XMLBINARY_HEX
84 } XmlBinaryType;
86 extern int xmlbinary; /* XmlBinaryType, but int for guc enum */
88 extern int xmloption; /* XmlOptionType, but int for guc enum */
90 #endif /* XML_H */