From a616e9d7e7e1520151140d47c95ef6c4a259a1df Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 12 Aug 2014 20:26:52 -0700 Subject: [PATCH] postgis: disable NOTICES by default - refs #2296 --- plugins/input/postgis/connection.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/input/postgis/connection.hpp b/plugins/input/postgis/connection.hpp index c1020fc4f..80b66939c 100644 --- a/plugins/input/postgis/connection.hpp +++ b/plugins/input/postgis/connection.hpp @@ -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); } }