SELECT sql_error();
ERROR: division by zero
CONTEXT: SQL statement "select 1/0"
-PL/pgSQL function "sql_error" line 3 at SQL statement
+PL/pgSQL function "sql_error()" line 3 at SQL statement
SELECT python_from_sql_error();
ERROR: spiexceptions.DivisionByZero: division by zero
CONTEXT: Traceback (most recent call last):
plpy.execute("select sql_error()")
PL/Python function "python_traceback"
SQL statement "select python_traceback()"
-PL/pgSQL function "python_from_sql_error" line 3 at SQL statement
+PL/pgSQL function "python_from_sql_error()" line 3 at SQL statement
SELECT sql_from_python_error();
ERROR: spiexceptions.DivisionByZero: division by zero
CONTEXT: Traceback (most recent call last):