1
0
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:
Tom Lane
2011-02-13 20:06:41 -05:00
parent e693e97d75
commit 629b3af27d
264 changed files with 2026 additions and 2349 deletions

View File

@ -1,3 +1,2 @@
/pgxml.sql
# Generated subdirectories
/results/

View File

@ -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)

View File

@ -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
---------------------------------------------------------------

View File

@ -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
---------------------------------------------------------------

View File

@ -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,'');

View File

@ -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);

View File

@ -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

View 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);

View File

@ -0,0 +1,5 @@
# xml2 extension
comment = 'XPath querying and XSLT'
default_version = '1.0'
module_pathname = '$libdir/pgxml'
relocatable = true