aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql/plpython_ereport.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/sql/plpython_ereport.sql')
-rw-r--r--src/pl/plpython/sql/plpython_ereport.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpython/sql/plpython_ereport.sql b/src/pl/plpython/sql/plpython_ereport.sql
index 889293d33c9..58df2057ef5 100644
--- a/src/pl/plpython/sql/plpython_ereport.sql
+++ b/src/pl/plpython/sql/plpython_ereport.sql
@@ -125,7 +125,7 @@ $$;
DO $$
try:
plpy.execute("select raise_exception(_message => 'my message', _sqlstate => 'XX987', _hint => 'some hint', _table_name => 'users_tab', _datatype_name => 'user_type')")
-except Exception, e:
+except Exception as e:
plpy.info(e.spidata)
raise e
$$ LANGUAGE plpythonu;
@@ -133,7 +133,7 @@ $$ LANGUAGE plpythonu;
DO $$
try:
plpy.error(message = 'my message', sqlstate = 'XX987', hint = 'some hint', table_name = 'users_tab', datatype_name = 'user_type')
-except Exception, e:
+except Exception as e:
plpy.info('sqlstate: %s, hint: %s, table_name: %s, datatype_name: %s' % (e.sqlstate, e.hint, e.table_name, e.datatype_name))
raise e
$$ LANGUAGE plpythonu;