mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix contrib/xml2 so regression test still works when it's built without libxslt.
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/contrib/xml2/pgxml.sql.in,v 1.11 2007/11/13 04:24:29 momjian Exp $ */
|
||||
/* $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;
|
||||
@ -40,22 +40,17 @@ 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)'
|
||||
@ -69,9 +64,6 @@ AS 'MODULE_PATHNAME'
|
||||
LANGUAGE C STRICT STABLE;
|
||||
|
||||
-- XSLT functions
|
||||
-- Delete from here to the end of the file if you are not compiling with
|
||||
-- XSLT support.
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION xslt_process(text,text,text)
|
||||
RETURNS text
|
||||
@ -79,7 +71,6 @@ 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'
|
||||
|
Reference in New Issue
Block a user