aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/expected/plpython_error.out
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/expected/plpython_error.out')
-rw-r--r--src/pl/plpython/expected/plpython_error.out8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pl/plpython/expected/plpython_error.out b/src/pl/plpython/expected/plpython_error.out
index 4d615b41cc5..b2f8fe83eb6 100644
--- a/src/pl/plpython/expected/plpython_error.out
+++ b/src/pl/plpython/expected/plpython_error.out
@@ -97,7 +97,7 @@ CREATE FUNCTION invalid_type_caught(a text) RETURNS text
q = "SELECT fname FROM users WHERE lname = $1"
try:
SD["plan"] = plpy.prepare(q, [ "test" ])
- except plpy.SPIError, ex:
+ except plpy.SPIError as ex:
plpy.notice(str(ex))
return None
rv = plpy.execute(SD["plan"], [ a ])
@@ -122,7 +122,7 @@ CREATE FUNCTION invalid_type_reraised(a text) RETURNS text
q = "SELECT fname FROM users WHERE lname = $1"
try:
SD["plan"] = plpy.prepare(q, [ "test" ])
- except plpy.SPIError, ex:
+ except plpy.SPIError as ex:
plpy.error(str(ex))
rv = plpy.execute(SD["plan"], [ a ])
if len(rv):
@@ -321,9 +321,9 @@ $$
from plpy import spiexceptions
try:
plpy.execute("insert into specific values (%s)" % (i or "NULL"));
-except spiexceptions.NotNullViolation, e:
+except spiexceptions.NotNullViolation as e:
plpy.notice("Violated the NOT NULL constraint, sqlstate %s" % e.sqlstate)
-except spiexceptions.UniqueViolation, e:
+except spiexceptions.UniqueViolation as e:
plpy.notice("Violated the UNIQUE constraint, sqlstate %s" % e.sqlstate)
$$ LANGUAGE plpythonu;
SELECT specific_exception(2);