1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-16 16:42:29 +03:00

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.
This commit is contained in:
Peter Eisentraut
2009-08-24 20:25:25 +00:00
parent 8bed238c87
commit 5dff93638c
15 changed files with 60 additions and 48 deletions

View File

@@ -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]