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 | DatumGetXmlP(X) ((xmltype *) PG_DETOAST_DATUM(X)) |
#define | XmlPGetDatum(X) PointerGetDatum(X) |
#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 DatumGetXmlP | ( | X | ) | ((xmltype *) PG_DETOAST_DATUM(X)) |
#define PG_GETARG_XML_P | ( | n | ) | DatumGetXmlP(PG_GETARG_DATUM(n)) |
#define PG_RETURN_XML_P | ( | x | ) | PG_RETURN_POINTER(x) |
#define XmlPGetDatum | ( | X | ) | PointerGetDatum(X) |
typedef struct PgXmlErrorContext PgXmlErrorContext |
enum PgXmlStrictness |
enum XmlBinaryType |
enum XmlStandaloneType |
char* escape_xml | ( | const char * | str | ) |
Definition at line 2352 of file xml.c.
References appendStringInfoCharMacro, appendStringInfoString(), buf, initStringInfo(), and generate_unaccent_rules::str.
Referenced by ExplainProperty(), ExplainPropertyList(), map_sql_value_to_xml_value(), and XmlTableGetValue().
Definition at line 2035 of file xml.c.
References appendBinaryStringInfo(), appendStringInfo(), appendStringInfoString(), Assert(), buf, 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 2133 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(), generate_unaccent_rules::str, timestamp2tm(), TIMESTAMP_NOT_FINITE, tm, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, generate_unaccent_rules::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 2091 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 | ||
) |
Referenced by map_sql_value_to_xml_value(), pgxml_xpath(), xmlelement(), XmlTableDestroyOpaque(), XmlTableInitOpaque(), xpath_table(), and xslt_process().
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(), and XmlTableInitOpaque().
void pg_xml_init_library | ( | void | ) |
void xml_ereport | ( | PgXmlErrorContext * | errcxt, |
int | level, | ||
int | sqlcode, | ||
const char * | msg | ||
) |
Definition at line 887 of file xml.c.
References arg, CopyErrorData(), CurrentMemoryContext, FlushErrorState(), GetDatabaseEncoding(), MemoryContextSwitchTo(), NO_XML_SUPPORT, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, ErrorData::sqlerrcode, and XMLOPTION_DOCUMENT.
Referenced by ExecEvalXmlExpr(), and xmltotext_with_xmloption().
Definition at line 511 of file xml.c.
References appendBinaryStringInfo(), appendStringInfoString(), generate_unaccent_rules::args, buf, DatumGetXmlP, initStringInfo(), len, lfirst, NO_XML_SUPPORT, pfree(), PointerGetDatum, generate_unaccent_rules::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 627 of file xml.c.
References arg, XmlExpr::arg_names, XmlExpr::args, buf, ERROR, exprType(), forboth, i, lappend(), lfirst, map_sql_value_to_xml_value(), XmlExpr::name, 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, generate_unaccent_rules::str, strVal, and xml_ereport().
Referenced by ExecEvalXmlExpr().
xmltype* xmlparse | ( | text * | data, |
XmlOptionType | xmloption, | ||
bool | preserve_whitespace | ||
) |
Definition at line 751 of file xml.c.
References data, GetDatabaseEncoding(), and NO_XML_SUPPORT.
Referenced by ExecEvalXmlExpr(), and texttoxml().
Definition at line 769 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 821 of file xml.c.
References appendStringInfoString(), buf, data, initStringInfo(), len, NO_XML_SUPPORT, generate_unaccent_rules::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_xmloption | ( | xmltype * | data, |
XmlOptionType | xmloption_arg | ||
) |
Definition at line 614 of file xml.c.
References data, ereport, errcode(), errmsg(), ERROR, xml_is_document(), and XMLOPTION_DOCUMENT.
Referenced by ExecEvalXmlExpr().
|
extern |
Definition at line 97 of file xml.c.
Referenced by map_sql_type_to_xmlschema_type(), and map_sql_value_to_xml_value().
|
extern |
Definition at line 98 of file xml.c.
Referenced by _copyXmlExpr(), _copyXmlSerialize(), _equalXmlExpr(), _equalXmlSerialize(), _outXmlExpr(), _outXmlSerialize(), _readXmlExpr(), texttoxml(), xml_in(), xml_is_well_formed(), and xml_recv().
|
extern |
Definition at line 207 of file xml.c.
Referenced by ExecInitTableFuncScan().