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.
This commit is contained in:
Maximilian Eschenbacher 2020-07-12 00:02:29 +02:00
parent b5b1ee715b
commit d8089560dd
1 changed files with 0 additions and 8 deletions

View File

@ -261,14 +261,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) {
IncreasePendingQueries(1);
result = Query("SET standard_conforming_strings TO off");
}
String dbVersionName = "idoutils";
IncreasePendingQueries(1);
result = Query("SELECT version FROM " + GetTablePrefix() + "dbversion WHERE name=E'" + Escape(dbVersionName) + "'");