BUGFIX: Make indexList() return double-quotes in index names to prevent unnecessary recreation of the indexes.

This commit is contained in:
Sam Minnee 2012-08-21 16:22:17 +12:00
parent f74e9c260e
commit 8cd458b818

View File

@ -439,6 +439,7 @@ class PostgreSQLDatabase extends SS_Database {
}
}
}
if($indexes) foreach($indexes as $k => $v) $indexSchemas .= $this->getIndexSqlDefinition($tableName, $k, $v) . "\n";
//Do we need to create a tablespace for this item?
@ -1094,7 +1095,7 @@ class PostgreSQLDatabase extends SS_Database {
$key=substr($value[1], 0, strpos($value[1], ')'));
$key=trim(trim(str_replace("\"", '', $key), '()'));
$indexList[$key]['indexname']=$index['indexname'];
$indexList[$key]['spec']=$prefix . '(' . $key . ')';
$indexList[$key]['spec']=$prefix . '("' . preg_replace('/ *, */','","',$key) . '")';
}