*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.53 1999/06/12 14:07:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.53.2.1 1999/08/02 05:24:25 scrappy Exp $
*
* NOTES
* The old interface functions have been converted to macros
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/heapam.h>
-#include <access/htup.h>
-#include <access/transam.h>
-#include <access/tupmacs.h>
-#include <catalog/pg_type.h>
-#include <storage/bufpage.h>
-#include <utils/memutils.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "access/heapam.h"
+#include "catalog/pg_type.h"
/* Used by heap_getattr() macro, for speed */
long heap_sysoffset[] = {
len += bitmaplen;
}
- hoff = len = DOUBLEALIGN(len); /* be conservative here */
+ hoff = len = MAXALIGN(len); /* be conservative here */
len += ComputeDataSize(tupleDescriptor, value, nulls);
len = offsetof(HeapTupleHeaderData, t_bits);
- hoff = len = DOUBLEALIGN(len); /* be conservative */
+ hoff = len = MAXALIGN(len); /* be conservative */
len += structlen;
tuple = (HeapTuple) palloc(HEAPTUPLESIZE + len);
td = tuple->t_data = (HeapTupleHeader) ((char *) tuple + HEAPTUPLESIZE);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.33 1999/02/13 23:14:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.33.2.1 1999/08/02 05:24:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/heapam.h>
-#include <access/ibit.h>
-#include <access/itup.h>
-#include <access/tupmacs.h>
-#include <catalog/pg_type.h>
+#include "access/heapam.h"
+#include "access/itup.h"
+#include "catalog/pg_type.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
/* ----------------------------------------------------------------
* index_ tuple interface routines
hoff = IndexInfoFindDataOffset(infomask);
size = hoff + ComputeDataSize(tupleDescriptor, value, null);
- size = DOUBLEALIGN(size); /* be conservative */
+ size = MAXALIGN(size); /* be conservative */
tp = (char *) palloc(size);
tuple = (IndexTuple) tp;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.21 1999/02/13 23:14:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.21.2.1 1999/08/02 05:24:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-#include <fmgr.h>
+#include "postgres.h"
-#include <access/htup.h>
-#include <access/iqual.h>
-#include <access/itup.h>
-#include <access/skey.h>
-#include <executor/execdebug.h>
+#include "access/iqual.h"
+#include "executor/execdebug.h"
/* ----------------------------------------------------------------
* index scan key qualification code
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.47 1999/05/25 22:40:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.47.2.1 1999/08/02 05:24:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "fmgr.h"
#include "access/heapam.h"
#include "access/printtup.h"
#include "catalog/pg_type.h"
-#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "utils/syscache.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.14 1999/05/25 16:06:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.14.2.1 1999/08/02 05:24:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <fmgr.h>
-#include <access/skey.h>
+#include "access/skey.h"
/*
* ScanKeyEntryIsLegal
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.50 1999/05/25 22:40:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.50.2.1 1999/08/02 05:24:26 scrappy Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
+#include "postgres.h"
-#include <postgres.h>
+#include "catalog/pg_type.h"
+#include "nodes/parsenodes.h"
+#include "parser/parse_type.h"
+#include "utils/builtins.h"
+#include "utils/syscache.h"
-#include <catalog/pg_type.h>
-#include <nodes/parsenodes.h>
-#include <parser/parse_type.h>
-#include <utils/builtins.h>
-#include <utils/fcache.h>
-#include <utils/syscache.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
/* ----------------------------------------------------------------
* CreateTemplateTupleDesc
*
*
* IDENTIFICATION
- *
+ * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.38.2.1 1999/08/02 05:24:28 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <fmgr.h>
-#include <access/genam.h>
-#include <access/gist.h>
-#include <access/gistscan.h>
-#include <access/heapam.h>
-#include <catalog/index.h>
-#include <executor/executor.h>
-#include <storage/bufmgr.h>
-#include <storage/bufpage.h>
-#include <storage/lmgr.h>
-#include <utils/syscache.h>
-#include <utils/tqual.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/gist.h"
+#include "access/gistscan.h"
+#include "access/heapam.h"
+#include "catalog/index.h"
+#include "catalog/pg_index.h"
+#include "executor/executor.h"
+#include "utils/syscache.h"
+
/* non-export function prototypes */
static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup,
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
static void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l);
+#ifdef GISTDEBUG
static char *int_range_out(INTRANGE *r);
+#endif
/*
** routine to build an index. Basically calls insert over and over
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <access/relscan.h>
-#include <storage/bufpage.h>
-#include <access/sdir.h>
-#include <access/itup.h>
-#include <access/gist.h>
-#include <executor/execdebug.h>
-#include <storage/bufmgr.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/gist.h"
+#include "executor/execdebug.h"
+
static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <access/gist.h>
-#include <access/gistscan.h>
-#include <access/genam.h>
-#include <access/rtree.h>
-#include <storage/bufmgr.h>
-#include <access/giststrat.h>
-#include <storage/lmgr.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/gist.h"
+#include "access/gistscan.h"
+
/* routines defined and used here */
static void gistregscan(IndexScanDesc s);
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/gist.h>
-#include <access/istrat.h>
+#include "access/gist.h"
+#include "access/istrat.h"
/*
* Note: negate, commute, and negatecommute all assume that operators are
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.26 1999/05/25 16:06:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.26.2.1 1999/08/02 05:24:33 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <executor/executor.h>
-#include <access/heapam.h>
-#include <access/genam.h>
-#include <catalog/index.h>
-#include <storage/bufmgr.h>
-#include <miscadmin.h>
+#include "access/genam.h"
+#include "access/hash.h"
+#include "access/heapam.h"
+#include "catalog/index.h"
+#include "executor/executor.h"
+#include "miscadmin.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
bool BuildingHash = false;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.18 1999/05/25 22:40:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.18.2.1 1999/08/02 05:24:33 scrappy Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
#include "postgres.h"
#include "access/hash.h"
-#include "utils/int8.h"
uint32
hashint2(int16 key)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.15 1999/02/13 23:14:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.15.2.1 1999/08/02 05:24:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <storage/bufmgr.h>
-#include <utils/memutils.h>
+#include "access/hash.h"
static InsertIndexResult _hash_insertonpg(Relation rel, Buffer buf, int keysz, ScanKey scankey, HashItem hitem, Buffer metabuf);
static OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf, int keysz, ScanKey itup_scankey, Size itemsize, HashItem hitem);
itemsz = IndexTupleDSize(hitem->hash_itup)
+ (sizeof(HashItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
while (PageGetFreeSpace(page) < itemsz)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.20 1999/02/13 23:14:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.20.2.1 1999/08/02 05:24:34 scrappy Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <storage/bufmgr.h>
-#include <utils/memutils.h>
+#include "access/hash.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
static OverflowPageAddress _hash_getovfladdr(Relation rel, Buffer *metabufp);
static uint32 _hash_firstfreebit(uint32 map);
hitem = (HashItem) PageGetItem(rpage, PageGetItemId(rpage, roffnum));
itemsz = IndexTupleDSize(hitem->hash_itup)
+ (sizeof(HashItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
/*
* walk up the bucket chain, looking for a page big enough for
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.17 1999/02/13 23:14:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.17.2.1 1999/08/02 05:24:35 scrappy Exp $
*
* NOTES
* Because we can be doing an index scan on a relation while we
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
+#include "access/hash.h"
static void _hash_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno);
static bool _hash_scantouched(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.17 1999/02/13 23:14:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.17.2.1 1999/08/02 05:24:35 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <storage/bufmgr.h>
+#include "access/hash.h"
-#ifndef HAVE_MEMMOVE
-#include "regex/utils.h"
-#else
-#include <string.h>
-#endif
/*
* _hash_search() -- Finds the page/bucket that the contains the
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.13 1999/02/13 23:14:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/Attic/hashstrat.c,v 1.13.2.1 1999/08/02 05:24:36 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <access/istrat.h>
/*
* only one valid strategy for hash tables: equality.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.15 1999/02/13 23:14:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.15.2.1 1999/08/02 05:24:36 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <fmgr.h>
-#include <utils/memutils.h>
-#include <access/iqual.h>
+#include "access/hash.h"
+#include "access/iqual.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
ScanKey
_hash_mkscankey(Relation rel, IndexTuple itup, HashMetaPage metap)
Assert(((PageHeader) (page))->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData)));
#if 1
Assert(((PageHeader) (page))->pd_upper <=
- (BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
+ (BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(((PageHeader) (page))->pd_special ==
- (BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
+ (BLCKSZ - MAXALIGN(sizeof(HashPageOpaqueData))));
Assert(((PageHeader) (page))->pd_opaque.od_pagesize == BLCKSZ);
#endif
if (flags)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.16 1999/07/03 00:32:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.16.2.1 1999/08/02 05:24:37 scrappy Exp $
*
* NOTES
* initam should be moved someplace else.
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <time.h>
-#include <postgres.h>
+#include "postgres.h"
-#include <access/heapam.h>
-#include <utils/mcxt.h>
+#include "access/heapam.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
static void InitHeapAccessStatistics(void);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.17 1999/05/25 16:07:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.17.2.1 1999/08/02 05:24:38 scrappy Exp $
*
* NOTES
* many of the old access method routines have been turned into
* ----------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
+#include "access/genam.h"
-#include <utils/catcache.h>
-#include <access/genam.h>
-#include <storage/bufmgr.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
/* ----------------------------------------------------------------
* general access method routines
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.33 1999/06/19 04:54:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.33.2.1 1999/08/02 05:24:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "miscadmin.h"
#include "access/heapam.h"
#include "access/istrat.h"
#include "catalog/catname.h"
#include "catalog/pg_amproc.h"
#include "catalog/pg_index.h"
#include "catalog/pg_operator.h"
+#include "miscadmin.h"
#include "utils/syscache.h"
-#include "fmgr.h"
-#include "utils/memutils.h" /* could have been access/itup.h */
#ifdef USE_ASSERT_CHECKING
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.24 1999/05/25 22:40:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.24.2.1 1999/08/02 05:24:40 scrappy Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <postgres.h>
+#include "postgres.h"
-#include <utils/builtins.h>
-#include <utils/nabstime.h>
+#include "utils/builtins.h"
int32
btint2cmp(int16 a, int16 b)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.42 1999/05/25 22:04:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.42.2.1 1999/08/02 05:24:40 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <utils/memutils.h>
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
-#include <access/heapam.h>
-#include <access/xact.h>
-#include <fmgr.h>
+#include "access/heapam.h"
+#include "access/nbtree.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
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, OffsetNumber firstright);
itemsz = IndexTupleDSize(btitem->bti_itup)
+ (sizeof(BTItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz); /* be safe, PageAddItem will do
+ itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do
* this but we need to be
* consistent */
if (currsize > maxsize)
maxsize = currsize;
maxsize += sizeof(PageHeaderData) +
- DOUBLEALIGN(sizeof(BTPageOpaqueData));
+ MAXALIGN(sizeof(BTPageOpaqueData));
if (maxsize >= PageGetPageSize(page) / 2)
do_split = true;
}
maxoff = PageGetMaxOffsetNumber(page);
llimit = PageGetPageSize(page) - sizeof(PageHeaderData) -
- DOUBLEALIGN(sizeof(BTPageOpaqueData))
+ MAXALIGN(sizeof(BTPageOpaqueData))
+sizeof(ItemIdData);
llimit /= 2;
firstright = _bt_findsplitloc(rel, page, start, maxoff, llimit);
* then we must forse insertion.
*/
if (!parent_chained &&
- DOUBLEALIGN(IndexTupleDSize(lowLeftItem->bti_itup)) ==
- DOUBLEALIGN(IndexTupleDSize(stack->bts_btitem->bti_itup)))
+ MAXALIGN(IndexTupleDSize(lowLeftItem->bti_itup)) ==
+ MAXALIGN(IndexTupleDSize(stack->bts_btitem->bti_itup)))
{
_bt_updateitem(rel, keysz, pbuf,
stack->bts_btitem, lowLeftItem);
/* add passed hikey */
itemsz = IndexTupleDSize(hikey->bti_itup)
+ (sizeof(BTItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
if (PageAddItem(page, (Item) hikey, itemsz, P_HIKEY, LP_USED) == InvalidOffsetNumber)
elog(FATAL, "btree: failed to add hikey in _bt_shift");
pfree(hikey);
/* add btitem */
itemsz = IndexTupleDSize(btitem->bti_itup)
+ (sizeof(BTItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
if (PageAddItem(page, (Item) btitem, itemsz, P_FIRSTKEY, LP_USED) == InvalidOffsetNumber)
elog(FATAL, "btree: failed to add firstkey in _bt_shift");
pfree(btitem);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.24 1999/06/07 14:28:22 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.24.2.1 1999/08/02 05:24:41 scrappy Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <time.h>
-#include <postgres.h>
+#include "postgres.h"
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
-#include <miscadmin.h>
-#include <storage/lmgr.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "access/nbtree.h"
+#include "miscadmin.h"
#define BTREE_METAPAGE 0
#define BTREE_MAGIC 0x053162
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.41 1999/06/07 15:14:54 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.41.2.1 1999/08/02 05:24:41 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
*-------------------------------------------------------------------------
*/
-#include <postgres.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>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/heapam.h"
+#include "access/nbtree.h"
+#include "catalog/index.h"
+#include "executor/executor.h"
+#include "miscadmin.h"
#ifdef BTREE_BUILD_STATS
-#include <tcop/tcopprot.h>
-#include <utils/trace.h>
#define ShowExecutorStats pg_options[TRACE_EXECUTORSTATS]
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.23 1999/05/25 22:04:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.23.2.1 1999/08/02 05:24:41 scrappy Exp $
*
*
* NOTES
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
+#include "access/nbtree.h"
typedef struct BTScanListData
{
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.40 1999/05/25 18:20:31 vadim Exp $
+ * $Id: nbtsort.c,v 1.40.2.1 1999/08/02 05:24:41 scrappy Exp $
*
* NOTES
*
#include "postgres.h"
#include "access/nbtree.h"
-#include "storage/bufpage.h"
-#include "utils/memutils.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
#ifdef BTREE_BUILD_STATS
-#include "tcop/tcopprot.h"
-#include <utils/trace.h>
#define ShowExecutorStats pg_options[TRACE_EXECUTORSTATS]
#endif
* are potentially reading a bunch of zeroes off of disk in many
* cases.
*
- * BTItems are packed in and DOUBLEALIGN'd.
+ * BTItems are packed in and MAXALIGN'd.
*
* the fd should not be going out to disk, strictly speaking, but it's
* the only thing like that so i'm not going to worry about wasting a
return (BTItem) NULL;
bti = (BTItem) *pos;
itemsz = BTITEMSZ(bti);
- *pos += DOUBLEALIGN(itemsz);
+ *pos += MAXALIGN(itemsz);
return bti;
}
{
memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
++tape->bttb_ntup;
- tape->bttb_top += DOUBLEALIGN(itemsz);
+ tape->bttb_top += MAXALIGN(itemsz);
}
/*-------------------------------------------------------------------------
itape = btspool->bts_itape[btspool->bts_tape];
itemsz = BTITEMSZ(btitem);
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
/*
* if this buffer is too full for this BTItemData, or if we have run
* BTItemDatas in the order dictated by the sorted array of
* BTItems, not the original order.
*
- * (since everything was DOUBLEALIGN'd and is all on a single tape
+ * (since everything was MAXALIGN'd and is all on a single tape
* block, everything had *better* still fit on one tape block..)
*/
otape = btspool->bts_otape[btspool->bts_tape];
{
bti = parray[i].btsk_item;
btisz = BTITEMSZ(bti);
- btisz = DOUBLEALIGN(btisz);
+ btisz = MAXALIGN(btisz);
_bt_tapeadd(otape, bti, btisz);
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_SPOOL)
{
pgspc = PageGetFreeSpace(npage);
btisz = BTITEMSZ(bti);
- btisz = DOUBLEALIGN(btisz);
+ btisz = MAXALIGN(btisz);
if (pgspc < btisz)
{
Buffer obuf = nbuf;
if (bti != (BTItem) NULL)
{
btisz = BTITEMSZ(bti);
- btisz = DOUBLEALIGN(btisz);
+ btisz = MAXALIGN(btisz);
if (doleaf)
{
_bt_buildadd(index, state, bti, BTP_LEAF);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.8 1999/02/13 23:14:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtstrat.c,v 1.8.2.1 1999/08/02 05:24:42 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/istrat.h>
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
+#include "access/istrat.h"
+#include "access/nbtree.h"
/*
* Note:
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.27 1999/05/25 18:20:31 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.27.2.1 1999/08/02 05:24:42 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "access/genam.h"
-#include "access/iqual.h"
#include "access/istrat.h"
#include "access/nbtree.h"
#include "executor/execdebug.h"
-#include "fmgr.h"
-#include "storage/bufpage.h"
extern int NIndexTupleProcessed;
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
ScanKey
_bt_mkscankey(Relation rel, IndexTuple itup)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.13 1999/02/13 23:14:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.13.2.1 1999/08/02 05:24:43 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <storage/bufmgr.h>
-#include <access/sdir.h>
-#include <access/relscan.h>
-#include <access/iqual.h>
-#include <access/rtree.h>
-#include <storage/bufpage.h>
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/iqual.h"
+#include "access/rtree.h"
+
static OffsetNumber findnext(IndexScanDesc s, Page p, OffsetNumber n,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.18 1999/02/13 23:14:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.18.2.1 1999/08/02 05:24:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
+
+#include "utils/builtins.h"
-#include <utils/builtins.h>
-#include <utils/geo_decls.h>
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
BOX
*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.32 1999/05/25 16:07:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.32.2.1 1999/08/02 05:24:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <access/genam.h>
-#include <catalog/index.h>
-#include <access/rtscan.h>
-#include <storage/lmgr.h>
-#include <access/rtree.h>
-#include <storage/bufmgr.h>
-#include <utils/geo_decls.h>
-#include <executor/executor.h>
-#include <access/heapam.h>
-#include <fmgr.h>
-#include <storage/bufpage.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/heapam.h"
+#include "access/rtree.h"
+#include "catalog/index.h"
+#include "executor/executor.h"
+#include "utils/geo_decls.h"
+
typedef struct SPLITVEC
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.23 1999/05/25 16:07:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.23.2.1 1999/08/02 05:24:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <storage/bufmgr.h>
-#include <access/genam.h>
-#include <storage/lmgr.h>
-#include <storage/bufpage.h>
-#include <access/rtree.h>
-#include <access/rtstrat.h>
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/rtree.h"
+
/* routines defined and used here */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.11 1999/02/13 23:14:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.11.2.1 1999/08/02 05:24:44 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <utils/rel.h>
-#include <access/rtree.h>
-#include <access/istrat.h>
+#include "access/istrat.h"
+#include "access/rtree.h"
static StrategyNumber RelationGetRTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.21 1999/03/30 01:37:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.21.2.1 1999/08/02 05:24:46 scrappy Exp $
*
* NOTES
* This file contains support functions for the high
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/transam.h>
-#include <utils/bit.h>
-#include <access/xact.h>
-#include <storage/lmgr.h>
+#include "access/xact.h"
+#include "utils/bit.h"
static XidStatus TransBlockGetXidStatus(Block tblock,
TransactionId transactionId);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xid.c,v 1.22 1999/05/25 16:07:52 momjian Exp $
+ * $Id: xid.c,v 1.22.2.1 1999/08/02 05:24:46 scrappy Exp $
*
* OLD COMMENTS
* XXX WARNING
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <postgres.h>
-#include <access/xact.h>
+#include "postgres.h"
+#include "access/xact.h"
extern TransactionId NullTransactionId;
extern TransactionId DisabledTransactionId;
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.15 1999/04/09 22:35:41 tgl Exp $
+# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.15.2.1 1999/08/02 05:24:47 scrappy Exp $
#
# NOTES
# Passes any -D options on to cpp prior to generating the list
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: Gen_fmgrtab.sh.in,v 1.15 1999/04/09 22:35:41 tgl Exp $
+ * $Id: Gen_fmgrtab.sh.in,v 1.15.2.1 1999/08/02 05:24:47 scrappy Exp $
*
* NOTES
* ******************************
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.15 1999/04/09 22:35:41 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh.in,v 1.15.2.1 1999/08/02 05:24:47 scrappy Exp $
*
* NOTES
*
*/
#include <string.h>
-#include <postgres.h>
+#include "postgres.h"
#include "utils/fmgrtab.h"
FuNkYfMgRtAbStUfF
# Makefile for utils/adt
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.21 1998/12/30 19:56:29 wieck Exp $
+# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.21.2.1 1999/08/02 05:24:49 scrappy Exp $
#
#-------------------------------------------------------------------------
CFLAGS += -I../..
+# seems to be required for some date/time stuff 1999/07/22 bjm
+ifeq ($(CPU),alpha)
+ifeq ($(CC), gcc)
+CFLAGS+= -mieee
+endif
+ifeq ($(CC), egcs)
+CFLAGS+= -mieee
+endif
+endif
+
ifdef MULTIBYTE
CFLAGS+= $(MBFLAGS)
endif
ifeq (depend,$(wildcard depend))
include depend
endif
-
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.37 1999/07/09 03:28:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.37.2.1 1999/08/02 05:24:49 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
-#include <string.h>
#include "postgres.h"
-#include <utils/memutils.h>
-#include "utils/acl.h"
-#include "utils/syscache.h"
#include "catalog/catalog.h"
#include "catalog/pg_shadow.h"
#include "catalog/pg_type.h"
#include "miscadmin.h"
+#include "utils/acl.h"
+#include "utils/memutils.h"
+#include "utils/syscache.h"
static char *getid(char *s, char *n);
static int32 aclitemeq(AclItem *a1, AclItem *a2);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.43 1999/05/25 16:11:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.43.2.1 1999/08/02 05:24:49 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
#include "postgres.h"
+
#include "catalog/catalog.h"
#include "catalog/pg_type.h"
-
-#include "utils/syscache.h"
-#include "utils/memutils.h"
-#include "storage/fd.h"
#include "fmgr.h"
-#include "utils/array.h"
-#include "utils/elog.h"
-
-#include "libpq/libpq-fs.h"
#include "libpq/be-fsstubs.h"
+#include "libpq/libpq-fs.h"
+#include "storage/fd.h"
+#include "utils/array.h"
+#include "utils/memutils.h"
+#include "utils/syscache.h"
#define ASSGN "="
if (values[i])
{
if (typalign == 'd')
- *nbytes += DOUBLEALIGN(*(int32 *) values[i]);
+ *nbytes += MAXALIGN(*(int32 *) values[i]);
else
*nbytes += INTALIGN(*(int32 *) values[i]);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.7 1999/02/13 23:19:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.7.2.1 1999/08/02 05:24:50 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#define WEAK_C_OPTIMIZER
#include "postgres.h"
-
#include "utils/array.h"
-
int
GetOffset(int n, int *dim, int *lb, int *indx)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.16 1999/02/13 23:19:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.16.2.1 1999/08/02 05:24:50 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "utils/builtins.h" /* where the declarations go */
-#include "utils/palloc.h"
+#include "utils/builtins.h"
/*****************************************************************************
* USER I/O ROUTINES *
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.28 1999/05/25 16:11:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.28.2.1 1999/08/02 05:24:50 scrappy Exp $
*/
-#include <stdio.h>
-#include <string.h>
#include <limits.h>
#include <ctype.h>
#include <locale.h>
#ifdef USE_LOCALE
static struct lconv *lconvert = NULL;
-
#endif
/* cash_in()
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.22 1999/05/25 16:11:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.22.2.1 1999/08/02 05:24:50 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
#include "postgres.h"
-#include "utils/palloc.h"
-#include "utils/builtins.h" /* where the declarations go */
+#include "utils/builtins.h"
/*****************************************************************************
* USER I/O ROUTINES *
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.20 1999/05/25 16:11:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.20.2.1 1999/08/02 05:24:50 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <fcntl.h>
#include "postgres.h"
-#include "fmgr.h"
#include "catalog/pg_type.h"
+#include "fmgr.h"
#include "libpq/be-fsstubs.h"
#include "libpq/libpq-fs.h"
#include "optimizer/internal.h"
#include "utils/array.h"
#include "utils/memutils.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
-
#define INFTY 500000000
#define MANY 10000
#define MAXPAT 20
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.32 1999/05/25 16:11:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.32.2.1 1999/08/02 05:24:51 scrappy Exp $
*
* NOTES
* This code is actually (almost) unused.
*-------------------------------------------------------------------------
*/
#include <ctype.h>
-#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <string.h>
#include "postgres.h"
-#include "miscadmin.h"
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+
#include "access/xact.h"
-#include "utils/builtins.h" /* where function declarations go */
-#include "utils/palloc.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
#include "utils/dt.h"
#define INVALID_RELTIME_STR "Undefined RelTime"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.33 1999/05/25 16:11:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.33.2.1 1999/08/02 05:24:51 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
#include <limits.h>
#include "postgres.h"
#endif
#include "miscadmin.h"
#include "utils/builtins.h"
-#include "utils/nabstime.h"
-#include "utils/datetime.h"
-#include "access/xact.h"
static int date2tm(DateADT dateVal, int *tzp, struct tm * tm, double *fsec, char **tzn);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.12 1999/02/13 23:19:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.12.2.1 1999/08/02 05:24:51 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* particular instance of the type and about its value.
*
*/
-#include <string.h>
#include "postgres.h"
#include "utils/datum.h"
-#include "catalog/pg_type.h"
-#include "utils/palloc.h"
/*-------------------------------------------------------------------------
* datumGetSize
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72 1999/07/08 03:22:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72.2.1 1999/08/02 05:24:51 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <ctype.h>
#include <math.h>
-#include <string.h>
#include <sys/types.h>
#include <errno.h>
#include "postgres.h"
-#include "miscadmin.h"
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif
-#include "utils/builtins.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
static int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm);
static int DecodeNumber(int flen, char *field,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.17 1999/02/13 23:19:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.17.2.1 1999/08/02 05:24:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <stdio.h>
#include <pwd.h>
#include <sys/param.h>
#include "postgres.h"
-#include <miscadmin.h>
-#include "utils/builtins.h" /* where function declarations go */
+#include "miscadmin.h"
+#include "utils/builtins.h"
char *
filename_in(char *file)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42 1999/05/25 16:12:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42.2.1 1999/08/02 05:24:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* for calls to pow(), exp() since on some machines (my Linux box
* included) these routines do not set errno. - tgl 97/05/10
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
#include <ctype.h>
-#include <stdlib.h>
#include <errno.h>
#include <float.h> /* faked on sunos4 */
#include <limits.h>
#endif
#include "fmgr.h"
-#include "utils/builtins.h" /* for ftod() prototype */
-#include "utils/palloc.h"
+#include "utils/builtins.h"
#ifndef NAN
#define NAN (0.0/0.0)
* until the distributions are updated.
* --djm 12/16/96
*/
-#if ( defined(linux) && defined(__alpha) ) && !defined(UNSAFE_FLOATS)
+#if ( defined(linux) && defined(__alpha__) ) && !defined(UNSAFE_FLOATS)
#define UNSAFE_FLOATS
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.41 1999/02/21 03:49:30 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.41.2.1 1999/08/02 05:24:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <math.h>
#include <limits.h>
#include <float.h>
-#include <stdio.h> /* for sprintf proto, etc. */
-#include <stdlib.h> /* for strtod, etc. */
-#include <string.h>
#include <ctype.h>
#include "postgres.h"
#include "utils/geo_decls.h"
-#include "utils/palloc.h"
#ifndef PI
#define PI 3.1415926536
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.8 1999/03/28 01:56:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.8.2.1 1999/08/02 05:24:53 scrappy Exp $
*
* XXX These are totally bogus.
*
*/
#include "postgres.h"
-#include "access/attnum.h"
-#include "utils/geo_decls.h" /* where function declarations go */
-#include "utils/palloc.h"
#include "utils/builtins.h"
float64
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6 1999/05/25 16:12:04 momjian Exp $";
+static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6.2.1 1999/08/02 05:24:53 scrappy Exp $";
#endif
#include <arpa/inet.h>
#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <postgres.h>
-#include <utils/builtins.h>
+#include "postgres.h"
+#include "utils/builtins.h"
#ifdef SPRINTF_CHAR
#define SPRINTF(x) strlen(sprintf/**/x)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8 1999/05/25 16:12:05 momjian Exp $";
+static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8.2.1 1999/08/02 05:24:53 scrappy Exp $";
#endif
#include <assert.h>
#include <ctype.h>
#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <postgres.h>
-#include <utils/builtins.h>
+#include "postgres.h"
+#include "utils/builtins.h"
#ifdef SPRINTF_CHAR
#define SPRINTF(x) strlen(sprintf/**/x)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.21 1999/07/09 15:09:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.21.2.1 1999/08/02 05:24:53 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* XXX makes massive and possibly unwarranted type promotion assumptions.
* fix me when we figure out what we want to do about ANSIfication...
*/
-#include <stdio.h>
-#include <string.h>
+
+#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#include "postgres.h"
-#include "fmgr.h"
-#include "utils/builtins.h" /* where the declarations go */
+#include "utils/builtins.h"
#ifndef SHRT_MAX
#define SHRT_MAX (0x7FFF)
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf proto, etc. */
-#include <stdlib.h> /* for strtod, etc. */
-#include <string.h>
#include <ctype.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#include "postgres.h"
-#include "utils/palloc.h"
#include "utils/int8.h"
#define MAXINT8LEN 25
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include "postgres.h" /* postgres system include file */
-#include "utils/palloc.h"
-#include "utils/builtins.h" /* where the function declarations go */
+#include "postgres.h"
#include "mb/pg_wchar.h"
+#include "utils/builtins.h"
static int like(pg_wchar * text, pg_wchar * p);
}
-/* $Revision: 1.25 $
+/* $Revision: 1.25.2.1 $
** "like.c" A first attempt at a LIKE operator for Postgres95.
**
** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
/*
* PostgreSQL type definitions for MAC addresses.
*
- * $Id: mac.c,v 1.8 1999/05/25 16:12:08 momjian Exp $
+ * $Id: mac.c,v 1.8.2.1 1999/08/02 05:24:54 scrappy Exp $
*/
-#include <stdio.h>
-#include <string.h>
-#include <postgres.h>
-#include <utils/palloc.h>
-#include <utils/builtins.h>
-#include <utils/inet.h>
+#include "postgres.h"
+#include "utils/builtins.h"
manufacturer manufacturers[] = {
{0x00, 0x00, 0x0C, "Cisco"},
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.16 1999/02/13 23:19:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.16.2.1 1999/08/02 05:24:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/file.h>
#include <time.h>
#include "postgres.h"
-#include "utils/datum.h"
-#include "catalog/pg_type.h"
#include "utils/builtins.h"
/*-------------------------------------------------------------------------
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nabstime.c,v 1.55 1999/05/25 16:12:09 momjian Exp $
+ * $Id: nabstime.c,v 1.55.2.1 1999/08/02 05:24:54 scrappy Exp $
*
*/
-#include <stdio.h>
#include <ctype.h>
-#include <string.h>
#include <sys/types.h>
#include "postgres.h"
-#include <miscadmin.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifndef USE_POSIX_TIME
#include <sys/timeb.h>
#endif
-#include "utils/builtins.h"
+
#include "access/xact.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
static AbsoluteTime tm2abstime(struct tm * tm, int tz);
break;
default:
abstime2tm(time, &tz, tm, tzn);
-#if DATEDEBUG
-#endif
EncodeDateTime(tm, fsec, &tz, &tzn, DateStyle, buf);
break;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.18 1999/05/25 16:12:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.18.2.1 1999/08/02 05:24:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "utils/builtins.h" /* where the declarations go */
-#include "utils/palloc.h" /* where the declarations go */
+#include "utils/builtins.h"
/*****************************************************************************
* USER I/O ROUTINES (none) *
* is for IP V4 CIDR notation, but prepared for V6: just
* add the necessary bits where the comments indicate.
*
- * $Id: network.c,v 1.10 1999/06/02 03:37:15 momjian Exp $
+ * $Id: network.c,v 1.10.2.1 1999/08/02 05:24:55 scrappy Exp $
* Jon Postel RIP 16 Oct 1998
*/
#include <sys/types.h>
#include <sys/socket.h>
-#include <stdio.h>
-#include <string.h>
#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <postgres.h>
-#include <utils/palloc.h>
-#include <utils/builtins.h>
-#include <utils/inet.h>
+#include "postgres.h"
+#include "utils/builtins.h"
static int v4bitncmp(unsigned int a1, unsigned int a2, int bits);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.16 1999/05/25 16:12:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.16.2.1 1999/08/02 05:24:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* columns are ******REALLY****** implemented!!!!!!!!!!!
*
*/
-#include <stdio.h>
-#include <string.h>
+
#include "postgres.h"
#include "access/heapam.h"
-#include "access/relscan.h"
-#include "utils/builtins.h" /* where function decls go */
+#include "utils/builtins.h"
static int my_varattno(Relation rd, char *a);
*
* 1998 Jan Wieck
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.16 1999/05/25 22:42:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.16.2.1 1999/08/02 05:24:55 scrappy Exp $
*
* ----------
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <ctype.h>
#include <float.h>
#include <math.h>
#include "postgres.h"
#include "utils/builtins.h"
-#include "utils/palloc.h"
#include "utils/numeric.h"
-
/* ----------
* Uncomment the following to enable compilation of dump_numeric()
* and dump_var() and to get a dump of any result produced by make_result().
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.34 1999/07/10 17:03:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.34.2.1 1999/08/02 05:24:56 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
#include <errno.h>
#include <math.h>
+
+#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#include "postgres.h"
-#include "utils/builtins.h" /* where the declarations go */
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "utils/builtins.h"
#ifndef INT_MAX
#define INT_MAX (0x7FFFFFFFL)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.23 1999/05/10 00:45:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.23.2.1 1999/08/02 05:24:56 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
#include "postgres.h"
-#include "utils/builtins.h" /* where function declarations go */
+#include "utils/builtins.h"
/*****************************************************************************
* USER I/O ROUTINES *
/*
*
- * $Id: oracle_compat.c,v 1.18 1999/05/26 12:56:00 momjian Exp $
+ * $Id: oracle_compat.c,v 1.18.2.1 1999/08/02 05:24:56 scrappy Exp $
*
*/
#include <ctype.h>
#include "postgres.h"
-
text *lower(text *string);
text *upper(text *string);
text *initcap(text *string);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.22 1999/02/13 23:19:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.22.2.1 1999/08/02 05:24:56 scrappy Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include "postgres.h" /* postgres system include file */
+#include "postgres.h"
-#include <regex/regex.h>
-#include "utils/builtins.h" /* where the function declarations go */
+#include "regex/regex.h"
+#include "utils/builtins.h"
#if defined(DISABLE_XOPEN_NLS)
#undef _XOPEN_SOURCE
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.37 1999/05/25 16:12:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.37.2.1 1999/08/02 05:24:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "miscadmin.h"
-#include "access/heapam.h"
-#include "access/genam.h"
-#include "access/itup.h"
-#include "access/relscan.h"
-#include "storage/bufmgr.h"
-#include "fmgr.h"
-#include "utils/palloc.h"
-#include "utils/syscache.h"
+#include "access/genam.h"
+#include "access/heapam.h"
#include "catalog/catname.h"
#include "catalog/indexing.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
-#include "utils/builtins.h" /* where function declarations go */
+#include "miscadmin.h"
+#include "utils/builtins.h"
+#include "utils/syscache.h"
/*****************************************************************************
* USER I/O ROUTINES *
* out of it's tuple
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.18 1999/06/02 11:52:28 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.18.2.1 1999/08/02 05:24:57 scrappy Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
*
**********************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
#include <unistd.h>
#include <fcntl.h>
-#include <string.h>
+#include "postgres.h"
#include "executor/spi.h"
-#include "commands/trigger.h"
-#include "utils/elog.h"
-#include "utils/builtins.h"
-#include "nodes/nodes.h"
#include "optimizer/clauses.h"
-#include "utils/syscache.h"
#include "utils/lsyscache.h"
-#include "catalog/pg_class.h"
-#include "catalog/pg_type.h"
#include "catalog/pg_shadow.h"
#include "catalog/pg_index.h"
-#include "catalog/pg_opclass.h"
-#include "fmgr.h"
#define BUFSIZE 8192
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.30 1999/06/19 00:44:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.30.2.1 1999/08/02 05:24:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
#include "postgres.h"
#include "access/heapam.h"
-#include "fmgr.h"
-#include "utils/builtins.h" /* for textout() prototype and where the
- * declarations go */
-#include "utils/palloc.h"
-
#include "catalog/catname.h"
-#include "utils/syscache.h"
-#include "utils/lsyscache.h" /* for get_oprrest() */
#include "catalog/pg_statistic.h"
+#include "utils/builtins.h"
+#include "utils/lsyscache.h"
+#include "utils/syscache.h"
/* N is not a valid var/constant or relation id */
#define NONVALUE(N) ((N) == -1)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.21 1999/02/13 23:19:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.21.2.1 1999/08/02 05:24:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
#include "postgres.h"
#include "access/heapam.h"
-#include "access/relscan.h"
-#include "access/xact.h"
-#include "catalog/pg_proc.h" /* for Form_pg_proc */
-#include "catalog/catname.h" /* for ProcedureRelationName */
-#include "catalog/indexing.h" /* for Num_pg_proc_indices */
-#include "fmgr.h"
-#include "storage/lmgr.h"
-#include "tcop/dest.h"
-#include "utils/sets.h" /* for GENERICSETNAME */
-#include "utils/syscache.h" /* for PROOID */
-#include "utils/tqual.h"
+#include "catalog/catname.h"
+#include "catalog/indexing.h"
+#include "catalog/pg_proc.h"
+#include "utils/sets.h"
+#include "utils/syscache.h"
extern CommandDest whereToSendOutput; /* defined in tcop/postgres.c */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.6 1999/02/13 23:19:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.6.2.1 1999/08/02 05:24:57 scrappy Exp $
*
* NOTES
* input routine largely stolen from boxin().
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
-#include "postgres.h"
-#include "storage/bufpage.h"
-
-#include "utils/palloc.h"
-#include "utils/builtins.h" /* where function declarations go */
+#include "postgres.h"
+#include "utils/builtins.h"
#define LDELIM '('
#define RDELIM ')'
-#include <stdio.h>
-#include <string.h>
#include <time.h>
#include <ctype.h>
+
#include "postgres.h"
+#include "access/xact.h"
#include "miscadmin.h"
#include "utils/builtins.h"
-#include "access/xact.h"
time_t
timestamp_in(const char *timestamp_str)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.48 1999/07/04 04:56:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.48.2.1 1999/08/02 05:24:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h>
+
#include "postgres.h"
#include "access/htup.h"
-#include "utils/array.h"
-#include "utils/builtins.h"
#include "catalog/pg_type.h"
+#include "utils/builtins.h"
+
+#ifdef MULTIBYTE
+#include "mb/pg_wchar.h"
+#endif
#ifdef CYR_RECODE
char *convertstr(char *, int, int);
-
#endif
-#include "mb/pg_wchar.h"
/*
* CHAR() and VARCHAR() types are part of the ANSI SQL standard. CHAR()
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.48 1999/05/25 16:12:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.48.2.1 1999/08/02 05:24:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
-#include <string.h>
#include "postgres.h"
-#include "utils/palloc.h"
-#include "utils/builtins.h" /* where function declarations go */
#include "mb/pg_wchar.h"
+#include "utils/builtins.h"
static int text_cmp(text *arg1, text *arg2);
*
* IDENTIFICATION
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.6 1999/04/06 15:35:36 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.6.2.1 1999/08/02 05:24:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
#include "version.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.43 1999/06/04 02:19:45 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.43.2.1 1999/08/02 05:24:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "access/heapam.h"
#include "access/genam.h"
-#include "utils/tqual.h"
-#include "utils/builtins.h"
-#include "utils/portal.h"
-#include "utils/catcache.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
-#include "utils/mcxt.h"
-#include "utils/rel.h"
-#include "storage/bufpage.h"
+#include "access/heapam.h"
#include "access/valid.h"
+#include "catalog/pg_type.h"
#include "miscadmin.h"
-#include "fmgr.h" /* for F_BOOLEQ, etc. DANGER */
-#include "catalog/pg_type.h" /* for OID of int28 type */
-#include "lib/dllist.h"
+#include "utils/builtins.h"
+#include "utils/catcache.h"
static void CatCacheRemoveCTup(CatCache *cache, Dlelem *e);
static Index CatalogCacheComputeHashIndex(struct catcache * cacheInP);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.23 1999/05/25 16:12:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.23.2.1 1999/08/02 05:25:00 scrappy Exp $
*
* Note - this code is real crufty...
*
*/
#include "postgres.h"
-#include <miscadmin.h>
-
-#include "access/heapam.h" /* XXX to support hacks below */
-#include "access/htup.h"
#include "catalog/catalog.h"
+#include "catalog/catname.h"
#include "catalog/heap.h"
-#include "storage/bufpage.h"
-#include "storage/buf.h" /* XXX for InvalidBuffer */
-#include "storage/ipc.h"
+#include "miscadmin.h"
#include "storage/sinval.h"
#include "utils/catcache.h"
#include "utils/inval.h"
-#include "utils/rel.h"
#include "utils/relcache.h"
-#include "catalog/catname.h" /* XXX to support hacks below */
-#include "utils/syscache.h" /* XXX to support the hacks below */
static InvalidationEntry InvalidationEntryAllocate(uint16 size);
static void LocalInvalidInvalidate(LocalInvalid invalid, void (*function) ());
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.27 1999/05/29 01:45:21 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.27.2.1 1999/08/02 05:25:00 scrappy Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "nodes/pg_list.h"
-#include "utils/syscache.h"
-#include "utils/lsyscache.h"
-#include "access/tupmacs.h"
-#include "utils/rel.h"
-#include "utils/palloc.h"
-#include "utils/elog.h"
-#include "access/attnum.h"
-#include "access/heapam.h"
-
-#include "catalog/pg_amop.h"
+
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
+#include "utils/lsyscache.h"
+#include "utils/syscache.h"
/* ---------- AMOP CACHES ---------- */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/rel.c,v 1.5 1999/05/25 16:12:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/rel.c,v 1.5.2.1 1999/08/02 05:25:00 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/* #define RELREFDEBUG 1 */
#include "postgres.h"
-#include "miscadmin.h"
#include "access/istrat.h"
-#include "access/tupdesc.h"
-#include "utils/rel.h"
-#include "storage/fd.h"
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.62 1999/05/25 16:12:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.62.2.1 1999/08/02 05:25:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
*
*/
#include <sys/types.h>
-#include <stdio.h> /* for sprintf() */
#include <errno.h>
#include <sys/file.h>
#include <fcntl.h>
-#include <string.h>
#include "postgres.h"
#include "access/genam.h"
#include "access/heapam.h"
-#include "access/htup.h"
#include "access/istrat.h"
-#include "access/itup.h"
-#include "access/skey.h"
-#include "access/tupdesc.h"
-#include "access/tupmacs.h"
-#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/index.h"
#include "catalog/indexing.h"
-#include "catalog/pg_aggregate.h"
#include "catalog/pg_attrdef.h"
-#include "catalog/pg_attribute.h"
-#include "catalog/pg_index.h"
-#include "catalog/pg_proc.h"
-#include "catalog/pg_class.h"
#include "catalog/pg_log.h"
+#include "catalog/pg_proc.h"
#include "catalog/pg_relcheck.h"
#include "catalog/pg_rewrite.h"
#include "catalog/pg_type.h"
#include "catalog/pg_variable.h"
-#include "fmgr.h"
#include "lib/hasht.h"
#include "miscadmin.h"
-#include "storage/buf.h"
-#include "storage/bufmgr.h"
-#include "storage/fd.h" /* for SEEK_ */
-#include "storage/lmgr.h"
#include "storage/smgr.h"
#include "utils/builtins.h"
#include "utils/catcache.h"
-#include "utils/hsearch.h"
-#include "utils/mcxt.h"
-#include "utils/memutils.h"
-#include "utils/rel.h"
#include "utils/relcache.h"
-#include "utils/syscache.h"
static void RelationFlushRelation(Relation *relationPtr,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.28 1999/07/07 16:09:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.28.2.1 1999/08/02 05:25:01 scrappy Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
#include "postgres.h"
#include "access/heapam.h"
-#include "access/htup.h"
#include "catalog/catname.h"
-#include "utils/catcache.h"
-#include <string.h>
-
-
-/* ----------------
- * hardwired attribute information comes from system catalog files.
- * ----------------
- */
-#include "catalog/pg_am.h"
+#include "catalog/pg_aggregate.h"
#include "catalog/pg_amop.h"
-#include "catalog/pg_attribute.h"
#include "catalog/pg_group.h"
#include "catalog/pg_index.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_language.h"
+#include "catalog/pg_listener.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
-#include "catalog/pg_class.h"
-#include "catalog/pg_type.h"
#include "catalog/pg_rewrite.h"
-#include "catalog/pg_aggregate.h"
#include "catalog/pg_shadow.h"
-#include "storage/large_object.h"
-#include "catalog/pg_listener.h"
+#include "catalog/pg_type.h"
+#include "utils/catcache.h"
extern bool AMI_OVERRIDE; /* XXX style */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.6 1999/07/03 15:43:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.6.2.1 1999/08/02 05:25:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
*/
#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
#include "postgres.h"
-#include "miscadmin.h"
-#include "nodes/pg_list.h"
-#include "utils/mcxt.h"
-#include "utils/temprel.h"
-#include "access/xact.h"
-#include "access/htup.h"
#include "access/heapam.h"
#include "catalog/heap.h"
#include "catalog/index.h"
-#include "catalog/pg_class.h"
+#include "utils/temprel.h"
GlobalMemory CacheCxt;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.13 1999/02/13 23:19:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.13.2.1 1999/08/02 05:25:04 scrappy Exp $
*
* NOTE
* This should eventually work with elog(), dlog(), etc.
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <unistd.h>
-#include "postgres.h" /* where the declaration goes */
-#include "utils/module.h"
+#include "postgres.h"
#include "utils/exc.h"
#include "utils/trace.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.45 1999/05/25 16:12:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.45.2.1 1999/08/02 05:25:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
#include <time.h>
#include <fcntl.h>
#ifndef O_RDONLY
#include <sys/file.h>
#endif /* O_RDONLY */
#include <sys/types.h>
-#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
+#include "postgres.h"
#ifdef USE_SYSLOG
#include <syslog.h>
#endif
-#include "postgres.h"
-#include "miscadmin.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
+#include "miscadmin.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
#include "utils/trace.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.25 1999/05/25 16:12:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.25.2.1 1999/08/02 05:25:04 scrappy Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* XXX use own I/O routines */
#include <errno.h>
-#include <string.h>
#include "postgres.h"
-#include "utils/exc.h"
#include "storage/ipc.h"
+#include "utils/exc.h"
static void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excabort.c,v 1.6 1999/02/13 23:19:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excabort.c,v 1.6.2.1 1999/08/02 05:25:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "utils/exc.h" /* where function declarations go */
+#include "utils/exc.h"
void
ExcAbort(const Exception *excP,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.6 1999/05/25 16:12:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/excid.c,v 1.6.2.1 1999/08/02 05:25:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "utils/excid.h"
-
/*****************************************************************************
* Generic Recoverable Exceptions *
*****************************************************************************/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.13 1999/06/19 05:00:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.13.2.1 1999/08/02 05:25:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <stdarg.h>
#include "postgres.h"
#define FormMaxSize 1024
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.26 1999/05/25 16:12:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.26.2.1 1999/08/02 05:25:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
#include "postgres.h"
-#include "config.h" /* for MAXPATHLEN */
-#include "fmgr.h" /* generated by Gen_fmgrtab.sh */
#include "utils/dynamic_loader.h"
-#include "utils/elog.h"
-#include "utils/builtins.h"
-#include "access/heapam.h"
-#include "nodes/pg_list.h"
-
-#include "dynloader.h"
-
-#ifdef __ultrix
-#include <dl.h>
-#endif
+#include "access/heapam.h"
#include "catalog/catname.h"
-#include "utils/syscache.h"
#include "catalog/pg_proc.h"
+#include "dynloader.h"
+#include "utils/builtins.h"
+#include "utils/syscache.h"
static DynamicFileList *file_list = (DynamicFileList *) NULL;
static DynamicFileList *file_tail = (DynamicFileList *) NULL;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.28 1999/05/25 16:12:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.28.2.1 1999/08/02 05:25:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
#include "postgres.h"
-/* these 2 files are generated by Gen_fmgrtab.sh; contain the declarations */
-#include "fmgr.h"
-#include "utils/fmgrtab.h"
-
-#include "nodes/pg_list.h"
-#include "catalog/pg_proc.h"
#include "catalog/pg_language.h"
-#include "utils/syscache.h"
-#include "nodes/params.h"
-
-#include "utils/builtins.h"
-#include "utils/elog.h"
-
-#include "nodes/parsenodes.h"
+#include "catalog/pg_proc.h"
#include "commands/trigger.h"
+#include "utils/builtins.h"
+#include "utils/fmgrtab.h"
+#include "utils/syscache.h"
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.23 1999/05/31 17:01:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.23.2.1 1999/08/02 05:25:08 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* changed ctl structure for shared memory
*/
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include "postgres.h"
-#include "utils/dynahash.h"
-#include "utils/hsearch.h"
-#ifndef FRONTEND
-#include "utils/mcxt.h"
-#endif /* !FRONTEND */
-#include "utils/palloc.h"
-#include "utils/memutils.h"
+#include <sys/types.h>
+
+#include "postgres.h"
+#include "utils/dynahash.h"
+#include "utils/hsearch.h"
+#include "utils/memutils.h"
/*
* Fast MOD arithmetic, assuming that y is a power of 2 !
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.9 1999/02/13 23:19:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.9.2.1 1999/08/02 05:25:08 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
#include "utils/hsearch.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.7 1999/05/25 16:12:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/enbl.c,v 1.7.2.1 1999/08/02 05:25:09 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "utils/module.h" /* where the declarations go */
+#include "utils/module.h"
/*
* BypassEnable
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.14 1999/05/25 16:12:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.14.2.1 1999/08/02 05:25:09 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <grp.h>
#include <pwd.h>
-#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "postgres.h"
-#include "miscadmin.h" /* for DebugLvl */
+#include "miscadmin.h"
#ifndef S_IRUSR /* XXX [TRH] should be in a header */
#define S_IRUSR S_IREAD
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.30 1999/05/25 16:12:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.30.2.1 1999/08/02 05:25:10 scrappy Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
*-------------------------------------------------------------------------
*/
#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
#include <sys/file.h>
#include <sys/types.h>
#include <math.h>
#include <unistd.h>
#include "postgres.h"
-#include "miscadmin.h" /* where the declarations go */
-#include <storage/backendid.h>
-#include "access/heapam.h"
-#include "storage/sinval.h"
-#include "storage/sinvaladt.h"
-#include "storage/lmgr.h"
-#include "utils/elog.h"
-#include "libpq/pqcomm.h"
#include "catalog/catname.h"
+#include "libpq/pqcomm.h"
+#include "miscadmin.h"
+#include "storage/backendid.h"
+#include "storage/lmgr.h"
ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.29 1999/05/25 16:12:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.29.2.1 1999/08/02 05:25:10 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <sys/param.h> /* for MAXPATHLEN */
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
-#include <stdio.h>
#include <unistd.h>
-#include <grp.h> /* for getgrgid */
-#include <pwd.h> /* for getpwuid */
+#include <grp.h>
+#include <pwd.h>
#include "postgres.h"
-
-#include "utils/portal.h" /* for EnablePortalManager, etc. */
-#include "utils/exc.h" /* for EnableExceptionHandling, etc. */
-#include "utils/mcxt.h" /* for EnableMemoryContext, etc. */
-#include "utils/elog.h"
-#include "utils/builtins.h"
-
-#include "miscadmin.h" /* where the declarations go */
-
#include "catalog/catname.h"
#include "catalog/pg_shadow.h"
-#include "catalog/pg_proc.h"
+#include "miscadmin.h"
#include "utils/syscache.h"
-#include "storage/fd.h" /* for O_ */
-#include "storage/ipc.h" /* for proc_exit */
/*
* EnableAbortEnvVarName
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.40 1999/05/25 16:12:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.40.2.1 1999/08/02 05:25:10 scrappy Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
*-------------------------------------------------------------------------
*/
#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
#include <sys/file.h>
#include <sys/types.h>
#include <math.h>
#include <unistd.h>
#include "postgres.h"
-#include "version.h"
-
-#include <storage/ipc.h>
-#include <storage/backendid.h>
-#include <storage/buf_internals.h>
-#include <storage/smgr.h>
-#include <storage/proc.h>
-#include <utils/relcache.h>
#include "access/heapam.h"
-#include "access/xact.h"
-#include "storage/bufmgr.h"
-#include "access/transam.h" /* XXX dependency problem */
-#include "utils/syscache.h"
-#include "storage/bufpage.h" /* for page layout, for
- * InitMyDatabaseInfo() */
+#include "catalog/catname.h"
+#include "libpq/libpq.h"
+#include "miscadmin.h"
+#include "storage/backendid.h"
+#include "storage/proc.h"
#include "storage/sinval.h"
-#include "storage/sinvaladt.h"
-#include "storage/lmgr.h"
-
-#include "miscadmin.h" /* for global decls */
-#include "utils/portal.h" /* for EnablePortalManager, etc. */
-
-#include "utils/exc.h" /* for EnableExceptionHandling, etc. */
-#include "fmgr.h" /* for EnableDynamicFunctionManager, etc. */
-#include "utils/elog.h"
-#include "utils/palloc.h"
-#include "utils/mcxt.h" /* for EnableMemoryContext, etc. */
+#include "storage/smgr.h"
#include "utils/inval.h"
+#include "utils/portal.h"
+#include "utils/relcache.h"
+#include "utils/syscache.h"
+#include "version.h"
-#include "catalog/catname.h"
#ifdef MULTIBYTE
#include "mb/pg_wchar.h"
#endif
-#include "libpq/libpq.h"
-
static void VerifySystemDatabase(void);
static void VerifyMyDatabase(void);
static void InitCommunication(void);
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
- * $Id: common.c,v 1.5 1999/05/25 16:12:41 momjian Exp $ */
+ * $Id: common.c,v 1.5.2.1 1999/08/02 05:25:11 scrappy Exp $ */
#include <stdlib.h>
+#include <string.h>
#ifdef WIN32
#include "win32.h"
#else
-#if !defined(NO_UNISTD_H)
#include <unistd.h>
#endif
-#endif
-
-#include <string.h>
#include "mb/pg_wchar.h"
* client encoding and server internal encoding.
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
- * $Id: mbutils.c,v 1.6 1999/05/25 16:12:43 momjian Exp $ */
+ * $Id: mbutils.c,v 1.6.2.1 1999/08/02 05:25:12 scrappy Exp $ */
-#include <stdio.h>
-#include <string.h>
+#include "postgres.h"
+#include "miscadmin.h"
#include "mb/pg_wchar.h"
static int client_encoding = -1;
/*
* testing of utf2wchar()
- * $Id: utftest.c,v 1.2 1998/09/01 04:33:23 momjian Exp $
+ * $Id: utftest.c,v 1.2.4.1 1999/08/02 05:25:12 scrappy Exp $
*/
-#include <regex/regex.h>
-#include <regex/utils.h>
-#include <regex/regex2.h>
+#include "regex/regex.h"
+#include "regex/utils.h"
+#include "regex/regex2.h"
-#include <regex/pg_wchar.h>
+#include "regex/pg_wchar.h"
main()
{
* This file contains some public functions
* related to show/set/reset variable commands.
* Tatsuo Ishii
- * $Id: variable.c,v 1.4 1999/05/25 16:12:44 momjian Exp $
+ * $Id: variable.c,v 1.4.2.1 1999/08/02 05:25:12 scrappy Exp $
*/
+#include "postgres.h"
#include "mb/pg_wchar.h"
bool
* SUCH DAMAGE.
*/
-#include <mb/pg_wchar.h>
+#include "mb/pg_wchar.h"
int
pg_char_and_wchar_strcmp(s1, s2)
* SUCH DAMAGE.
*/
-#include <mb/pg_wchar.h>
+#include "mb/pg_wchar.h"
int
pg_wchar_strncmp(s1, s2, n)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.24 1999/05/25 16:12:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.24.2.1 1999/08/02 05:25:14 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include "postgres.h"
-#include "access/heapam.h"
#include "access/xact.h"
-#include "catalog/catname.h"
#include "catalog/pg_database.h"
-#include "fmgr.h"
#include "miscadmin.h"
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
-#include "utils/builtins.h"
#include "utils/syscache.h"
#ifdef MULTIBYTE
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.8 1999/02/13 23:20:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.8.2.1 1999/08/02 05:25:14 scrappy Exp $
*
* DESCRIPTION
* See superuser().
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-#include <utils/syscache.h>
-#include <catalog/pg_shadow.h>
+#include "postgres.h"
+#include "catalog/pg_shadow.h"
+#include "utils/syscache.h"
bool
superuser(void)
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
#include <unistd.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include "postgres.h"
+
#ifdef USE_SYSLOG
#include <syslog.h>
#endif
-#include "postgres.h"
#include "miscadmin.h"
#include "utils/trace.h"
-#include "libpq/pqsignal.h"
#ifdef USE_SYSLOG
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.16 1999/05/25 16:12:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.16.2.1 1999/08/02 05:25:15 scrappy Exp $
*
* NOTE:
* This is a new (Feb. 05, 1999) implementation of the allocation set
* Jan Wieck
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include "postgres.h"
-#include "utils/excid.h" /* for ExhaustedMemory */
-#include "utils/memutils.h" /* where funnction declarations go */
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "utils/memutils.h"
#undef AllocSetReset
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.14 1999/05/25 16:12:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.14.2.1 1999/08/02 05:25:16 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h> /* XXX for printf debugging */
#include "postgres.h"
-#include "utils/memutils.h"
-#include "utils/module.h"
-#include "utils/excid.h"
-
#include "nodes/memnodes.h"
-#include "nodes/nodes.h"
+#include "utils/excid.h"
+#include "utils/module.h"
-#include "utils/mcxt.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
#undef MemoryContextAlloc
#undef MemoryContextFree
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.13 1999/05/26 12:56:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.13.2.1 1999/08/02 05:25:16 scrappy Exp $
*
* NOTE
* XXX This is a preliminary implementation which lacks fail-fast
*/
#include "postgres.h"
-#include "utils/memutils.h" /* where declarations of this file goes */
+#include "utils/memutils.h"
static Pointer OrderedElemGetBase(OrderedElem elem);
static void OrderedElemPush(OrderedElem elem);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.12 1999/05/25 16:12:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.12.2.1 1999/08/02 05:25:16 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "utils/mcxt.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
-
#include "nodes/memnodes.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.23 1999/06/19 05:00:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.23.2.1 1999/08/02 05:25:16 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* PortalHeapMemory y y y *
*
*/
-#include <stdio.h> /* for sprintf() */
-#include <string.h> /* for strlen, strncpy */
#include "postgres.h"
#include "lib/hasht.h"
#include "utils/module.h"
-#include "utils/excid.h" /* for Unimplemented */
-#include "utils/mcxt.h"
-#include "utils/hsearch.h"
-
-#include "nodes/memnodes.h"
-#include "nodes/nodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/execnodes.h" /* for EState */
-
#include "utils/portal.h"
static void CollectNamedPortals(Portal *portalP, int destroy);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.16 1999/07/10 18:21:59 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.16.2.1 1999/08/02 05:25:17 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <stdio.h>
#include "postgres.h"
-#include "storage/buf.h"
-#include "access/skey.h"
-#include "access/heapam.h"
-#include "access/htup.h"
-#include "utils/rel.h"
-#include "utils/psort.h"
+#include "access/heapam.h"
#include "utils/lselect.h"
/*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: psort.c,v 1.53 1999/05/25 22:42:22 momjian Exp $
+ * $Id: psort.c,v 1.53.2.1 1999/08/02 05:25:18 scrappy Exp $
*
* NOTES
* Sorts the first relation into the second relation.
* MAXMERGE, MAXTAPES
*
*/
-#include <stdio.h>
#include <math.h>
-#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "postgres.h"
-#include "miscadmin.h"
#include "access/heapam.h"
-#include "access/htup.h"
-#include "access/relscan.h"
-#include "access/skey.h"
#include "executor/execdebug.h"
#include "executor/executor.h"
-#include "nodes/execnodes.h"
-#include "nodes/plannodes.h"
-#include "storage/buf.h"
-#include "storage/fd.h"
-#include "utils/lselect.h"
-#include "utils/portal.h" /* for {Start,End}PortalAllocMode */
+#include "miscadmin.h"
#include "utils/psort.h"
-#include "utils/rel.h"
static bool createfirstrun(Sort *node);
static bool createrun(Sort *node, BufFile *file);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.29 1999/05/25 16:13:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.29.2.1 1999/08/02 05:25:19 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "access/htup.h"
-#include "access/xact.h"
-#include "storage/bufmgr.h"
-#include "access/transam.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
#include "utils/tqual.h"
extern bool PostgresIsInitialized;
#ifndef GIST_H
#define GIST_H
-#include <access/funcindex.h>
-#include <access/itup.h>
-#include <access/relscan.h>
-#include <access/sdir.h>
-#include <storage/page.h>
-#include <storage/block.h>
-#include <utils/rel.h>
-#include <storage/off.h>
-
-#include <fmgr.h>
+#include "access/funcindex.h"
+#include "access/itup.h"
+#include "access/relscan.h"
+#include "access/sdir.h"
/*
** You can have as many strategies as you please in GiSTs, as
*/
#ifndef GISTSCAN_H
-#include <access/relscan.h>
-#include <storage/off.h>
-#include <storage/block.h>
-#include <utils/rel.h>
+#include "access/relscan.h"
extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd,
uint16 nkeys, ScanKey key);
#ifndef GISTSTRAT_H
#define GISTSTRAT_H
-#include <access/strat.h>
-#include <utils/rel.h>
+#include "utils/rel.h"
extern StrategyNumber RelationGetGISTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hash.h,v 1.24 1999/05/25 22:42:30 momjian Exp $
+ * $Id: hash.h,v 1.24.2.1 1999/08/02 05:25:21 scrappy Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
#ifndef HASH_H
#define HASH_H
-#include <access/sdir.h>
-#include <access/funcindex.h>
-#include <storage/bufpage.h>
-#include <access/relscan.h>
-#include <access/itup.h>
-#include <utils/int8.h>
+#include "access/funcindex.h"
+#include "access/itup.h"
+#include "access/relscan.h"
+#include "access/sdir.h"
+#include "utils/int8.h"
/*
* An overflow page is a spare page allocated for storing data whose
#define BMPGSZ_BYTE(metap) ((metap)->hashm_bmsize)
#define BMPGSZ_BIT(metap) ((metap)->hashm_bmsize << BYTE_TO_BIT)
#define HashPageGetBitmap(pg) \
- ((uint32 *) (((char *) (pg)) + DOUBLEALIGN(sizeof(PageHeaderData))))
+ ((uint32 *) (((char *) (pg)) + MAXALIGN(sizeof(PageHeaderData))))
/*
* The number of bits in an ovflpage bitmap which
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: istrat.h,v 1.13 1999/05/25 16:13:32 momjian Exp $
+ * $Id: istrat.h,v 1.13.2.1 1999/08/02 05:25:21 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef ISTRAT_H
#define ISTRAT_H
-#include <utils/rel.h>
-#include <access/strat.h>
+#include "utils/rel.h"
/*
* StrategyNumberIsValid
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itup.h,v 1.17 1999/02/13 23:20:55 momjian Exp $
+ * $Id: itup.h,v 1.17.2.1 1999/08/02 05:25:22 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef ITUP_H
#define ITUP_H
-#include <access/ibit.h>
-#include <access/tupmacs.h>
-#include <access/tupdesc.h>
-#include <storage/itemptr.h>
-#include <utils/memutils.h>
+#include "access/ibit.h"
+#include "access/tupdesc.h"
+#include "access/tupmacs.h"
+#include "storage/itemptr.h"
#define MaxIndexAttributeNumber 7
) \
: \
( \
- (Size)DOUBLEALIGN(sizeof(IndexTupleData) + sizeof(IndexAttributeBitMapData)) \
+ (Size)MAXALIGN(sizeof(IndexTupleData) + sizeof(IndexAttributeBitMapData)) \
) \
)
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtree.h,v 1.14 1999/02/13 23:20:57 momjian Exp $
+ * $Id: rtree.h,v 1.14.2.1 1999/08/02 05:25:22 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RTREE_H
#define RTREE_H
-#include <access/funcindex.h>
-#include <access/itup.h>
-#include <access/relscan.h>
-#include <access/sdir.h>
-#include <access/skey.h>
-#include <access/strat.h>
-#include <storage/block.h>
-#include <storage/off.h>
+#include "access/funcindex.h"
+#include "access/itup.h"
+#include "access/relscan.h"
+#include "access/sdir.h"
/* see rtstrat.c for what all this is about */
#define RTNStrategies 8
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtstrat.h,v 1.9 1999/02/13 23:20:58 momjian Exp $
+ * $Id: rtstrat.h,v 1.9.2.1 1999/08/02 05:25:22 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RTSTRAT_H
#define RTSTRAT_H
-#include <utils/rel.h>
-#include <access/attnum.h>
+#include "utils/rel.h"
extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum,
RegProcedure proc);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: array.h,v 1.18 1999/05/25 16:14:49 momjian Exp $
+ * $Id: array.h,v 1.18.2.1 1999/08/02 05:25:24 scrappy Exp $
*
* NOTES
* XXX the data array should be LONGALIGN'd -- notice that the array
#ifndef ARRAY_H
#define ARRAY_H
-#include <stdio.h>
+#include "utils/memutils.h"
typedef struct
{
*/
#define ARR_DATA_PTR(a) \
(((char *) a) + \
- DOUBLEALIGN(sizeof(ArrayType) + 2 * (sizeof(int) * (a)->ndim)))
+ MAXALIGN(sizeof(ArrayType) + 2 * (sizeof(int) * (a)->ndim)))
/*
* The total array header size for an array of dimension n (in bytes).
*/
#define ARR_OVERHEAD(n) \
- (DOUBLEALIGN(sizeof(ArrayType) + 2 * (n) * sizeof(int)))
+ (MAXALIGN(sizeof(ArrayType) + 2 * (n) * sizeof(int)))
/*------------------------------------------------------------------------
* Miscellaneous helper definitions and routines for arrayfuncs.c
*------------------------------------------------------------------------
*/
-/* #if defined(irix5) */
-/* #define RETURN_NULL {*isNull = true; return(0); }*/
- /* #else *//* irix5 */
#define RETURN_NULL {*isNull = true; return(0); }
- /* #endif *//* irix5 */
#define NAME_LEN 30
#define MAX_BUFF_SIZE BLCKSZ
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.81 1999/05/26 12:57:03 momjian Exp $
+ * $Id: builtins.h,v 1.81.2.1 1999/08/02 05:25:24 scrappy Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
#ifndef BUILTINS_H
#define BUILTINS_H
-#include <storage/itemptr.h>
-#include <utils/array.h>
-#include <utils/geo_decls.h>
-#include <utils/datetime.h>
-#include <utils/nabstime.h>
-#include <utils/int8.h>
-#include <utils/cash.h>
-#include <utils/inet.h>
-#include <utils/rel.h>
-#include <utils/numeric.h>
+#include "storage/itemptr.h"
+#include "utils/array.h"
+#include "utils/datetime.h"
+#include "utils/geo_decls.h"
+#include "utils/inet.h"
+#include "utils/int8.h"
+#include "utils/nabstime.h"
+#include "utils/numeric.h"
/*
* Defined in adt/
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: datetime.h,v 1.7 1999/02/13 23:22:16 momjian Exp $
+ * $Id: datetime.h,v 1.7.2.1 1999/08/02 05:25:24 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef DATETIME_H
#define DATETIME_H
-#include "utils/dt.h"
-
typedef int32 DateADT;
typedef float8 TimeADT;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dt.h,v 1.40 1999/05/25 16:14:53 momjian Exp $
+ * $Id: dt.h,v 1.40.2.1 1999/08/02 05:25:24 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <time.h>
#include <math.h>
+#include <limits.h>
/*
* DateTime represents absolute time.
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dynamic_loader.h,v 1.10 1999/02/13 23:22:18 momjian Exp $
+ * $Id: dynamic_loader.h,v 1.10.2.1 1999/08/02 05:25:24 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
#include <sys/param.h> /* For MAXPATHLEN */
-#include <postgres.h>
+/* we need this include because port files use them */
+#include "postgres.h"
#ifdef MIN
#undef MIN
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.10 1999/02/13 23:22:18 momjian Exp $
+ * $Id: elog.h,v 1.10.2.1 1999/08/02 05:25:24 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#define ABORTX 0x4000 /* abort process after logging */
#endif
-/***S*I***/
/* Increase this to be able to use postmaster -d 3 with complex
* view definitions (which are transformed to very, very large INSERT statements
* and if -d 3 is used the query string of these statements is printed using
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fcache.h,v 1.8 1999/02/13 23:22:19 momjian Exp $
+ * $Id: fcache.h,v 1.8.2.1 1999/08/02 05:25:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef FCACHE_H
#define FCACHE_H
-#include <fmgr.h>
+#include "fmgr.h"
typedef struct
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fcache2.h,v 1.8 1999/02/13 23:22:20 momjian Exp $
+ * $Id: fcache2.h,v 1.8.2.1 1999/08/02 05:25:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef FCACHE2_H
#define FCACHE2_H
-#include <nodes/execnodes.h>
+#include "nodes/execnodes.h"
extern void setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: inval.h,v 1.11 1999/02/13 23:22:23 momjian Exp $
+ * $Id: inval.h,v 1.11.2.1 1999/08/02 05:25:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef INVAL_H
#define INVAL_H
-#include <access/htup.h>
-#include <utils/rel.h>
+#include "access/htup.h"
extern void InitLocalInvalidateData(void);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lselect.h,v 1.12 1999/02/13 23:22:24 momjian Exp $
+ * $Id: lselect.h,v 1.12.2.1 1999/08/02 05:25:25 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef LSELECT_H
#define LSELECT_H
-#include <stdio.h>
-
-#include "access/skey.h"
-#include "access/tupdesc.h"
-#include "access/htup.h"
#include "utils/syscache.h"
struct leftist
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lsyscache.h,v 1.16 1999/02/13 23:22:24 momjian Exp $
+ * $Id: lsyscache.h,v 1.16.2.1 1999/08/02 05:25:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef LSYSCACHE_H
#define LSYSCACHE_H
-#include <access/attnum.h>
-#include <access/htup.h>
+#include "access/htup.h"
extern bool op_class(Oid oprno, int32 opclass, Oid amopid);
extern char *get_attname(Oid relid, AttrNumber attnum);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memutils.h,v 1.28 1999/06/17 15:15:59 momjian Exp $
+ * $Id: memutils.h,v 1.28.2.1 1999/08/02 05:25:26 scrappy Exp $
*
* NOTES
* some of the information in this file will be moved to
#ifndef MEMUTILS_H
#define MEMUTILS_H
+/*
+ * This is not needed by this include file, but by almost every file
+ * that includes this file.
+ */
/* ----------------
* Alignment macros: align a length or address appropriately for a given type.
*
* 1998 Jan Wieck
*
- * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.6 1999/05/25 22:43:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/utils/numeric.h,v 1.6.2.1 1999/08/02 05:25:26 scrappy Exp $
*
* ----------
*/
#ifndef _PG_NUMERIC_H_
#define _PG_NUMERIC_H_
-#include "postgres.h"
-
-
/* ----------
* The hardcoded limits and defaults of the numeric data type
* ----------
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: portal.h,v 1.15 1999/06/12 14:07:32 momjian Exp $
+ * $Id: portal.h,v 1.15.2.1 1999/08/02 05:25:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PORTAL_H
#define PORTAL_H
-#include <executor/execdesc.h>
-#include <lib/fstack.h>
-#include <nodes/memnodes.h>
-#include <utils/memutils.h>
+#include "executor/execdesc.h"
+#include "nodes/memnodes.h"
typedef struct PortalBlockData
{
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: temprel.h,v 1.3 1999/05/25 16:14:57 momjian Exp $
+ * $Id: temprel.h,v 1.3.2.1 1999/08/02 05:25:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#define TEMPREL_H
#include "access/htup.h"
-#include "access/attnum.h"
void create_temp_relation(char *relname, HeapTuple pg_class_tuple);
void remove_all_temp_relations(void);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tqual.h,v 1.22 1999/05/25 22:43:39 momjian Exp $
+ * $Id: tqual.h,v 1.22.2.1 1999/08/02 05:25:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef TQUAL_H
#define TQUAL_H
-#include <access/htup.h>
+#include "access/htup.h"
+#include "access/xact.h"
typedef struct SnapshotData
{
#ifndef TRACE_H
#define TRACE_H
-#include <stdio.h>
#include <string.h>
#include <time.h>
-#include <stdarg.h>
-
-#include "postgres.h"
#ifdef ELOG_TIMESTAMPS
char *tprintf_timestamp(void);