From 35b6547ed1fe2f6a4a2a3b87c03cbd4f18802eb0 Mon Sep 17 00:00:00 2001 From: Maximilian Eschenbacher Date: Sun, 12 Jul 2020 00:02:29 +0200 Subject: [PATCH] ido_pgsql: do not set standard_conforming_strings to off Before postgres 9.1, this setting defaulted to off and icinga2 code was making heavy use of this feature. Since postgres 9.1, this settings defaults to on. During the adoption of postgres >= 9.1, the icinga2 postgres ido code maintained compatibility by setting it to off explicitly. In the mean time, the postgres ido code has been converted to using the `E'...'` escape literal syntax exclusively. The last remaining step is now to no longer force the setting to off because no query is using the feature any longer. Closes github issue #8122. --- lib/db_ido_pgsql/idopgsqlconnection.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp index e458e0d63e2..2fa7784f3b6 100644 --- a/lib/db_ido_pgsql/idopgsqlconnection.cpp +++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp @@ -257,12 +257,6 @@ void IdoPgsqlConnection::Reconnect() IdoPgsqlResult result; - /* explicitely require legacy mode for string escaping in PostgreSQL >= 9.1 - * changing standard_conforming_strings to on by default - */ - if (m_Pgsql->serverVersion(m_Connection) >= 90100) - result = Query("SET standard_conforming_strings TO off"); - String dbVersionName = "idoutils"; result = Query("SELECT version FROM " + GetTablePrefix() + "dbversion WHERE name=E'" + Escape(dbVersionName) + "'");