#include file cleanup

This commit is contained in:
Marc G. Fournier 1996-10-20 10:53:18 +00:00
parent e1220b7c21
commit 13cd836d62
9 changed files with 261 additions and 83 deletions

View File

@ -1,13 +1,13 @@
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* btcompare.c-- * nbtcompare.c--
* Comparison functions for btree access method. * Comparison functions for btree access method.
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.2 1996/10/20 10:53:02 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
@ -19,8 +19,9 @@
* > 0 if a > b. * > 0 if a > b.
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <string.h>
#include "postgres.h" #include "postgres.h"
#include <time.h>
#include "utils/nabstime.h" #include "utils/nabstime.h"
int32 int32

View File

@ -7,24 +7,48 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.2 1996/10/20 10:53:03 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "utils/elog.h" #include "access/tupdesc.h"
#include "utils/palloc.h" #include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "access/heapam.h" #include "storage/buf.h"
#include "access/genam.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 <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/bufmgr.h"
static InsertIndexResult _bt_insertonpg(Relation rel, Buffer buf, BTStack stack, int keysz, ScanKey scankey, BTItem btitem, BTItem afteritem); static InsertIndexResult _bt_insertonpg(Relation rel, Buffer buf, BTStack stack, int keysz, ScanKey scankey, BTItem btitem, BTItem afteritem);
static Buffer _bt_split(Relation rel, Buffer buf); static Buffer _bt_split(Relation rel, Buffer buf);
static OffsetNumber _bt_findsplitloc(Relation rel, Page page, OffsetNumber start, OffsetNumber maxoff, Size llimit); static OffsetNumber _bt_findsplitloc(Relation rel, Page page, OffsetNumber start, OffsetNumber maxoff, Size llimit);

View File

@ -1,6 +1,6 @@
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* btpage.c-- * nbtpage.c--
* BTree-specific page management code for the Postgres btree access * BTree-specific page management code for the Postgres btree access
* method. * method.
* *
@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.2 1996/10/20 10:53:06 scrappy Exp $
* *
* NOTES * NOTES
* Postgres btree pages look like ordinary relation pages. The opaque * Postgres btree pages look like ordinary relation pages. The opaque
@ -19,18 +19,44 @@
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "utils/elog.h" #include "access/tupdesc.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "access/genam.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 <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
#include <stdio.h>
#include "storage/ipc.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

View File

@ -8,36 +8,64 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.3 1996/08/26 06:28:21 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.4 1996/10/20 10:53:08 scrappy Exp $
* *
* NOTES * NOTES
* This file contains only the public interface routines. * This file contains only the public interface routines.
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "utils/elog.h" #include "access/tupdesc.h"
#include "utils/palloc.h" #include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "access/heapam.h" #include "storage/block.h"
#include "access/genam.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/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h" #include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
#include "access/funcindex.h"
#include "nodes/execnodes.h" #include "nodes/params.h"
#include "nodes/plannodes.h" #include "executor/hashjoin.h"
#include "nodes/primnodes.h"
#include "executor/executor.h" #include "nodes/memnodes.h"
#include "executor/tuptable.h" #include "executor/tuptable.h"
#include "nodes/execnodes.h"
#include "catalog/index.h" #include "nodes/plannodes.h"
#include "nodes/parsenodes.h"
#include "tcop/dest.h"
#include "executor/execdesc.h"
#include <stdio.h>
#include "catalog/pg_index.h"
#include "executor/executor.h"
#include "access/heapam.h"
#include "access/genam.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*/

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2 1996/10/20 10:53:10 scrappy Exp $
* *
* *
* NOTES * NOTES
@ -26,21 +26,40 @@
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "utils/elog.h" #include "access/tupdesc.h"
#include "utils/palloc.h" #include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "access/heapam.h" #include "storage/block.h"
#include "access/genam.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/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h" #include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
typedef struct BTScanListData { typedef struct BTScanListData {
IndexScanDesc btsl_scan; IndexScanDesc btsl_scan;
struct BTScanListData *btsl_next; struct BTScanListData *btsl_next;

View File

@ -7,25 +7,40 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.2 1996/07/30 07:56:02 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.3 1996/10/20 10:53:11 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "utils/elog.h" #include "access/tupdesc.h"
#include "utils/palloc.h" #include "storage/fd.h"
#include "utils/rel.h" #include "catalog/pg_am.h"
#include "utils/excid.h" #include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "fmgr.h" #include "rewrite/prs2lock.h"
#include "access/heapam.h"
#include "access/genam.h"
#include "access/skey.h" #include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.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/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h" #include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"

View File

@ -5,7 +5,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: nbtsort.c,v 1.3 1996/10/18 05:21:20 scrappy Exp $ * $Id: nbtsort.c,v 1.4 1996/10/20 10:53:13 scrappy Exp $
* *
* NOTES * NOTES
* *
@ -47,17 +47,43 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <stdio.h> #include "postgres.h"
#include "c.h" #include "catalog/pg_attribute.h"
#include "access/attnum.h"
#include "nodes/pg_list.h"
#include "access/tupdesc.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.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/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
#include <stdio.h>
#include <fcntl.h>
#include "storage/ipc.h"
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "storage/fd.h"
#include "utils/rel.h"
#include "utils/palloc.h"
#include "utils/elog.h"
#ifdef FASTBUILD #ifdef FASTBUILD

View File

@ -7,19 +7,41 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.1.1.1 1996/07/09 06:21:12 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.2 1996/10/20 10:53:16 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "storage/bufpage.h" #include "catalog/pg_attribute.h"
#include "access/attnum.h"
#include "utils/elog.h" #include "nodes/pg_list.h"
#include "access/tupdesc.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "access/genam.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/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
/* /*

View File

@ -7,28 +7,45 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.2 1996/07/30 07:56:04 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.3 1996/10/20 10:53:18 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <stdio.h>
#include "postgres.h" #include "postgres.h"
#include "storage/bufmgr.h" #include "catalog/pg_attribute.h"
#include "storage/bufpage.h" #include "access/attnum.h"
#include "nodes/pg_list.h"
#include "fmgr.h" #include "access/tupdesc.h"
#include "utils/elog.h" #include "storage/fd.h"
#include "utils/palloc.h" #include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/strat.h"
#include "utils/rel.h" #include "utils/rel.h"
#include "utils/excid.h"
#include "utils/datum.h"
#include "access/heapam.h" #include "storage/block.h"
#include "access/genam.h" #include "storage/off.h"
#include "access/iqual.h" #include "storage/itemptr.h"
#include "access/itup.h"
#include "access/funcindex.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h" #include "access/nbtree.h"
#include "access/istrat.h"
ScanKey ScanKey
_bt_mkscankey(Relation rel, IndexTuple itup) _bt_mkscankey(Relation rel, IndexTuple itup)
{ {