Commit 41359f21 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-212' into 2.1.x

parents 18c72fd7 9b281a70
...@@ -269,10 +269,11 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -269,10 +269,11 @@ class PostgreSqlPlatform extends AbstractPlatform
$whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND "; $whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND ";
if (strpos($table, ".") !== false) { if (strpos($table, ".") !== false) {
list($schema, $table) = explode(".", $table); list($schema, $table) = explode(".", $table);
$whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = '" . $schema . "'"; $schema = "'" . $schema . "'";
} else { } else {
$whereClause .= "$classAlias.relname = '" . $table . "'"; $schema = "ANY(string_to_array((select setting from pg_catalog.pg_settings where name = 'search_path'),','))";
} }
$whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = $schema";
return $whereClause; return $whereClause;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment