diff options
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r-- | src/backend/commands/cluster.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 560f42b65e8..19c3cf9674c 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -436,43 +436,6 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck, LOCKMOD errmsg("cannot cluster on partial index \"%s\"", RelationGetRelationName(OldIndex)))); - if (!OldIndex->rd_am->amindexnulls) - { - AttrNumber colno; - - /* - * If the AM doesn't index nulls, then it's a partial index unless we - * can prove all the rows are non-null. Note we only need look at the - * first column; multicolumn-capable AMs are *required* to index nulls - * in columns after the first. - */ - colno = OldIndex->rd_index->indkey.values[0]; - if (colno > 0) - { - /* ordinary user attribute */ - if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster on index \"%s\" because access method does not handle null values", - RelationGetRelationName(OldIndex)), - recheck - ? errhint("You might be able to work around this by marking column \"%s\" NOT NULL, or use ALTER TABLE ... SET WITHOUT CLUSTER to remove the cluster specification from the table.", - NameStr(OldHeap->rd_att->attrs[colno - 1]->attname)) - : errhint("You might be able to work around this by marking column \"%s\" NOT NULL.", - NameStr(OldHeap->rd_att->attrs[colno - 1]->attname)))); - } - else if (colno < 0) - { - /* system column --- okay, always non-null */ - } - else - /* index expression, lose... */ - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster on expressional index \"%s\" because its index access method does not handle null values", - RelationGetRelationName(OldIndex)))); - } - /* * Disallow if index is left over from a failed CREATE INDEX CONCURRENTLY; * it might well not contain entries for every heap row, or might not even |