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 "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 419 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_encode_special_chars | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_bool | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_list | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_nodeset | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_number | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_string | ) |
PG_FUNCTION_INFO_V1 | ( | xpath_table | ) |
PgXmlErrorContext * pgxml_parser_init | ( | PgXmlStrictness | strictness | ) |
Definition at line 64 of file xpath.c.
References pg_xml_init().
Referenced by pgxml_xpath(), xpath_table(), and xslt_process().
|
static |
Definition at line 433 of file xpath.c.
References cstring_to_text(), elog, NOTICE, pgxmlNodeSetToText(), and res.
Referenced by xpath_list(), xpath_nodeset(), and xpath_string().
|
static |
Definition at line 186 of file xpath.c.
References text_to_cstring().
Referenced by xml_encode_special_chars(), xpath_bool(), xpath_list(), xpath_nodeset(), and xpath_number().
|
static |
Definition at line 365 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, xml_ereport(), and xpath().
Referenced by xpath_bool(), xpath_list(), xpath_nodeset(), xpath_number(), and xpath_string().
|
static |
Definition at line 117 of file xpath.c.
Referenced by pgxml_result_to_text().
Datum xml_encode_special_chars | ( | PG_FUNCTION_ARGS | ) |
Definition at line 85 of file xpath.c.
References cstring_to_text(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, and pgxml_texttoxmlchar().
Datum xpath_bool | ( | PG_FUNCTION_ARGS | ) |
Definition at line 335 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_BOOL, pgxml_texttoxmlchar(), pgxml_xpath(), res, and xpath().
Datum xpath_list | ( | PG_FUNCTION_ARGS | ) |
Definition at line 233 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_texttoxmlchar(), pgxml_xpath(), res, and xpath().
Datum xpath_nodeset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 200 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_texttoxmlchar(), pgxml_xpath(), res, and xpath().
Datum xpath_number | ( | PG_FUNCTION_ARGS | ) |
Definition at line 303 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_FLOAT4, PG_RETURN_NULL, pgxml_texttoxmlchar(), pgxml_xpath(), res, and xpath().
Datum xpath_string | ( | PG_FUNCTION_ARGS | ) |
Definition at line 262 of file xpath.c.
References cleanup_workspace(), palloc(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, PG_RETURN_TEXT_P, pgxml_result_to_text(), pgxml_xpath(), res, VARDATA_ANY, VARSIZE_ANY_EXHDR, and xpath().
Datum xpath_table | ( | PG_FUNCTION_ARGS | ) |
Definition at line 477 of file xpath.c.
References appendStringInfo(), BuildTupleFromCStrings(), elog, ereport, errcode(), errdetail(), errmsg(), ERROR, heap_freetuple(), i, InitMaterializedSRF(), initStringInfo(), j, MAT_SRF_USE_EXPECTED_DESC, 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, res, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SPI_connect(), SPI_exec(), SPI_finish(), SPI_getvalue(), SPI_OK_SELECT, SPI_processed, SPI_tuptable, text_to_cstring(), SPITupleTable::tupdesc, TupleDescGetAttInMetadata(), tuplestore_puttuple(), SPITupleTable::vals, values, and xml_ereport().