You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only use we have had for amindexnulls is in determining whether an
index is safe to cluster on; but since the addition of the amclusterable
flag, that usage is pretty redundant.
In passing, clean up assorted sloppiness from the last patch that touched
pg_am.h: Natts_pg_am was wrong, and ambuildempty was not documented.
* If the AM doesn't index nulls, then it's a partial index unless we
445
-
* can prove all the rows are non-null. Note we only need look at the
446
-
* first column; multicolumn-capable AMs are *required* to index nulls
447
-
* in columns after the first.
448
-
*/
449
-
colno=OldIndex->rd_index->indkey.values[0];
450
-
if (colno>0)
451
-
{
452
-
/* ordinary user attribute */
453
-
if (!OldHeap->rd_att->attrs[colno-1]->attnotnull)
454
-
ereport(ERROR,
455
-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
456
-
errmsg("cannot cluster on index \"%s\" because access method does not handle null values",
457
-
RelationGetRelationName(OldIndex)),
458
-
recheck
459
-
? 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.",
0 commit comments