Skip to content
Snippets Groups Projects
Commit 45d1f1e0 authored by Tom Lane's avatar Tom Lane
Browse files

Adjust PL/Python regression tests some more for Python 3.3.

Commit 2cfb1c6f fixed some issues caused
by Python 3.3 choosing to iterate through dict entries in a different order
than before.  But here's another one: the test cases adjusted here made two
bad entries in a dict and expected the one complained of would always be
the same.

Possibly this should be back-patched further than 9.2, but there seems
little point unless the earlier fix is too.
parent 210eb9b7
No related branches found
No related tags found
No related merge requests found
......@@ -476,7 +476,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
-- TD keys not corresponding to row columns
CREATE FUNCTION stupid7() RETURNS trigger
AS $$
TD["new"] = {'a': 'foo', 'b': 'bar'}
TD["new"] = {'v': 'foo', 'a': 'bar'}
return "MODIFY";
$$ LANGUAGE plpythonu;
CREATE TRIGGER stupid_trigger7
......@@ -490,7 +490,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
-- Unicode variant
CREATE FUNCTION stupid7u() RETURNS trigger
AS $$
TD["new"] = {u'a': 'foo', u'b': 'bar'}
TD["new"] = {u'v': 'foo', u'a': 'bar'}
return "MODIFY"
$$ LANGUAGE plpythonu;
CREATE TRIGGER stupid_trigger7
......
......@@ -253,7 +253,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
CREATE FUNCTION stupid7() RETURNS trigger
AS $$
TD["new"] = {'a': 'foo', 'b': 'bar'}
TD["new"] = {'v': 'foo', 'a': 'bar'}
return "MODIFY";
$$ LANGUAGE plpythonu;
......@@ -270,7 +270,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
CREATE FUNCTION stupid7u() RETURNS trigger
AS $$
TD["new"] = {u'a': 'foo', u'b': 'bar'}
TD["new"] = {u'v': 'foo', u'a': 'bar'}
return "MODIFY"
$$ LANGUAGE plpythonu;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment