PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "executor/spi.h"
#include "fmgr.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/xml.h"
#include <libxml/xpath.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlerror.h>
#include <libxml/parserInternals.h>
Go to the source code of this file.
Data Structures | |
struct | xpath_workspace |
Variables | |
PG_MODULE_MAGIC | |
|
static |
Definition at line 467 of file xpath.c.
References xpath_workspace::ctxt, xpath_workspace::doctree, and xpath_workspace::res.
Referenced by pgxml_xpath(), xpath_bool(), xpath_list(), xpath_nodeset(), xpath_number(), and xpath_string().
PG_FUNCTION_INFO_V1 | ( | xml_is_well_formed | ) |
PG_FUNCTION_INFO_V1 | ( | xml_encode_special_chars | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_nodeset | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_list | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_string | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_number | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_bool | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_table | ) |
PgXmlErrorContext * pgxml_parser_init | ( | PgXmlStrictness | strictness | ) |
Definition at line 65 of file xpath.c.
References PG_FUNCTION_INFO_V1(), pg_xml_init(), and xml_is_well_formed().
Referenced by pgxml_xpath(), xml_is_well_formed(), xpath_table(), and xslt_process().
|
static |
Definition at line 481 of file xpath.c.
References cstring_to_text(), elog, NOTICE, PG_FUNCTION_INFO_V1(), pgxmlNodeSetToText(), and xpath_table().
Referenced by xpath_list(), xpath_nodeset(), and xpath_string().
|
static |
Definition at line 235 of file xpath.c.
References PG_FUNCTION_INFO_V1(), text_to_cstring(), and xpath_nodeset().
Referenced by xml_encode_special_chars(), xpath_bool(), xpath_list(), xpath_nodeset(), and xpath_number().
|
static |
Definition at line 414 of file xpath.c.
References cleanup_workspace(), xpath_workspace::ctxt, xpath_workspace::doctree, ERROR, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, pg_xml_done(), PG_XML_STRICTNESS_LEGACY, pgxml_parser_init(), xpath_workspace::res, VARDATA_ANY, VARSIZE_ANY_EXHDR, and xml_ereport().
Referenced by xpath_bool(), xpath_list(), xpath_nodeset(), xpath_number(), and xpath_string().
|
static |
Datum xml_encode_special_chars | ( | PG_FUNCTION_ARGS | ) |
Definition at line 134 of file xpath.c.
References cstring_to_text(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and pgxml_texttoxmlchar().
Referenced by xml_is_well_formed().
Datum xml_is_well_formed | ( | PG_FUNCTION_ARGS | ) |
Definition at line 96 of file xpath.c.
References PG_CATCH, PG_END_TRY, PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RE_THROW, PG_RETURN_BOOL, PG_TRY, pg_xml_done(), PG_XML_STRICTNESS_LEGACY, pgxml_parser_init(), VARDATA_ANY, VARSIZE_ANY_EXHDR, and xml_encode_special_chars().
Referenced by pgxml_parser_init().
Datum xpath_bool | ( | PG_FUNCTION_ARGS | ) |
Definition at line 384 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_BOOL, pgxml_texttoxmlchar(), pgxml_xpath(), and xpath().
Referenced by xpath_number().
Datum xpath_list | ( | PG_FUNCTION_ARGS | ) |
Definition at line 282 of file xpath.c.
References cleanup_workspace(), pfree(), PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_texttoxmlchar(), pgxml_xpath(), xpath(), and xpath_string().
Referenced by xpath_nodeset().
Datum xpath_nodeset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 249 of file xpath.c.
References cleanup_workspace(), pfree(), PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_texttoxmlchar(), pgxml_xpath(), xpath(), and xpath_list().
Referenced by pgxml_texttoxmlchar().
Datum xpath_number | ( | PG_FUNCTION_ARGS | ) |
Definition at line 352 of file xpath.c.
References cleanup_workspace(), pfree(), PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RETURN_FLOAT4, PG_RETURN_NULL, pgxml_texttoxmlchar(), pgxml_xpath(), xpath(), and xpath_bool().
Referenced by xpath_string().
Datum xpath_string | ( | PG_FUNCTION_ARGS | ) |
Definition at line 311 of file xpath.c.
References cleanup_workspace(), palloc(), pfree(), PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_xpath(), VARDATA_ANY, VARSIZE_ANY_EXHDR, xpath(), and xpath_number().
Referenced by xpath_list().
Datum xpath_table | ( | PG_FUNCTION_ARGS | ) |
Definition at line 525 of file xpath.c.
References ReturnSetInfo::allowedModes, appendStringInfo(), BuildTupleFromCStrings(), CreateTupleDescCopy(), ReturnSetInfo::econtext, ExprContext::ecxt_per_query_memory, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, ReturnSetInfo::expectedDesc, heap_freetuple(), i, initStringInfo(), IsA, MemoryContextSwitchTo(), TupleDescData::natts, NOTICE, palloc(), pfree(), PG_CATCH, PG_END_TRY, PG_GETARG_TEXT_PP, PG_RE_THROW, PG_TRY, pg_xml_done(), PG_XML_STRICTNESS_LEGACY, pgxml_parser_init(), relname, ReturnSetInfo::returnMode, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SFRM_Materialize, SFRM_Materialize_Random, SPI_connect(), SPI_exec(), SPI_finish(), SPI_getvalue(), SPI_OK_SELECT, SPI_processed, SPI_tuptable, text_to_cstring(), SPITupleTable::tupdesc, TupleDescGetAttInMetadata(), tuplestore_begin_heap(), tuplestore_donestoring, tuplestore_puttuple(), SPITupleTable::vals, values, work_mem, and xml_ereport().
Referenced by pgxml_result_to_text().