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();
|
close();
|
||||||
throw mapnik::datasource_exception(err_msg);
|
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));
|
bool ok = (result && (PQresultStatus(result) == PGRES_COMMAND_OK));
|
||||||
if ( result ) PQclear(result);
|
if ( result ) PQclear(result);
|
||||||
if ( ! ok ) {
|
if ( ! ok ) {
|
||||||
|
@ -76,6 +76,7 @@ public:
|
||||||
err_msg += "\nConnection string: '";
|
err_msg += "\nConnection string: '";
|
||||||
err_msg += connection_str;
|
err_msg += connection_str;
|
||||||
err_msg += "'\n";
|
err_msg += "'\n";
|
||||||
|
close();
|
||||||
throw mapnik::datasource_exception(err_msg);
|
throw mapnik::datasource_exception(err_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue