Skip to content

Commit 719461b

Browse files
committed
Improve message for errors in compiling anonymous PL/Python blocks
The previous code would try to print out a null pointer. Jan Urbański
1 parent d9a95c0 commit 719461b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pl/plpython/plpython.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,11 @@ PLy_procedure_compile(PLyProcedure *proc, const char *src)
16251625
return;
16261626
}
16271627

1628-
PLy_elog(ERROR, "could not compile PL/Python function \"%s\"", proc->proname);
1628+
if (proc->proname)
1629+
PLy_elog(ERROR, "could not compile PL/Python function \"%s\"",
1630+
proc->proname);
1631+
else
1632+
PLy_elog(ERROR, "could not compile anonymous PL/Python code block");
16291633
}
16301634

16311635
static char *

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy