projects
/
users
/
kgrittn
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9a95c0
)
Improve message for errors in compiling anonymous PL/Python blocks
author
Peter Eisentraut
<peter_e@gmx.net>
Tue, 18 Jan 2011 22:03:57 +0000
(
00:03
+0200)
committer
Peter Eisentraut
<peter_e@gmx.net>
Tue, 18 Jan 2011 22:04:46 +0000
(
00:04
+0200)
The previous code would try to print out a null pointer.
Jan UrbaĆski
src/pl/plpython/plpython.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index 03d6962ca0230bcf35109d8ea705217738228e0e..99424d35133625c8b1c0353e697e9533e4fbb313 100644
(file)
--- 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 *