From a2740a455f558a1b8b9cd1962f92980efa4a984a Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Mon, 26 Aug 1996 06:32:06 +0000 Subject: There, now we support GiST...now what? :) --- src/backend/commands/cluster.c | 5 +++-- src/backend/commands/copy.c | 8 +++----- src/backend/commands/defind.c | 28 ++++++++++++++++++++++------ 3 files changed, 28 insertions(+), 13 deletions(-) (limited to 'src/backend/commands') diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index e575e80ef9..0f393aa346 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.2 1996/08/15 07:39:24 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.3 1996/08/26 06:30:19 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -316,11 +316,12 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap) index_create((NewHeap->rd_rel->relname).data, NewIndexName, finfo, +- NULL, /* type info is in the old index */ Old_pg_index_relation_Form->relam, natts, Old_pg_index_Form->indkey, Old_pg_index_Form->indclass, - (uint16)0, (Datum) NULL, NULL); + (uint16)0, (Datum) NULL, NULL, Old_pg_index_Form->indislossy); heap_close(OldIndex); heap_close(NewHeap); diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 109f36f3e5..d0c2a6223e 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.4 1996/08/24 20:48:14 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.5 1996/08/26 06:30:21 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -527,11 +527,9 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) &idatum, index_nulls, finfoP[i]); - ituple = index_formtuple(itupdescArr[i], &idatum, index_nulls); - ituple->t_tid = tuple->t_ctid; - indexRes = index_insert(index_rels[i], ituple); + indexRes = index_insert(index_rels[i], &idatum, index_nulls, + &(tuple->t_ctid)); if (indexRes) pfree(indexRes); - pfree(ituple); } } diff --git a/src/backend/commands/defind.c b/src/backend/commands/defind.c index e350927da0..48d1aa4f87 100644 --- a/src/backend/commands/defind.c +++ b/src/backend/commands/defind.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.3 1996/08/19 01:53:38 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.4 1996/08/26 06:30:23 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -86,8 +86,9 @@ DefineIndex(char *heapRelationName, Datum *parameterA = NULL; FuncIndexInfo fInfo; List *cnfPred = NULL; - - + bool lossy = FALSE; + List *pl; + /* * Handle attributes */ @@ -123,7 +124,19 @@ DefineIndex(char *heapRelationName, /* * Handle parameters * [param list is now different (NOT USED, really) - ay 10/94] + * + * WITH clause reinstated to handle lossy indices. + * -- JMH, 7/22/96 */ + foreach(pl, parameterList) { + int count; + char *ptr; + ParamString *param = (ParamString*)lfirst(pl); + + if (!strcasecmp(param->name, "islossy")) + lossy = TRUE; + } + /* @@ -167,9 +180,10 @@ DefineIndex(char *heapRelationName, index_create(heapRelationName, indexRelationName, - &fInfo, accessMethodId, + &fInfo, NULL, accessMethodId, numberOfAttributes, attributeNumberA, - classObjectId, parameterCount, parameterA, (Node*)cnfPred); + classObjectId, parameterCount, parameterA, (Node*)cnfPred, + lossy); }else { attributeNumberA = (AttrNumber *)palloc(numberOfAttributes * @@ -182,8 +196,10 @@ DefineIndex(char *heapRelationName, classObjectId, relationId); index_create(heapRelationName, indexRelationName, NULL, + ((IndexElem*)lfirst(attributeList))->tname, accessMethodId, numberOfAttributes, attributeNumberA, - classObjectId, parameterCount, parameterA, (Node*)cnfPred); + classObjectId, parameterCount, parameterA, (Node*)cnfPred, + lossy); } } -- cgit v1.2.1