aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpython.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 03d6962ca02..99424d35133 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -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 *