postgis: disable NOTICES by default - refs #2296
This commit is contained in:
parent
a968f972e0
commit
a616e9d7e7
1 changed files with 2 additions and 1 deletions
|
@ -67,7 +67,7 @@ public:
|
|||
close();
|
||||
throw mapnik::datasource_exception(err_msg);
|
||||
}
|
||||
PGresult *result = PQexec(conn_, "SET DEFAULT_TRANSACTION_READ_ONLY = TRUE;");
|
||||
PGresult *result = PQexec(conn_, "SET DEFAULT_TRANSACTION_READ_ONLY = TRUE; SET CLIENT_MIN_MESSAGES = WARNING;");
|
||||
bool ok = (result && (PQresultStatus(result) == PGRES_COMMAND_OK));
|
||||
if ( result ) PQclear(result);
|
||||
if ( ! ok ) {
|
||||
|
@ -76,6 +76,7 @@ public:
|
|||
err_msg += "\nConnection string: '";
|
||||
err_msg += connection_str;
|
||||
err_msg += "'\n";
|
||||
close();
|
||||
throw mapnik::datasource_exception(err_msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue