postgis: disable NOTICES by default - refs #2296

This commit is contained in:
Dane Springmeyer 2014-08-12 20:26:52 -07:00
parent a968f972e0
commit a616e9d7e7

View file

@ -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);
}
}