plpython: Remove plpythonu, plpython2u and associated transform extensions.
authorAndres Freund <andres@anarazel.de>
Tue, 8 Mar 2022 02:19:56 +0000 (18:19 -0800)
committerAndres Freund <andres@anarazel.de>
Tue, 8 Mar 2022 02:20:20 +0000 (18:20 -0800)
Since 19252e8ec93 we reject Python 2 during build configuration. Now that the
dust on the buildfarm has settled, remove extension variants specific to
Python 2.

Reviewed-By: Peter Eisentraut <peter@eisentraut.org>
Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de

19 files changed:
contrib/hstore_plpython/Makefile
contrib/hstore_plpython/hstore_plpython2u--1.0.sql [deleted file]
contrib/hstore_plpython/hstore_plpython2u.control [deleted file]
contrib/hstore_plpython/hstore_plpythonu--1.0.sql [deleted file]
contrib/hstore_plpython/hstore_plpythonu.control [deleted file]
contrib/jsonb_plpython/Makefile
contrib/jsonb_plpython/jsonb_plpython2u--1.0.sql [deleted file]
contrib/jsonb_plpython/jsonb_plpython2u.control [deleted file]
contrib/jsonb_plpython/jsonb_plpythonu--1.0.sql [deleted file]
contrib/jsonb_plpython/jsonb_plpythonu.control [deleted file]
contrib/ltree_plpython/Makefile
contrib/ltree_plpython/ltree_plpython2u--1.0.sql [deleted file]
contrib/ltree_plpython/ltree_plpython2u.control [deleted file]
contrib/ltree_plpython/ltree_plpythonu--1.0.sql [deleted file]
contrib/ltree_plpython/ltree_plpythonu.control [deleted file]
src/pl/plpython/plpython2u--1.0.sql [deleted file]
src/pl/plpython/plpython2u.control [deleted file]
src/pl/plpython/plpythonu--1.0.sql [deleted file]
src/pl/plpython/plpythonu.control [deleted file]

index 6af097ae68bddee73adda0a1d28b90955569625d..19d99a8045ea432f4f0f374250151ac0b7d17a0b 100644 (file)
@@ -6,8 +6,8 @@ OBJS = \
    hstore_plpython.o
 PGFILEDESC = "hstore_plpython - hstore transform for plpython"
 
-EXTENSION = hstore_plpythonu hstore_plpython2u hstore_plpython3u
-DATA = hstore_plpythonu--1.0.sql hstore_plpython2u--1.0.sql hstore_plpython3u--1.0.sql
+EXTENSION = hstore_plpython3u
+DATA = hstore_plpython3u--1.0.sql
 
 REGRESS = hstore_plpython
 REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
diff --git a/contrib/hstore_plpython/hstore_plpython2u--1.0.sql b/contrib/hstore_plpython/hstore_plpython2u--1.0.sql
deleted file mode 100644 (file)
index 800765f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* contrib/hstore_plpython/hstore_plpython2u--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION hstore_plpython2u" to load this file. \quit
-
-CREATE FUNCTION hstore_to_plpython2(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME', 'hstore_to_plpython';
-
-CREATE FUNCTION plpython2_to_hstore(val internal) RETURNS hstore
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME', 'plpython_to_hstore';
-
-CREATE TRANSFORM FOR hstore LANGUAGE plpython2u (
-    FROM SQL WITH FUNCTION hstore_to_plpython2(internal),
-    TO SQL WITH FUNCTION plpython2_to_hstore(internal)
-);
-
-COMMENT ON TRANSFORM FOR hstore LANGUAGE plpython2u IS 'transform between hstore and Python dict';
diff --git a/contrib/hstore_plpython/hstore_plpython2u.control b/contrib/hstore_plpython/hstore_plpython2u.control
deleted file mode 100644 (file)
index ed90567..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# hstore_plpython2u extension
-comment = 'transform between hstore and plpython2u'
-default_version = '1.0'
-module_pathname = '$libdir/hstore_plpython2'
-relocatable = true
-requires = 'hstore,plpython2u'
diff --git a/contrib/hstore_plpython/hstore_plpythonu--1.0.sql b/contrib/hstore_plpython/hstore_plpythonu--1.0.sql
deleted file mode 100644 (file)
index 5283291..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* contrib/hstore_plpython/hstore_plpythonu--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION hstore_plpythonu" to load this file. \quit
-
-CREATE FUNCTION hstore_to_plpython(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython_to_hstore(val internal) RETURNS hstore
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME';
-
-CREATE TRANSFORM FOR hstore LANGUAGE plpythonu (
-    FROM SQL WITH FUNCTION hstore_to_plpython(internal),
-    TO SQL WITH FUNCTION plpython_to_hstore(internal)
-);
-
-COMMENT ON TRANSFORM FOR hstore LANGUAGE plpythonu IS 'transform between hstore and Python dict';
diff --git a/contrib/hstore_plpython/hstore_plpythonu.control b/contrib/hstore_plpython/hstore_plpythonu.control
deleted file mode 100644 (file)
index 8e9b35e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# hstore_plpythonu extension
-comment = 'transform between hstore and plpythonu'
-default_version = '1.0'
-module_pathname = '$libdir/hstore_plpython2'
-relocatable = true
-requires = 'hstore,plpythonu'
index ca7674189433e03eef3dc41b63d46d73641ffaf4..eaab5ca2601abd90902e1de6e39e4a6718ac3c42 100644 (file)
@@ -4,12 +4,12 @@ MODULE_big = jsonb_plpython$(python_majorversion)
 OBJS = \
    $(WIN32RES) \
    jsonb_plpython.o
-PGFILEDESC = "jsonb_plpython - transform between jsonb and plpythonu"
+PGFILEDESC = "jsonb_plpython - jsonb transform for plpython"
 
 PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpython $(python_includespec) -DPLPYTHON_LIBNAME='"plpython$(python_majorversion)"'
 
-EXTENSION = jsonb_plpythonu jsonb_plpython2u jsonb_plpython3u
-DATA = jsonb_plpythonu--1.0.sql jsonb_plpython2u--1.0.sql jsonb_plpython3u--1.0.sql
+EXTENSION = jsonb_plpython3u
+DATA = jsonb_plpython3u--1.0.sql
 
 REGRESS = jsonb_plpython
 REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
diff --git a/contrib/jsonb_plpython/jsonb_plpython2u--1.0.sql b/contrib/jsonb_plpython/jsonb_plpython2u--1.0.sql
deleted file mode 100644 (file)
index 2526d14..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* contrib/jsonb_plpython/jsonb_plpython2u--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION jsonb_plpython2u" to load this file. \quit
-
-CREATE FUNCTION jsonb_to_plpython2(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME', 'jsonb_to_plpython';
-
-CREATE FUNCTION plpython2_to_jsonb(val internal) RETURNS jsonb
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME', 'plpython_to_jsonb';
-
-CREATE TRANSFORM FOR jsonb LANGUAGE plpython2u (
-    FROM SQL WITH FUNCTION jsonb_to_plpython2(internal),
-    TO SQL WITH FUNCTION plpython2_to_jsonb(internal)
-);
-
-COMMENT ON TRANSFORM FOR jsonb LANGUAGE plpython2u IS 'transform between jsonb and Python';
diff --git a/contrib/jsonb_plpython/jsonb_plpython2u.control b/contrib/jsonb_plpython/jsonb_plpython2u.control
deleted file mode 100644 (file)
index d263683..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# jsonb_plpython2u extension
-comment = 'transform between jsonb and plpython2u'
-default_version = '1.0'
-module_pathname = '$libdir/jsonb_plpython2'
-relocatable = true
-requires = 'plpython2u'
diff --git a/contrib/jsonb_plpython/jsonb_plpythonu--1.0.sql b/contrib/jsonb_plpython/jsonb_plpythonu--1.0.sql
deleted file mode 100644 (file)
index 3fa8988..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* contrib/jsonb_plpython/jsonb_plpythonu--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION jsonb_plpythonu" to load this file. \quit
-
-CREATE FUNCTION jsonb_to_plpython(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython_to_jsonb(val internal) RETURNS jsonb
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME';
-
-CREATE TRANSFORM FOR jsonb LANGUAGE plpythonu (
-    FROM SQL WITH FUNCTION jsonb_to_plpython(internal),
-    TO SQL WITH FUNCTION plpython_to_jsonb(internal)
-);
-
-COMMENT ON TRANSFORM FOR jsonb LANGUAGE plpythonu IS 'transform between jsonb and Python';
diff --git a/contrib/jsonb_plpython/jsonb_plpythonu.control b/contrib/jsonb_plpython/jsonb_plpythonu.control
deleted file mode 100644 (file)
index 6f8fa4f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# jsonb_plpythonu extension
-comment = 'transform between jsonb and plpythonu'
-default_version = '1.0'
-module_pathname = '$libdir/jsonb_plpython2'
-relocatable = true
-requires = 'plpythonu'
index 12a0146772195abeab1925cad5f69a4d4189311e..0bccb111e6baa2c2599ad75d6763a7d6571707a8 100644 (file)
@@ -6,8 +6,8 @@ OBJS = \
    ltree_plpython.o
 PGFILEDESC = "ltree_plpython - ltree transform for plpython"
 
-EXTENSION = ltree_plpythonu ltree_plpython2u ltree_plpython3u
-DATA = ltree_plpythonu--1.0.sql ltree_plpython2u--1.0.sql ltree_plpython3u--1.0.sql
+EXTENSION = ltree_plpython3u
+DATA = ltree_plpython3u--1.0.sql
 
 REGRESS = ltree_plpython
 REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
diff --git a/contrib/ltree_plpython/ltree_plpython2u--1.0.sql b/contrib/ltree_plpython/ltree_plpython2u--1.0.sql
deleted file mode 100644 (file)
index 5c4a703..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* contrib/ltree_plpython/ltree_plpython2u--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION ltree_plpython2u" to load this file. \quit
-
-CREATE FUNCTION ltree_to_plpython2(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME', 'ltree_to_plpython';
-
-CREATE TRANSFORM FOR ltree LANGUAGE plpython2u (
-    FROM SQL WITH FUNCTION ltree_to_plpython2(internal)
-);
diff --git a/contrib/ltree_plpython/ltree_plpython2u.control b/contrib/ltree_plpython/ltree_plpython2u.control
deleted file mode 100644 (file)
index bedfd0a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# ltree_plpython2u extension
-comment = 'transform between ltree and plpython2u'
-default_version = '1.0'
-module_pathname = '$libdir/ltree_plpython2'
-relocatable = true
-requires = 'ltree,plpython2u'
diff --git a/contrib/ltree_plpython/ltree_plpythonu--1.0.sql b/contrib/ltree_plpython/ltree_plpythonu--1.0.sql
deleted file mode 100644 (file)
index ee93edf..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* contrib/ltree_plpython/ltree_plpythonu--1.0.sql */
-
--- complain if script is sourced in psql, rather than via CREATE EXTENSION
-\echo Use "CREATE EXTENSION ltree_plpythonu" to load this file. \quit
-
-CREATE FUNCTION ltree_to_plpython(val internal) RETURNS internal
-LANGUAGE C STRICT IMMUTABLE
-AS 'MODULE_PATHNAME';
-
-CREATE TRANSFORM FOR ltree LANGUAGE plpythonu (
-    FROM SQL WITH FUNCTION ltree_to_plpython(internal)
-);
diff --git a/contrib/ltree_plpython/ltree_plpythonu.control b/contrib/ltree_plpython/ltree_plpythonu.control
deleted file mode 100644 (file)
index b03c89a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# ltree_plpythonu extension
-comment = 'transform between ltree and plpythonu'
-default_version = '1.0'
-module_pathname = '$libdir/ltree_plpython2'
-relocatable = true
-requires = 'ltree,plpythonu'
diff --git a/src/pl/plpython/plpython2u--1.0.sql b/src/pl/plpython/plpython2u--1.0.sql
deleted file mode 100644 (file)
index 69f7477..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* src/pl/plpython/plpython2u--1.0.sql */
-
-CREATE FUNCTION plpython2_call_handler() RETURNS language_handler
-  LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython2_inline_handler(internal) RETURNS void
-  STRICT LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython2_validator(oid) RETURNS void
-  STRICT LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE LANGUAGE plpython2u
-  HANDLER plpython2_call_handler
-  INLINE plpython2_inline_handler
-  VALIDATOR plpython2_validator;
-
-COMMENT ON LANGUAGE plpython2u IS 'PL/Python2U untrusted procedural language';
diff --git a/src/pl/plpython/plpython2u.control b/src/pl/plpython/plpython2u.control
deleted file mode 100644 (file)
index 39c2b79..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# plpython2u extension
-comment = 'PL/Python2U untrusted procedural language'
-default_version = '1.0'
-module_pathname = '$libdir/plpython2'
-relocatable = false
-schema = pg_catalog
-superuser = true
diff --git a/src/pl/plpython/plpythonu--1.0.sql b/src/pl/plpython/plpythonu--1.0.sql
deleted file mode 100644 (file)
index 4c6f7c3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* src/pl/plpython/plpythonu--1.0.sql */
-
-CREATE FUNCTION plpython_call_handler() RETURNS language_handler
-  LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython_inline_handler(internal) RETURNS void
-  STRICT LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE FUNCTION plpython_validator(oid) RETURNS void
-  STRICT LANGUAGE c AS 'MODULE_PATHNAME';
-
-CREATE LANGUAGE plpythonu
-  HANDLER plpython_call_handler
-  INLINE plpython_inline_handler
-  VALIDATOR plpython_validator;
-
-COMMENT ON LANGUAGE plpythonu IS 'PL/PythonU untrusted procedural language';
diff --git a/src/pl/plpython/plpythonu.control b/src/pl/plpython/plpythonu.control
deleted file mode 100644 (file)
index ae91b1c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# plpythonu extension
-comment = 'PL/PythonU untrusted procedural language'
-default_version = '1.0'
-module_pathname = '$libdir/plpython2'
-relocatable = false
-schema = pg_catalog
-superuser = true