Skip to content

Commit

Permalink
[pg] fix getting table information if search_path contains escaped sc…
Browse files Browse the repository at this point in the history
…hema name (eg "812pp")

also simplifies the code and now exactly matches postgresql search rules
  • Loading branch information
linniksa committed Jan 16, 2020
1 parent 2820f6d commit 2dd33c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2dd33c1

Please sign in to comment.