Commit 719461b7 authored by Peter Eisentraut's avatar Peter Eisentraut

Improve message for errors in compiling anonymous PL/Python blocks

The previous code would try to print out a null pointer.

Jan Urbański
parent d9a95c0a
......@@ -1625,7 +1625,11 @@ PLy_procedure_compile(PLyProcedure *proc, const char *src)
return;
}
PLy_elog(ERROR, "could not compile PL/Python function \"%s\"", proc->proname);
if (proc->proname)
PLy_elog(ERROR, "could not compile PL/Python function \"%s\"",
proc->proname);
else
PLy_elog(ERROR, "could not compile anonymous PL/Python code block");
}
static char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment