mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Convert contrib modules to use the extension facility.
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
This commit is contained in:
1
contrib/xml2/.gitignore
vendored
1
contrib/xml2/.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
/pgxml.sql
|
||||
# Generated subdirectories
|
||||
/results/
|
||||
|
@ -1,15 +1,15 @@
|
||||
# contrib/xml2/Makefile
|
||||
|
||||
MODULE_big = pgxml
|
||||
|
||||
OBJS = xpath.o xslt_proc.o
|
||||
|
||||
SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))
|
||||
EXTENSION = xml2
|
||||
DATA = xml2--1.0.sql xml2--unpackaged--1.0.sql
|
||||
|
||||
DATA_built = pgxml.sql
|
||||
DATA = uninstall_pgxml.sql
|
||||
REGRESS = xml2
|
||||
|
||||
SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))
|
||||
|
||||
ifdef USE_PGXS
|
||||
PG_CONFIG = pg_config
|
||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||
|
@ -1,10 +1,4 @@
|
||||
--
|
||||
-- first, define the functions. Turn off echoing so that expected file
|
||||
-- does not depend on contents of pgxml.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION xml2;
|
||||
select query_to_xml('select 1 as x',true,false,'');
|
||||
query_to_xml
|
||||
---------------------------------------------------------------
|
||||
|
@ -1,10 +1,4 @@
|
||||
--
|
||||
-- first, define the functions. Turn off echoing so that expected file
|
||||
-- does not depend on contents of pgxml.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION xml2;
|
||||
select query_to_xml('select 1 as x',true,false,'');
|
||||
query_to_xml
|
||||
---------------------------------------------------------------
|
||||
|
@ -1,12 +1,4 @@
|
||||
--
|
||||
-- first, define the functions. Turn off echoing so that expected file
|
||||
-- does not depend on contents of pgxml.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
\i pgxml.sql
|
||||
\set ECHO all
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION xml2;
|
||||
|
||||
select query_to_xml('select 1 as x',true,false,'');
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
/* contrib/xml2/uninstall_pgxml.sql */
|
||||
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
DROP FUNCTION xslt_process(text,text);
|
||||
|
||||
DROP FUNCTION xslt_process(text,text,text);
|
||||
|
||||
DROP FUNCTION xpath_table(text,text,text,text,text);
|
||||
|
||||
DROP FUNCTION xpath_nodeset(text,text,text);
|
||||
|
||||
DROP FUNCTION xpath_nodeset(text,text);
|
||||
|
||||
DROP FUNCTION xpath_list(text,text);
|
||||
|
||||
DROP FUNCTION xpath_list(text,text,text);
|
||||
|
||||
DROP FUNCTION xpath_bool(text,text);
|
||||
|
||||
DROP FUNCTION xpath_number(text,text);
|
||||
|
||||
DROP FUNCTION xpath_nodeset(text,text,text,text);
|
||||
|
||||
DROP FUNCTION xpath_string(text,text);
|
||||
|
||||
DROP FUNCTION xml_encode_special_chars(text);
|
||||
|
||||
-- deprecated old name for xml_is_well_formed
|
||||
DROP FUNCTION xml_valid(text);
|
@ -1,7 +1,4 @@
|
||||
/* contrib/xml2/pgxml.sql.in */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
/* contrib/xml2/xml2--1.0.sql */
|
||||
|
||||
--SQL for XML parser
|
||||
|
16
contrib/xml2/xml2--unpackaged--1.0.sql
Normal file
16
contrib/xml2/xml2--unpackaged--1.0.sql
Normal file
@ -0,0 +1,16 @@
|
||||
/* contrib/xml2/xml2--unpackaged--1.0.sql */
|
||||
|
||||
ALTER EXTENSION xml2 ADD function xslt_process(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xslt_process(text,text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_table(text,text,text,text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_nodeset(text,text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_nodeset(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_list(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_list(text,text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_bool(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_number(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_nodeset(text,text,text,text);
|
||||
ALTER EXTENSION xml2 ADD function xpath_string(text,text);
|
||||
ALTER EXTENSION xml2 ADD function xml_encode_special_chars(text);
|
||||
ALTER EXTENSION xml2 ADD function xml_valid(text);
|
||||
ALTER EXTENSION xml2 ADD function xml_is_well_formed(text);
|
5
contrib/xml2/xml2.control
Normal file
5
contrib/xml2/xml2.control
Normal file
@ -0,0 +1,5 @@
|
||||
# xml2 extension
|
||||
comment = 'XPath querying and XSLT'
|
||||
default_version = '1.0'
|
||||
module_pathname = '$libdir/pgxml'
|
||||
relocatable = true
|
Reference in New Issue
Block a user