Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 45d1f1e

Browse files
committed
Adjust PL/Python regression tests some more for Python 3.3.
Commit 2cfb1c6 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.
1 parent 210eb9b commit 45d1f1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pl/plpython/expected/plpython_trigger.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
476476
-- TD keys not corresponding to row columns
477477
CREATE FUNCTION stupid7() RETURNS trigger
478478
AS $$
479-
TD["new"] = {'a': 'foo', 'b': 'bar'}
479+
TD["new"] = {'v': 'foo', 'a': 'bar'}
480480
return "MODIFY";
481481
$$ LANGUAGE plpythonu;
482482
CREATE TRIGGER stupid_trigger7
@@ -490,7 +490,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
490490
-- Unicode variant
491491
CREATE FUNCTION stupid7u() RETURNS trigger
492492
AS $$
493-
TD["new"] = {u'a': 'foo', u'b': 'bar'}
493+
TD["new"] = {u'v': 'foo', u'a': 'bar'}
494494
return "MODIFY"
495495
$$ LANGUAGE plpythonu;
496496
CREATE TRIGGER stupid_trigger7

src/pl/plpython/sql/plpython_trigger.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ DROP TRIGGER stupid_trigger6 ON trigger_test;
253253

254254
CREATE FUNCTION stupid7() RETURNS trigger
255255
AS $$
256-
TD["new"] = {'a': 'foo', 'b': 'bar'}
256+
TD["new"] = {'v': 'foo', 'a': 'bar'}
257257
return "MODIFY";
258258
$$ LANGUAGE plpythonu;
259259

@@ -270,7 +270,7 @@ DROP TRIGGER stupid_trigger7 ON trigger_test;
270270

271271
CREATE FUNCTION stupid7u() RETURNS trigger
272272
AS $$
273-
TD["new"] = {u'a': 'foo', u'b': 'bar'}
273+
TD["new"] = {u'v': 'foo', u'a': 'bar'}
274274
return "MODIFY"
275275
$$ LANGUAGE plpythonu;
276276

0 commit comments

Comments
 (0)