aboutsummaryrefslogtreecommitdiff
path: root/contrib/hstore_plpython/sql
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-02-21 09:27:02 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-02-21 09:49:22 -0500
commit04aad401867ad3e1519615d8486e32b50dbcb5f5 (patch)
treea9126115b80ba8a03b84f0e9b16864c307eae911 /contrib/hstore_plpython/sql
parent0bf41dd1908a0c05833168b9972e1c52cb7547b7 (diff)
downloadpostgresql-04aad401867ad3e1519615d8486e32b50dbcb5f5.tar.gz
postgresql-04aad401867ad3e1519615d8486e32b50dbcb5f5.zip
Drop support for Python 2.3
There is no specific reason for this right now, but keeping support for old Python versions around indefinitely increases the maintenance burden. The oldest supported Python version is now Python 2.4, which is still shipped in RHEL/CentOS 5 by default. In configure, add a check for the required Python version and give a friendly error message for an old version, instead of relying on an obscure build error later on.
Diffstat (limited to 'contrib/hstore_plpython/sql')
-rw-r--r--contrib/hstore_plpython/sql/hstore_plpython.sql8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/hstore_plpython/sql/hstore_plpython.sql b/contrib/hstore_plpython/sql/hstore_plpython.sql
index d55bedaf505..911bbd67fed 100644
--- a/contrib/hstore_plpython/sql/hstore_plpython.sql
+++ b/contrib/hstore_plpython/sql/hstore_plpython.sql
@@ -7,9 +7,7 @@ LANGUAGE plpythonu
TRANSFORM FOR TYPE hstore
AS $$
assert isinstance(val, dict)
-i = list(val.items())
-i.sort()
-plpy.info(i)
+plpy.info(sorted(val.items()))
return len(val)
$$;
@@ -22,9 +20,7 @@ LANGUAGE plpython2u
TRANSFORM FOR TYPE hstore
AS $$
assert isinstance(val, dict)
-i = list(val.items())
-i.sort()
-plpy.info(i)
+plpy.info(sorted(val.items()))
return len(val)
$$;