1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-05 02:22:28 +03:00

There, now we support GiST...now what? :)

This commit is contained in:
Marc G. Fournier
1996-08-26 06:32:06 +00:00
parent fe87dbb140
commit a2740a455f
24 changed files with 279 additions and 99 deletions

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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);
}
}