Almost done access...
This commit is contained in:
parent
4fa90e38d5
commit
500ce42f37
|
@ -4,14 +4,15 @@
|
||||||
# Makefile for access/nbtree
|
# Makefile for access/nbtree
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Makefile,v 1.2 1996/11/03 09:06:55 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/backend/access/nbtree/Makefile,v 1.3 1996/11/05 10:35:27 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
SRCDIR = ../../..
|
SRCDIR = ../../..
|
||||||
include ../../../Makefile.global
|
include ../../../Makefile.global
|
||||||
|
|
||||||
INCLUDE_OPT = -I../../port/$(PORTNAME) \
|
INCLUDE_OPT = -I../.. \
|
||||||
|
-I../../port/$(PORTNAME) \
|
||||||
-I../../../include
|
-I../../../include
|
||||||
|
|
||||||
CFLAGS+=$(INCLUDE_OPT)
|
CFLAGS+=$(INCLUDE_OPT)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.4 1996/11/03 22:57:48 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.5 1996/11/05 10:35:28 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* These functions are stored in pg_amproc. For each operator class
|
* These functions are stored in pg_amproc. For each operator class
|
||||||
|
@ -22,8 +22,9 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
#include "utils/nabstime.h"
|
|
||||||
|
#include <utils/nabstime.h>
|
||||||
|
|
||||||
int32
|
int32
|
||||||
btint2cmp(int16 a, int16 b)
|
btint2cmp(int16 a, int16 b)
|
||||||
|
|
|
@ -7,41 +7,20 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.5 1996/11/03 12:35:11 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.6 1996/11/05 10:35:29 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <postgres.h>
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <utils/memutils.h>
|
||||||
|
#include <storage/bufpage.h>
|
||||||
#include "utils/rel.h"
|
#include <access/nbtree.h>
|
||||||
|
#include <storage/bufmgr.h>
|
||||||
#include "storage/buf.h"
|
|
||||||
|
|
||||||
#include "storage/block.h"
|
|
||||||
#include "storage/off.h"
|
|
||||||
#include "storage/itemptr.h"
|
|
||||||
#include "access/itup.h"
|
|
||||||
#include "access/funcindex.h"
|
|
||||||
#include "storage/itemid.h"
|
|
||||||
#include "storage/item.h"
|
|
||||||
#include "storage/bufpage.h"
|
|
||||||
#include "utils/nabstime.h"
|
|
||||||
#include "utils/palloc.h"
|
|
||||||
#include "access/htup.h"
|
|
||||||
#include "utils/tqual.h"
|
|
||||||
#include "access/relscan.h"
|
|
||||||
#include "access/sdir.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
#include "storage/ipc.h"
|
|
||||||
#include "storage/bufmgr.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
# include "regex/utils.h"
|
# include <regex/utils.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.5 1996/11/03 22:57:52 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.6 1996/11/05 10:35:30 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||||
|
@ -22,30 +22,20 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
#include <storage/bufpage.h>
|
||||||
|
#include <access/nbtree.h>
|
||||||
#include "access/itup.h"
|
#include <miscadmin.h>
|
||||||
#include "access/funcindex.h"
|
#include <storage/bufmgr.h>
|
||||||
#include "storage/bufpage.h"
|
#include <storage/lmgr.h>
|
||||||
#include "access/htup.h"
|
|
||||||
#include "access/relscan.h"
|
|
||||||
#include "access/sdir.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
#include "storage/lmgr.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
# include "regex/utils.h"
|
# include <regex/utils.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "miscadmin.h"
|
|
||||||
|
|
||||||
#include "storage/bufmgr.h"
|
|
||||||
|
|
||||||
#define BTREE_METAPAGE 0
|
#define BTREE_METAPAGE 0
|
||||||
#define BTREE_MAGIC 0x053162
|
#define BTREE_MAGIC 0x053162
|
||||||
#define BTREE_VERSION 0
|
#define BTREE_VERSION 0
|
||||||
|
|
|
@ -8,34 +8,30 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.8 1996/11/03 22:57:54 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.9 1996/11/05 10:35:32 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This file contains only the public interface routines.
|
* This file contains only the public interface routines.
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
#include <access/genam.h>
|
||||||
#include "access/genam.h"
|
#include <storage/bufpage.h>
|
||||||
|
#include <storage/bufmgr.h>
|
||||||
|
#include <access/nbtree.h>
|
||||||
|
#include <executor/executor.h>
|
||||||
|
#include <access/heapam.h>
|
||||||
|
#include <catalog/index.h>
|
||||||
|
#include <miscadmin.h>
|
||||||
|
|
||||||
#include "storage/bufpage.h"
|
#ifndef HAVE_MEMMOVE
|
||||||
#include "storage/bufmgr.h"
|
# include <regex/utils.h>
|
||||||
#include "access/htup.h"
|
#else
|
||||||
#include "utils/palloc.h"
|
# include <string.h>
|
||||||
#include "access/nbtree.h"
|
#endif
|
||||||
|
|
||||||
#include "executor/executor.h"
|
|
||||||
|
|
||||||
#include "access/heapam.h"
|
|
||||||
|
|
||||||
#include "catalog/index.h"
|
|
||||||
|
|
||||||
#include "miscadmin.h"
|
|
||||||
|
|
||||||
bool BuildingBtree = false;
|
bool BuildingBtree = false;
|
||||||
bool FastBuild = false; /* turn this on to make bulk builds work*/
|
bool FastBuild = false; /* turn this on to make bulk builds work*/
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.4 1996/11/03 22:57:55 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.5 1996/11/05 10:35:33 scrappy Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
|
@ -27,19 +27,10 @@
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
|
||||||
|
|
||||||
#include "access/itup.h"
|
|
||||||
#include "access/funcindex.h"
|
|
||||||
#include "storage/bufpage.h"
|
|
||||||
#include "access/htup.h"
|
|
||||||
#include "utils/palloc.h"
|
|
||||||
#include "access/relscan.h"
|
|
||||||
#include "access/sdir.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
|
#include <storage/bufpage.h>
|
||||||
|
#include <access/nbtree.h>
|
||||||
|
|
||||||
typedef struct BTScanListData {
|
typedef struct BTScanListData {
|
||||||
IndexScanDesc btsl_scan;
|
IndexScanDesc btsl_scan;
|
||||||
|
|
|
@ -7,29 +7,25 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.7 1996/11/03 22:57:56 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.8 1996/11/05 10:35:34 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
#include <access/genam.h>
|
||||||
#include "access/genam.h"
|
#include <fmgr.h>
|
||||||
|
#include <storage/bufpage.h>
|
||||||
#include "storage/bufpage.h"
|
#include <storage/bufmgr.h>
|
||||||
#include "storage/bufmgr.h"
|
#include <access/nbtree.h>
|
||||||
#include "access/htup.h"
|
|
||||||
#include "utils/palloc.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
# include "regex/utils.h"
|
# include <regex/utils.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fmgr.h"
|
|
||||||
|
|
||||||
static BTStack _bt_searchr(Relation rel, int keysz, ScanKey scankey, Buffer *bufP, BTStack stack_in);
|
static BTStack _bt_searchr(Relation rel, int keysz, ScanKey scankey, Buffer *bufP, BTStack stack_in);
|
||||||
static OffsetNumber _bt_firsteq(Relation rel, TupleDesc itupdesc, Page page, Size keysz, ScanKey scankey, OffsetNumber offnum);
|
static OffsetNumber _bt_firsteq(Relation rel, TupleDesc itupdesc, Page page, Size keysz, ScanKey scankey, OffsetNumber offnum);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Id: nbtsort.c,v 1.7 1996/11/03 22:57:57 scrappy Exp $
|
* $Id: nbtsort.c,v 1.8 1996/11/05 10:35:35 scrappy Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
|
@ -47,30 +47,22 @@
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
#include <utils/memutils.h>
|
||||||
|
#include <storage/bufpage.h>
|
||||||
|
#include <access/nbtree.h>
|
||||||
|
#include <storage/bufmgr.h>
|
||||||
|
|
||||||
#include "access/itup.h"
|
|
||||||
#include "access/funcindex.h"
|
|
||||||
#include "storage/bufpage.h"
|
|
||||||
#include "access/htup.h"
|
|
||||||
#include "utils/palloc.h"
|
|
||||||
#include "access/relscan.h"
|
|
||||||
#include "access/sdir.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
# include "regex/utils.h"
|
# include <regex/utils.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "storage/bufmgr.h"
|
|
||||||
|
|
||||||
#ifdef FASTBUILD
|
#ifdef FASTBUILD
|
||||||
|
|
||||||
#define MAXTAPES (7)
|
#define MAXTAPES (7)
|
||||||
|
|
|
@ -7,22 +7,16 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.3 1996/11/03 22:57:59 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.4 1996/11/05 10:35:37 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
#include <access/istrat.h>
|
||||||
|
#include <storage/bufpage.h>
|
||||||
#include "access/itup.h"
|
#include <access/nbtree.h>
|
||||||
#include "access/funcindex.h"
|
|
||||||
#include "storage/bufpage.h"
|
|
||||||
#include "access/htup.h"
|
|
||||||
#include "access/relscan.h"
|
|
||||||
#include "access/sdir.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note:
|
* Note:
|
||||||
|
|
|
@ -7,30 +7,25 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.6 1996/11/03 22:57:59 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.7 1996/11/05 10:35:38 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <time.h>
|
#include <postgres.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
#include <access/genam.h>
|
||||||
|
#include <fmgr.h>
|
||||||
|
#include <storage/bufpage.h>
|
||||||
|
#include <access/nbtree.h>
|
||||||
|
#include <access/istrat.h>
|
||||||
|
#include <access/iqual.h>
|
||||||
|
|
||||||
#include "utils/rel.h"
|
|
||||||
#include "access/genam.h"
|
|
||||||
|
|
||||||
#include "storage/bufpage.h"
|
|
||||||
#include "access/htup.h"
|
|
||||||
#include "utils/palloc.h"
|
|
||||||
#include "access/nbtree.h"
|
|
||||||
#include "access/istrat.h"
|
|
||||||
#include "access/iqual.h"
|
|
||||||
#ifndef HAVE_MEMMOVE
|
#ifndef HAVE_MEMMOVE
|
||||||
# include "regex/utils.h"
|
# include <regex/utils.h>
|
||||||
#else
|
#else
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#include "fmgr.h"
|
|
||||||
|
|
||||||
ScanKey
|
ScanKey
|
||||||
_bt_mkscankey(Relation rel, IndexTuple itup)
|
_bt_mkscankey(Relation rel, IndexTuple itup)
|
||||||
|
|
Loading…
Reference in New Issue