From 8a3631f8d86cdd9b07c577d6e213b1fc824db255 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 2 May 2006 11:28:56 +0000 Subject: GIN: Generalized Inverted iNdex. text[], int4[], Tsearch2 support for GIN. --- src/backend/commands/cluster.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/backend/commands/cluster.c') diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index ce85d077a34..18845eecea2 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.144 2006/03/05 15:58:23 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.145 2006/05/02 11:28:54 teodor Exp $ * *------------------------------------------------------------------------- */ @@ -376,6 +376,13 @@ 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 clusterable", + 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 -- cgit v1.2.3