Improve message for errors in compiling anonymous PL/Python blocks
The previous code would try to print out a null pointer. Jan Urbański
This commit is contained in:
parent
d9a95c0adb
commit
719461b7a2
@ -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 *
|
||||
|
Loading…
x
Reference in New Issue
Block a user