diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-05-02 22:25:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-05-02 22:25:10 +0000 |
commit | e57345975cf8ddbf044bfd164359e74e1a9bcab2 (patch) | |
tree | 6c838a5280564bef5a86cf6892920478f5a57937 /src/backend/commands/cluster.c | |
parent | d3171dd64b33160412b5d133861744215aa78c15 (diff) | |
download | postgresql-e57345975cf8ddbf044bfd164359e74e1a9bcab2.tar.gz postgresql-e57345975cf8ddbf044bfd164359e74e1a9bcab2.zip |
Clean up API for ambulkdelete/amvacuumcleanup as per today's discussion.
This formulation requires every AM to provide amvacuumcleanup, unlike before,
but it's surely a whole lot cleaner. Also, add an 'amstorage' column to
pg_am so that we can get rid of hardwired knowledge in DefineOpClass().
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r-- | src/backend/commands/cluster.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 756b97ee0c3..381b6ed5962 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.146 2006/05/02 15:45:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.147 2006/05/02 22:25:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -339,6 +339,12 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck) errmsg("cannot cluster on partial index \"%s\"", RelationGetRelationName(OldIndex)))); + if (!OldIndex->rd_am->amclusterable) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("cannot cluster on index \"%s\" because access method does not support clustering", + RelationGetRelationName(OldIndex)))); + if (!OldIndex->rd_am->amindexnulls) { AttrNumber colno; @@ -376,12 +382,6 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck) RelationGetRelationName(OldIndex)))); } - if (!OldIndex->rd_am->amclusterable) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster on index \"%s\" because access method does not support clustering", - RelationGetRelationName(OldIndex)))); - /* * Disallow clustering system relations. This will definitely NOT work * for shared relations (we have no way to update pg_class rows in other |