@@ -327,7 +327,7 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -327,7 +327,7 @@ class PostgreSqlPlatform extends AbstractPlatform
WHERE oid IN (
WHERE oid IN (
SELECT indexrelid
SELECT indexrelid
FROM pg_index, pg_class
FROM pg_index, pg_class
WHERE pg_class.relname = '$table'
WHERE pg_class.relname = $table
AND pg_class.oid = pg_index.indrelid
AND pg_class.oid = pg_index.indrelid
AND (indisunique = 't' OR indisprimary = 't')
AND (indisunique = 't' OR indisprimary = 't')
)";
)";
...
@@ -364,13 +364,14 @@ class PostgreSqlPlatform extends AbstractPlatform
...
@@ -364,13 +364,14 @@ 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);
$schema="'".$schema."'";
$schema=$this->quoteStringLiteral($schema);
}else{
}else{
$schema="ANY(string_to_array((select replace(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'),','))";
}
}
$table=newIdentifier($table);
$table=newIdentifier($table);
$whereClause.="$classAlias.relname = '".$table->getName()."' AND $namespaceAlias.nspname = $schema";