diff options
Diffstat (limited to 'modules/extra/pgsql.cpp')
| -rw-r--r-- | modules/extra/pgsql.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/extra/pgsql.cpp b/modules/extra/pgsql.cpp index e605f0144..6ceb7b517 100644 --- a/modules/extra/pgsql.cpp +++ b/modules/extra/pgsql.cpp @@ -411,7 +411,10 @@ restart: case PGRES_BAD_RESPONSE: case PGRES_FATAL_ERROR: { - SQL::Error err(SQL::QREPLY_FAIL, PQresultErrorMessage(result)); + std::string errmsg = PQresultErrorMessage(result); + for (size_t pos = 0; ((pos = errmsg.find_first_of("\r\n", pos)) != std::string::npos); ) + errmsg[pos] = ' '; + SQL::Error err(SQL::QREPLY_FAIL, errmsg); qinprog.c->OnError(err); break; } |
