Commit 03bec228 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-212'

parents c61961f1 f5e731cc
......@@ -269,10 +269,11 @@ class PostgreSqlPlatform extends AbstractPlatform
$whereClause = $namespaceAlias.".nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast') AND ";
if (strpos($table, ".") !== false) {
list($schema, $table) = explode(".", $table);
$whereClause .= "$classAlias.relname = '" . $table . "' AND $namespaceAlias.nspname = '" . $schema . "'";
$schema = "'" . $schema . "'";
} 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;
}
......
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