aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-05-31 18:16:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-05-31 18:16:55 +0000
commit3043810d977b8197f9671c98439104db80b8e914 (patch)
tree99be1d86e7f18cf24e2016b5c021c2748dc1a8af /src/backend/commands/indexcmds.c
parente1107fc28536bf5f24f388bd701bffb98c09cd06 (diff)
downloadpostgresql-3043810d977b8197f9671c98439104db80b8e914.tar.gz
postgresql-3043810d977b8197f9671c98439104db80b8e914.zip
Updates to make GIST work with multi-key indexes (from Oleg Bartunov
and Teodor Sigaev). Declare key values as Datum where appropriate, rather than char* (Tom Lane).
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 213a3cc3ed0..373a68fbf30 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.48 2001/05/30 20:52:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.49 2001/05/31 18:16:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,13 +120,15 @@ DefineIndex(char *heapRelationName,
/*
* XXX Hardwired hacks to check for limitations on supported index
* types. We really ought to be learning this info from entries in the
- * pg_am table, instead of having it wired in here!
+ * pg_am table, instead of having it wired-in here!
*/
if (unique && accessMethodId != BTREE_AM_OID)
elog(ERROR, "DefineIndex: unique indices are only available with the btree access method");
- if (numberOfAttributes > 1 && accessMethodId != BTREE_AM_OID)
- elog(ERROR, "DefineIndex: multi-column indices are only available with the btree access method");
+ if (numberOfAttributes > 1 &&
+ !( accessMethodId == BTREE_AM_OID ||
+ accessMethodId == GIST_AM_OID))
+ elog(ERROR, "DefineIndex: multi-column indices are only available with the btree or GiST access methods");
/*
* WITH clause reinstated to handle lossy indices. -- JMH, 7/22/96