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 |
|
static |
Definition at line 422 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 | ) |
PG_MODULE_MAGIC_EXT | ( | . | name = "xml2" , |
. | version = PG_VERSION |
||
) |
PgXmlErrorContext * pgxml_parser_init | ( | PgXmlStrictness | strictness | ) |
Definition at line 67 of file xpath.c.
References pg_xml_init().
Referenced by pgxml_xpath(), xpath_table(), and xslt_process().
|
static |
Definition at line 436 of file xpath.c.
References cstring_to_text(), elog, NOTICE, and pgxmlNodeSetToText().
Referenced by xpath_list(), xpath_nodeset(), and xpath_string().
|
static |
Definition at line 189 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 368 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 120 of file xpath.c.
Referenced by pgxml_result_to_text().
Datum xml_encode_special_chars | ( | PG_FUNCTION_ARGS | ) |
Definition at line 88 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 338 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_BOOL, pgxml_texttoxmlchar(), pgxml_xpath(), and xpath().
Datum xpath_list | ( | PG_FUNCTION_ARGS | ) |
Definition at line 236 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(), and xpath().
Datum xpath_nodeset | ( | PG_FUNCTION_ARGS | ) |
Definition at line 203 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(), and xpath().
Datum xpath_number | ( | PG_FUNCTION_ARGS | ) |
Definition at line 306 of file xpath.c.
References cleanup_workspace(), pfree(), PG_GETARG_TEXT_PP, PG_RETURN_FLOAT4, PG_RETURN_NULL, pgxml_texttoxmlchar(), pgxml_xpath(), and xpath().
Datum xpath_string | ( | PG_FUNCTION_ARGS | ) |
Definition at line 265 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(), VARDATA_ANY, VARSIZE_ANY_EXHDR, and xpath().
Datum xpath_table | ( | PG_FUNCTION_ARGS | ) |
Definition at line 480 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, 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().