Skip to content

Commit

Permalink
Merge pull request #492 from sinner/patch-1
Browse files Browse the repository at this point in the history
Fix statement for getTableWhereClause method
  • Loading branch information
beberlei committed Jan 5, 2014
2 parents f0f408c + 2b61c85 commit 0e93271
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 @@ -345,7 +345,7 @@ private function getTableWhereClause($table, $classAlias = 'c', $namespaceAlias
list($schema, $table) = explode(".", $table);
$schema = "'" . $schema . "'";
} else {
$schema = "ANY(string_to_array((select replace(setting,'\"\$user\"',user) from pg_catalog.pg_settings where name = 'search_path'),','))";
$schema = "ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),','))";
}
$whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = $schema";

Expand Down

0 comments on commit 0e93271

Please sign in to comment.