From 2dd33c152cc6030f8b9486e1b0122c4e9418aeb8 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 14 Jan 2020 19:05:15 +0300 Subject: [PATCH] [pg] fix getting table information if search_path contains escaped schema name (eg "812pp") also simplifies the code and now exactly matches postgresql search rules --- lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 381907ecac6..23fd66068f4 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -355,7 +355,7 @@ private function getTableWhereClause(string $table, string $classAlias = 'c', st [$schema, $table] = explode('.', $table); $schema = $this->quoteStringLiteral($schema); } else { - $schema = "ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),','))"; + $schema = 'ANY(current_schemas(true))'; } $table = new Identifier($table);