Prevent UNIQUE indexes for non-btree access methods.

This commit is contained in:
Bruce Momjian 1997-01-18 05:48:07 +00:00
parent 3827f4e7f0
commit bc18c38d1a
1 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.9 1996/11/13 20:48:22 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.10 1997/01/18 05:48:07 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -106,6 +106,9 @@ DefineIndex(char *heapRelationName,
} }
relationId = tuple->t_oid; relationId = tuple->t_oid;
if (unique && strcmp(accessMethodName,"btree") != 0)
elog(WARN, "DefineIndex: unique indexes are only available with the btree access method");
/* /*
* compute access method id * compute access method id
*/ */