diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2009-08-24 20:25:25 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2009-08-24 20:25:25 +0000 |
| commit | 5dff93638c4443d3afba017f64c9ade69e0fbd3b (patch) | |
| tree | f3d9c7456f569a2b68dc7e3227485d15c0d358dc /src/pl/plpython/sql/plpython_trigger.sql | |
| parent | 8bed238c871fae205c5c6615f3b9ab8a039359e2 (diff) | |
| download | postgresql-5dff93638c4443d3afba017f64c9ade69e0fbd3b.tar.gz | |
Make PL/Python tests more compatible with Python 3
This changes a bunch of incidentially used constructs in the PL/Python
regression tests to equivalent constructs in cases where Python 3 no longer
supports the old syntax. Support for older Python versions is unchanged.
Diffstat (limited to 'src/pl/plpython/sql/plpython_trigger.sql')
| -rw-r--r-- | src/pl/plpython/sql/plpython_trigger.sql | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpython/sql/plpython_trigger.sql b/src/pl/plpython/sql/plpython_trigger.sql index ce1a737a84..385fa93bda 100644 --- a/src/pl/plpython/sql/plpython_trigger.sql +++ b/src/pl/plpython/sql/plpython_trigger.sql @@ -69,10 +69,10 @@ CREATE TABLE trigger_test CREATE FUNCTION trigger_data() returns trigger language plpythonu as $$ -if TD.has_key('relid'): +if 'relid' in TD: TD['relid'] = "bogus:12345" -skeys = TD.keys() +skeys = list(TD.keys()) skeys.sort() for key in skeys: val = TD[key] |
