PostgreSQL Source Code
git master
|
#include "executor/tablefunc.h"
#include "fmgr.h"
#include "nodes/execnodes.h"
#include "nodes/primnodes.h"
Go to the source code of this file.
Macros | |
#define | PG_GETARG_XML_P(n) DatumGetXmlP(PG_GETARG_DATUM(n)) |
#define | PG_RETURN_XML_P(x) PG_RETURN_POINTER(x) |
Typedefs | |
typedef struct varlena | xmltype |
typedef struct PgXmlErrorContext | PgXmlErrorContext |
Enumerations | |
enum | XmlStandaloneType { XML_STANDALONE_YES , XML_STANDALONE_NO , XML_STANDALONE_NO_VALUE , XML_STANDALONE_OMITTED } |
enum | XmlBinaryType { XMLBINARY_BASE64 , XMLBINARY_HEX } |
enum | PgXmlStrictness { PG_XML_STRICTNESS_LEGACY , PG_XML_STRICTNESS_WELLFORMED , PG_XML_STRICTNESS_ALL } |
Variables | |
PGDLLIMPORT int | xmlbinary |
PGDLLIMPORT int | xmloption |
PGDLLIMPORT const TableFuncRoutine | XmlTableRoutine |
#define PG_GETARG_XML_P | ( | n | ) | DatumGetXmlP(PG_GETARG_DATUM(n)) |
#define PG_RETURN_XML_P | ( | x | ) | PG_RETURN_POINTER(x) |
typedef struct PgXmlErrorContext PgXmlErrorContext |
enum PgXmlStrictness |
enum XmlBinaryType |
enum XmlStandaloneType |
Definition at line 51 of file xml.h.
References PG_DETOAST_DATUM.
Referenced by ExecEvalXmlExpr(), xmlconcat(), and XmlTableSetDocument().
char* escape_xml | ( | const char * | str | ) |
Definition at line 2695 of file xml.c.
References appendStringInfoCharMacro, appendStringInfoString(), buf, initStringInfo(), and str.
Referenced by ExplainProperty(), ExplainPropertyList(), map_sql_value_to_xml_value(), and XmlTableGetValue().
Definition at line 2378 of file xml.c.
References appendBinaryStringInfo(), appendStringInfo(), appendStringInfoString(), Assert, buf, ident, initStringInfo(), NO_XML_SUPPORT, pg_mblen(), and pg_strncasecmp().
Referenced by database_to_xml_internal(), map_multipart_sql_identifier_to_xml_name(), map_sql_catalog_to_xmlschema_types(), map_sql_schema_to_xmlschema_types(), map_sql_table_to_xmlschema(), query_to_xml_internal(), schema_to_xml_internal(), SPI_sql_row_to_xmlelement(), and transformXmlExpr().
Definition at line 2476 of file xml.c.
References appendStringInfoString(), ARR_ELEMTYPE, buf, DATE_NOT_FINITE, DatumGetArrayTypeP, DatumGetBool(), DatumGetByteaPP, DatumGetDateADT(), DatumGetTimestamp(), deconstruct_array(), EncodeDateOnly(), EncodeDateTime(), ereport, errcode(), errdetail(), errmsg(), ERROR, escape_xml(), get_typlenbyvalalign(), getBaseType(), getTypeOutputInfo(), i, initStringInfo(), j2date(), MAXDATELEN, OidOutputFunctionCall(), pfree(), PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pg_xml_done(), pg_xml_init(), PG_XML_STRICTNESS_ALL, POSTGRES_EPOCH_JDATE, pstrdup(), str, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, type, type_is_array_domain, USE_XSD_DATES, value, VARDATA_ANY, VARSIZE_ANY_EXHDR, xml_ereport(), xmlbinary, and XMLBINARY_BASE64.
Referenced by ExecEvalXmlExpr(), SPI_sql_row_to_xmlelement(), and xmlelement().
char* map_xml_name_to_sql_identifier | ( | const char * | name | ) |
Definition at line 2434 of file xml.c.
References appendBinaryStringInfo(), appendStringInfoString(), buf, initStringInfo(), MAX_UNICODE_EQUIVALENT_STRING, name, pg_mblen(), and pg_unicode_to_server().
Referenced by get_rule_expr().
void pg_xml_done | ( | PgXmlErrorContext * | errcxt, |
bool | isError | ||
) |
bool pg_xml_error_occurred | ( | PgXmlErrorContext * | errcxt | ) |
PgXmlErrorContext* pg_xml_init | ( | PgXmlStrictness | strictness | ) |
Referenced by map_sql_value_to_xml_value(), pgxml_parser_init(), xmlelement(), XmlTableInitOpaque(), and xmltotext_with_options().
void pg_xml_init_library | ( | void | ) |
void xml_ereport | ( | PgXmlErrorContext * | errcxt, |
int | level, | ||
int | sqlcode, | ||
const char * | msg | ||
) |
Definition at line 1117 of file xml.c.
References arg, ErrorSaveContext::error_occurred, GetDatabaseEncoding(), NO_XML_SUPPORT, and XMLOPTION_DOCUMENT.
Referenced by ExecEvalXmlExpr().
Definition at line 553 of file xml.c.
References appendBinaryStringInfo(), appendStringInfoString(), generate_unaccent_rules::args, buf, DatumGetXmlP(), initStringInfo(), len, lfirst, NO_XML_SUPPORT, pfree(), PointerGetDatum(), str, stringinfo_to_xmltype(), text_to_cstring(), VARHDRSZ, VARSIZE, and x.
Referenced by ExecEvalXmlExpr(), and xmlconcat2().
xmltype* xmlelement | ( | XmlExpr * | xexpr, |
Datum * | named_argvalue, | ||
bool * | named_argnull, | ||
Datum * | argvalue, | ||
bool * | argnull | ||
) |
Definition at line 857 of file xml.c.
References arg, XmlExpr::args, buf, ERROR, exprType(), forboth, i, lappend(), lfirst, map_sql_value_to_xml_value(), XmlExpr::named_args, NIL, NO_XML_SUPPORT, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pg_xml_done(), pg_xml_init(), PG_XML_STRICTNESS_ALL, str, strVal, and xml_ereport().
Referenced by ExecEvalXmlExpr().
xmltype* xmlparse | ( | text * | data, |
XmlOptionType | xmloption_arg, | ||
bool | preserve_whitespace | ||
) |
Definition at line 981 of file xml.c.
References data, GetDatabaseEncoding(), and NO_XML_SUPPORT.
Referenced by ExecEvalXmlExpr(), and texttoxml().
Definition at line 57 of file xml.h.
References PointerGetDatum().
Definition at line 999 of file xml.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), arg, buf, ereport, errcode(), errdetail(), errmsg(), ERROR, initStringInfo(), NO_XML_SUPPORT, pfree(), pg_strcasecmp(), stringinfo_to_xmltype(), and text_to_cstring().
Referenced by ExecEvalXmlExpr().
Definition at line 1051 of file xml.c.
References appendStringInfoString(), buf, data, initStringInfo(), len, NO_XML_SUPPORT, str, stringinfo_to_xmltype(), text_to_cstring(), VARHDRSZ, VARSIZE, XML_STANDALONE_NO, XML_STANDALONE_NO_VALUE, XML_STANDALONE_OMITTED, and XML_STANDALONE_YES.
Referenced by ExecEvalXmlExpr().
text* xmltotext_with_options | ( | xmltype * | data, |
XmlOptionType | xmloption_arg, | ||
bool | indent | ||
) |
Definition at line 656 of file xml.c.
References buf, cstring_to_text_with_len(), data, ereport, errcode(), errmsg(), ERROR, ErrorSaveContext::error_occurred, GetDatabaseEncoding(), len, newline, NO_XML_SUPPORT, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pg_xml_done(), pg_xml_init(), PG_XML_STRICTNESS_ALL, root, str, xml_ereport(), and XMLOPTION_DOCUMENT.
Referenced by ExecEvalXmlExpr().
|
extern |
Definition at line 109 of file xml.c.
Referenced by map_sql_type_to_xmlschema_type(), and map_sql_value_to_xml_value().
|
extern |
Definition at line 110 of file xml.c.
Referenced by texttoxml(), xml_in(), xml_is_well_formed(), and xml_recv().
|
extern |
Definition at line 223 of file xml.c.
Referenced by ExecInitTableFuncScan().