mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
There, now we support GiST...now what? :)
This commit is contained in:
@@ -7,18 +7,19 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:08 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/access/Attic/Makefile.inc,v 1.2 1996/08/26 06:26:37 scrappy Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
accdir=$(CURDIR)/access
|
||||
VPATH:=$(VPATH):$(accdir):\
|
||||
$(accdir)/common:$(accdir)/hash:$(accdir)/heap:$(accdir)/index:\
|
||||
$(accdir)/rtree:$(accdir)/nbtree:$(accdir)/transam
|
||||
$(accdir)/common:$(accdir)/gist:$(accdir)/hash:$(accdir)/heap:\
|
||||
$(accdir)/index:$(accdir)/rtree:$(accdir)/nbtree:$(accdir)/transam
|
||||
|
||||
|
||||
SUBSRCS=
|
||||
include $(accdir)/common/Makefile.inc
|
||||
include $(accdir)/gist/Makefile.inc
|
||||
include $(accdir)/hash/Makefile.inc
|
||||
include $(accdir)/heap/Makefile.inc
|
||||
include $(accdir)/index/Makefile.inc
|
||||
@@ -27,7 +28,7 @@ include $(accdir)/nbtree/Makefile.inc
|
||||
include $(accdir)/transam/Makefile.inc
|
||||
SRCS_ACCESS:= $(SUBSRCS)
|
||||
|
||||
HEADERS+= attnum.h funcindex.h genam.h hash.h \
|
||||
HEADERS+= attnum.h funcindex.h genam.h gist.h hash.h \
|
||||
heapam.h hio.h htup.h ibit.h iqual.h istrat.h \
|
||||
itup.h nbtree.h printtup.h relscan.h rtree.h \
|
||||
sdir.h skey.h strat.h transam.h tupdesc.h tupmacs.h \
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: genam.h,v 1.1.1.1 1996/07/09 06:21:08 scrappy Exp $
|
||||
* $Id: genam.h,v 1.2 1996/08/26 06:26:40 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -32,7 +32,8 @@ extern Relation index_open(Oid relationId);
|
||||
extern Relation index_openr(char *relationName);
|
||||
extern void index_close(Relation relation);
|
||||
extern InsertIndexResult index_insert(Relation relation,
|
||||
IndexTuple indexTuple);
|
||||
Datum *datum, char *nulls,
|
||||
ItemPointer heap_t_ctid);
|
||||
extern void index_delete(Relation relation, ItemPointer indexItem);
|
||||
extern IndexScanDesc index_beginscan(Relation relation, bool scanFromEnd,
|
||||
uint16 numberOfKeys, ScanKey key);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: hash.h,v 1.1.1.1 1996/07/09 06:21:08 scrappy Exp $
|
||||
* $Id: hash.h,v 1.2 1996/08/26 06:26:42 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
* modeled after Margo Seltzer's hash implementation for unix.
|
||||
@@ -250,7 +250,8 @@ typedef HashItemData *HashItem;
|
||||
extern void hashbuild(Relation heap, Relation index, int natts,
|
||||
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
|
||||
extern InsertIndexResult hashinsert(Relation rel, IndexTuple itup);
|
||||
extern InsertIndexResult hashinsert(Relation rel, Datum *datum, char *nulls,
|
||||
ItemPointer ht_ctid);
|
||||
extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
extern char *hashbeginscan(Relation rel, bool fromEnd, uint16 keysz,
|
||||
ScanKey scankey);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.1.1.1 1996/07/09 06:21:10 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.2 1996/08/26 06:27:28 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -252,11 +252,17 @@ hashbuild(Relation heap,
|
||||
* to the caller.
|
||||
*/
|
||||
InsertIndexResult
|
||||
hashinsert(Relation rel, IndexTuple itup)
|
||||
hashinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid)
|
||||
{
|
||||
HashItem hitem;
|
||||
IndexTuple itup;
|
||||
InsertIndexResult res;
|
||||
|
||||
|
||||
/* generate an index tuple */
|
||||
itup = index_formtuple(RelationGetTupleDescriptor(rel), datum, nulls);
|
||||
itup->t_tid = *ht_ctid;
|
||||
|
||||
if (itup->t_info & INDEX_NULL_MASK)
|
||||
return ((InsertIndexResult) NULL);
|
||||
|
||||
@@ -265,6 +271,7 @@ hashinsert(Relation rel, IndexTuple itup)
|
||||
res = _hash_doinsert(rel, hitem);
|
||||
|
||||
pfree(hitem);
|
||||
pfree(itup);
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.1.1.1 1996/07/09 06:21:11 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.2 1996/08/26 06:27:48 scrappy Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* index_open - open an index relation by relationId
|
||||
@@ -179,7 +179,9 @@ index_close(Relation relation)
|
||||
*/
|
||||
InsertIndexResult
|
||||
index_insert(Relation relation,
|
||||
IndexTuple indexTuple)
|
||||
Datum *datum,
|
||||
char *nulls,
|
||||
ItemPointer heap_t_ctid)
|
||||
{
|
||||
RegProcedure procedure;
|
||||
InsertIndexResult specificResult;
|
||||
@@ -192,7 +194,7 @@ index_insert(Relation relation,
|
||||
* ----------------
|
||||
*/
|
||||
specificResult = (InsertIndexResult)
|
||||
fmgr(procedure, relation, indexTuple, NULL);
|
||||
fmgr(procedure, relation, datum, nulls, heap_t_ctid, NULL);
|
||||
|
||||
/* ----------------
|
||||
* the insert proc is supposed to return a "specific result" and
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: nbtree.h,v 1.2 1996/07/30 07:55:10 scrappy Exp $
|
||||
* $Id: nbtree.h,v 1.3 1996/08/26 06:26:44 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -201,7 +201,8 @@ extern bool BuildingBtree; /* in nbtree.c */
|
||||
extern void btbuild(Relation heap, Relation index, int natts,
|
||||
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
|
||||
extern InsertIndexResult btinsert(Relation rel, IndexTuple itup);
|
||||
extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls,
|
||||
ItemPointer ht_ctid);
|
||||
extern char *btgettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
extern char *btbeginscan(Relation rel, bool fromEnd, uint16 keysz,
|
||||
ScanKey scankey);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.2 1996/07/30 07:56:00 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.3 1996/08/26 06:28:21 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -285,11 +285,16 @@ btbuild(Relation heap,
|
||||
* return an InsertIndexResult to the caller.
|
||||
*/
|
||||
InsertIndexResult
|
||||
btinsert(Relation rel, IndexTuple itup)
|
||||
btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid)
|
||||
{
|
||||
BTItem btitem;
|
||||
IndexTuple itup;
|
||||
InsertIndexResult res;
|
||||
|
||||
/* generate an index tuple */
|
||||
itup = index_formtuple(RelationGetTupleDescriptor(rel), datum, nulls);
|
||||
itup->t_tid = *ht_ctid;
|
||||
|
||||
if (itup->t_info & INDEX_NULL_MASK)
|
||||
return ((InsertIndexResult) NULL);
|
||||
|
||||
@@ -297,6 +302,7 @@ btinsert(Relation rel, IndexTuple itup)
|
||||
|
||||
res = _bt_doinsert(rel, btitem);
|
||||
pfree(btitem);
|
||||
pfree(itup);
|
||||
|
||||
return (res);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.1.1.1 1996/07/09 06:21:13 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.2 1996/08/26 06:29:10 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -273,11 +273,15 @@ rtbuild(Relation heap,
|
||||
* It doesn't do any work; just locks the relation and passes the buck.
|
||||
*/
|
||||
InsertIndexResult
|
||||
rtinsert(Relation r, IndexTuple itup)
|
||||
rtinsert(Relation r, Datum *datum, char *nulls, ItemPointer ht_ctid)
|
||||
{
|
||||
InsertIndexResult res;
|
||||
IndexTuple itup;
|
||||
RTSTATE rtState;
|
||||
|
||||
/* generate an index tuple */
|
||||
itup = index_formtuple(RelationGetTupleDescriptor(r), datum, nulls);
|
||||
itup->t_tid = *ht_ctid;
|
||||
initRtstate(&rtState, r);
|
||||
|
||||
RelationSetLockForWrite(r);
|
||||
|
||||
Reference in New Issue
Block a user