projects
/
plproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db80b89
)
Survive missing sqlstate field on error messages
author
Marko Kreen
<markokr@gmail.com>
Wed, 28 Apr 2010 07:35:06 +0000
(10:35 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 28 Apr 2010 07:35:06 +0000
(10:35 +0300)
src/main.c
patch
|
blob
|
blame
|
history
diff --git
a/src/main.c
b/src/main.c
index a020c22a3f77f4d9310684a386a3eacdb3c9e087..cdfdeff0f4ffee15cea0cd4e84448d98d766d574 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-96,6
+96,10
@@
plproxy_remote_error(ProxyFunction *func, ProxyConnection *conn, const PGresult
const char *ctx = PQresultErrorField(res, PG_DIAG_CONTEXT);
int elevel;
+ /* libpq errors may not have sqlstate */
+ if (!ss)
+ ss = "XX000";
+
if (iserr)
/* must ignore remote level, as it may be FATAL/PANIC */
elevel = ERROR;