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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user