From: Andrew Dunstan Date: Sat, 27 May 2006 12:39:11 +0000 (+0000) Subject: Looks like the new plpython regression test fails on older pythons. See if this works. X-Git-Tag: REL9_0_0~7886 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=51b40f03a4001eaa0fe42df8f6567abe4bd32d21;p=pg-rex%2Fsyncrep.git Looks like the new plpython regression test fails on older pythons. See if this works. --- diff --git a/src/pl/plpython/expected/plpython_function.out b/src/pl/plpython/expected/plpython_function.out index d8646b675a..d367cf66aa 100644 --- a/src/pl/plpython/expected/plpython_function.out +++ b/src/pl/plpython/expected/plpython_function.out @@ -123,7 +123,9 @@ CREATE FUNCTION trigger_data() returns trigger language plpythonu as $$ if TD.has_key('relid'): TD['relid'] = "bogus:12345" -for key in sorted(TD.keys()): +skeys = TD.keys() +skeys.sort() +for key in skeys: val = TD[key] plpy.notice("TD[" + key + "] => " + str(val)) diff --git a/src/pl/plpython/sql/plpython_function.sql b/src/pl/plpython/sql/plpython_function.sql index 73b1a65405..e31af9f987 100644 --- a/src/pl/plpython/sql/plpython_function.sql +++ b/src/pl/plpython/sql/plpython_function.sql @@ -151,7 +151,9 @@ CREATE FUNCTION trigger_data() returns trigger language plpythonu as $$ if TD.has_key('relid'): TD['relid'] = "bogus:12345" -for key in sorted(TD.keys()): +skeys = TD.keys() +skeys.sort() +for key in skeys: val = TD[key] plpy.notice("TD[" + key + "] => " + str(val))