function alreadyClustered($table)
{
$c_schema = $this->_schema;
$this->clean($c_schema);
$this->clean($table);
$sql = "SELECT i.indisclustered\n\t\t\tFROM pg_catalog.pg_class c, pg_catalog.pg_index i\n\t\t\tWHERE c.relname = '{$table}'\n\t\t\t\tAND c.oid = i.indrelid AND i.indisclustered\n\t\t\t\tAND c.relnamespace = (SELECT oid FROM pg_catalog.pg_namespace\n\t\t\t\t\tWHERE nspname='{$c_schema}')\n\t\t\t\t";
$v = $this->selectSet($sql);
if ($v->recordCount() == 0) {
return false;
}
return true;
}