diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2017-02-21 09:27:02 -0500 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2017-02-21 09:49:22 -0500 |
| commit | 04aad401867ad3e1519615d8486e32b50dbcb5f5 (patch) | |
| tree | a9126115b80ba8a03b84f0e9b16864c307eae911 /src/pl/plpython/sql/plpython_ereport.sql | |
| parent | 0bf41dd1908a0c05833168b9972e1c52cb7547b7 (diff) | |
| download | postgresql-04aad401867ad3e1519615d8486e32b50dbcb5f5.tar.gz | |
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 'src/pl/plpython/sql/plpython_ereport.sql')
| -rw-r--r-- | src/pl/plpython/sql/plpython_ereport.sql | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pl/plpython/sql/plpython_ereport.sql b/src/pl/plpython/sql/plpython_ereport.sql index 2612e93387..889293d33c 100644 --- a/src/pl/plpython/sql/plpython_ereport.sql +++ b/src/pl/plpython/sql/plpython_ereport.sql @@ -55,12 +55,8 @@ kwargs = { "column_name": _column_name, "datatype_name": _datatype_name, "constraint_name": _constraint_name } -# ignore None values - should work on Python2.3 -dict = {} -for k in kwargs: - if kwargs[k] is not None: - dict[k] = kwargs[k] -plpy.error(**dict) +# ignore None values +plpy.error(**dict((k, v) for k, v in iter(kwargs.items()) if v)) $$ LANGUAGE plpythonu; SELECT raise_exception('hello', 'world'); |
