mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
config
contrib
adminpack
auto_explain
btree_gin
btree_gist
chkpass
citext
cube
dblink
dict_int
dict_xsyn
earthdistance
fuzzystrmatch
hstore
intagg
intarray
isn
lo
ltree
oid2name
pageinspect
passwordcheck
pg_archivecleanup
pg_buffercache
pg_freespacemap
pg_standby
pg_stat_statements
pg_trgm
pg_upgrade
pg_upgrade_support
pgbench
pgcrypto
pgrowlocks
pgstattuple
seg
spi
sslinfo
start-scripts
tablefunc
test_parser
tsearch2
unaccent
uuid-ossp
vacuumlo
xml2
expected
sql
Makefile
pgxml.sql.in
uninstall_pgxml.sql
xpath.c
xslt_proc.c
Makefile
README
contrib-global.mk
doc
src
COPYRIGHT
GNUmakefile.in
Makefile
README
README.CVS
aclocal.m4
configure
configure.in
This involves modifying the module to have a stable ABI, that is, the xslt_process() function still exists even without libxslt. It throws a runtime error if called, but doesn't prevent executing the CREATE FUNCTION call. This is a good thing anyway to simplify cross-version upgrades.
78 lines
2.1 KiB
MySQL
78 lines
2.1 KiB
MySQL
/* $PostgreSQL: pgsql/contrib/xml2/pgxml.sql.in,v 1.12 2010/03/01 18:07:59 tgl Exp $ */
|
|
|
|
-- Adjust this setting to control where the objects get created.
|
|
SET search_path = public;
|
|
|
|
--SQL for XML parser
|
|
|
|
CREATE OR REPLACE FUNCTION xml_is_well_formed(text) RETURNS bool
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
-- deprecated old name for xml_is_well_formed
|
|
CREATE OR REPLACE FUNCTION xml_valid(text) RETURNS bool
|
|
AS 'MODULE_PATHNAME', 'xml_is_well_formed'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xml_encode_special_chars(text) RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_number(text,text) RETURNS float4
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_bool(text,text) RETURNS boolean
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
-- List function
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text
|
|
AS 'SELECT xpath_list($1,$2,'','')'
|
|
LANGUAGE SQL STRICT IMMUTABLE;
|
|
|
|
-- Wrapper functions for nodeset where no tags needed
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text)
|
|
RETURNS text
|
|
AS 'SELECT xpath_nodeset($1,$2,'''','''')'
|
|
LANGUAGE SQL STRICT IMMUTABLE;
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text)
|
|
RETURNS text
|
|
AS 'SELECT xpath_nodeset($1,$2,'''',$3)'
|
|
LANGUAGE SQL STRICT IMMUTABLE;
|
|
|
|
-- Table function
|
|
|
|
CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text)
|
|
RETURNS setof record
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT STABLE;
|
|
|
|
-- XSLT functions
|
|
|
|
CREATE OR REPLACE FUNCTION xslt_process(text,text,text)
|
|
RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT VOLATILE;
|
|
|
|
-- the function checks for the correct argument count
|
|
CREATE OR REPLACE FUNCTION xslt_process(text,text)
|
|
RETURNS text
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C STRICT IMMUTABLE;
|