Skip to content

Commit 667368f

Browse files
committed
contrib/xml2: Use SQL-standard function bodies.
In the same spirit as 969bbd0, 13e3796, 3f323eb. Tom Lane and Ronan Dunklau Discussion: https://postgr.es/m/3316564.aeNJFYEL58@aivenlaptop
1 parent 97a5a16 commit 667368f

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

contrib/xml2/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ OBJS = \
77
xslt_proc.o
88

99
EXTENSION = xml2
10-
DATA = xml2--1.1.sql xml2--1.0--1.1.sql
10+
DATA = xml2--1.1.sql \
11+
xml2--1.1--1.2.sql \
12+
xml2--1.0--1.1.sql
1113
PGFILEDESC = "xml2 - XPath querying and XSLT"
1214

1315
REGRESS = xml2

contrib/xml2/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ contrib_targets += xml2
2727
install_data(
2828
'xml2--1.0--1.1.sql',
2929
'xml2--1.1.sql',
30+
'xml2--1.1--1.2.sql',
3031
'xml2.control',
3132
kwargs: contrib_data_args,
3233
)

contrib/xml2/xml2--1.1--1.2.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* contrib/xml2/xml2--1.1--1.2.sql */
2+
3+
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+
\echo Use "ALTER EXTENSION xml2 UPDATE TO '1.2'" to load this file. \quit
5+
6+
CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text
7+
LANGUAGE SQL STRICT IMMUTABLE PARALLEL SAFE
8+
RETURN xpath_list($1, $2, ','::text);
9+
10+
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text)
11+
RETURNS text
12+
LANGUAGE SQL STRICT IMMUTABLE PARALLEL SAFE
13+
RETURN xpath_nodeset($1, $2, ''::text, ''::text);
14+
15+
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text)
16+
RETURNS text
17+
LANGUAGE SQL STRICT IMMUTABLE PARALLEL SAFE
18+
RETURN xpath_nodeset($1, $2, ''::text, $3);

contrib/xml2/xml2.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# xml2 extension
22
comment = 'XPath querying and XSLT'
3-
default_version = '1.1'
3+
default_version = '1.2'
44
module_pathname = '$libdir/pgxml'
55
# XXX do we still need this to be non-relocatable?
66
relocatable = false

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy