Another 'mega-commit' of back-patches ...
authorMarc G. Fournier <scrappy@hub.org>
Mon, 2 Aug 1999 05:25:27 +0000 (05:25 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Mon, 2 Aug 1999 05:25:27 +0000 (05:25 +0000)
- integrating the #include file cleanup that Bruce recently did
- got the CPU change to adt/Makefile
- changing DOUBLEALIGN -> MAXALIGN

142 files changed:
src/backend/access/common/heaptuple.c
src/backend/access/common/indextuple.c
src/backend/access/common/indexvalid.c
src/backend/access/common/printtup.c
src/backend/access/common/scankey.c
src/backend/access/common/tupdesc.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistget.c
src/backend/access/gist/gistscan.c
src/backend/access/gist/giststrat.c
src/backend/access/hash/hash.c
src/backend/access/hash/hashfunc.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/hash/hashstrat.c
src/backend/access/hash/hashutil.c
src/backend/access/heap/stats.c
src/backend/access/index/genam.c
src/backend/access/index/istrat.c
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtstrat.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rtree/rtget.c
src/backend/access/rtree/rtproc.c
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtscan.c
src/backend/access/rtree/rtstrat.c
src/backend/access/transam/transsup.c
src/backend/access/transam/xid.c
src/backend/utils/Gen_fmgrtab.sh.in
src/backend/utils/adt/Makefile
src/backend/utils/adt/acl.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/bool.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/char.c
src/backend/utils/adt/chunk.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/dt.c
src/backend/utils/adt/filename.c
src/backend/utils/adt/float.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_selfuncs.c
src/backend/utils/adt/inet_net_ntop.c
src/backend/utils/adt/inet_net_pton.c
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/like.c
src/backend/utils/adt/mac.c
src/backend/utils/adt/misc.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/name.c
src/backend/utils/adt/network.c
src/backend/utils/adt/not_in.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/oid.c
src/backend/utils/adt/oracle_compat.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/sets.c
src/backend/utils/adt/tid.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/adt/version.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/rel.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/syscache.c
src/backend/utils/cache/temprel.c
src/backend/utils/error/assert.c
src/backend/utils/error/elog.c
src/backend/utils/error/exc.c
src/backend/utils/error/excabort.c
src/backend/utils/error/excid.c
src/backend/utils/error/format.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/hash/dynahash.c
src/backend/utils/hash/hashfn.c
src/backend/utils/init/enbl.c
src/backend/utils/init/findbe.c
src/backend/utils/init/globals.c
src/backend/utils/init/miscinit.c
src/backend/utils/init/postinit.c
src/backend/utils/mb/common.c
src/backend/utils/mb/mbutils.c
src/backend/utils/mb/utftest.c
src/backend/utils/mb/variable.c
src/backend/utils/mb/wstrcmp.c
src/backend/utils/mb/wstrncmp.c
src/backend/utils/misc/database.c
src/backend/utils/misc/superuser.c
src/backend/utils/misc/trace.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/oset.c
src/backend/utils/mmgr/palloc.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/sort/lselect.c
src/backend/utils/sort/psort.c
src/backend/utils/time/tqual.c
src/include/access/gist.h
src/include/access/gistscan.h
src/include/access/giststrat.h
src/include/access/hash.h
src/include/access/istrat.h
src/include/access/itup.h
src/include/access/rtree.h
src/include/access/rtstrat.h
src/include/utils/array.h
src/include/utils/builtins.h
src/include/utils/datetime.h
src/include/utils/dt.h
src/include/utils/dynamic_loader.h
src/include/utils/elog.h
src/include/utils/fcache.h
src/include/utils/fcache2.h
src/include/utils/inval.h
src/include/utils/lselect.h
src/include/utils/lsyscache.h
src/include/utils/memutils.h
src/include/utils/numeric.h
src/include/utils/portal.h
src/include/utils/temprel.h
src/include/utils/tqual.h
src/include/utils/trace.h

index b20ad6dc5cfd7c9f7997b564c8897f458610e163..ec0add97e75308cd56d3922355c49e86ee7b279a 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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 "postgres.h"
+
+#include "access/heapam.h"
+#include "catalog/pg_type.h"
 
 /* Used by heap_getattr() macro, for speed */
 long           heap_sysoffset[] = {
@@ -688,7 +677,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
                len += bitmaplen;
        }
 
-       hoff = len = DOUBLEALIGN(len);          /* be conservative here */
+       hoff = len = MAXALIGN(len);             /* be conservative here */
 
        len += ComputeDataSize(tupleDescriptor, value, nulls);
 
@@ -822,7 +811,7 @@ heap_addheader(uint32 natts,        /* max domain index */
 
        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);
index 37c3ed3e5c5d42cbc69d4cc324ebcc6a9178c1e0..1aa8eaceedfc6f1bfb6909cefa0cd61d1eb7d8ff 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <postgres.h>
-
-#include <access/heapam.h>
-#include <access/ibit.h>
-#include <access/itup.h>
-#include <access/tupmacs.h>
-#include <catalog/pg_type.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "access/itup.h"
+#include "catalog/pg_type.h"
+
 
 /* ----------------------------------------------------------------
  *                               index_ tuple interface routines
@@ -67,7 +60,7 @@ index_formtuple(TupleDesc tupleDescriptor,
 
        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;
index fa7d745232cd2399063875afc8641dcbf7cfbbe0..ace5aa2db3b14ac0d588984207ca15ab9ee98525 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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
index bdab404eb0388c52e582dcb5885c33291a5ffb4b..3162f929be2fe9e7c7e4a86f51a478fae7161db6 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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"
 
index f82d03b957113027961ee14138f504ee28c49d8b..a7020a1c32a23062f85047a6840c0ea5989aa715 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <postgres.h>
+#include "postgres.h"
 
-#include <fmgr.h>
-#include <access/skey.h>
+#include "access/skey.h"
 
 /*
  * ScanKeyEntryIsLegal
index 9b1810663357ec5e424ae03244c397aaf43fca34..e69a409fdc9c8466eef13c728a3bb5fd7bac5a34 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <stdio.h>
-
-#include <postgres.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
+#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"
+
 
 /* ----------------------------------------------------------------
  *             CreateTemplateTupleDesc
index 06321990a8da7d48b81e36c9ba387f50c9421e9f..214ef41d1a0ecce2352f6ce4fe20688703ccf30b 100644 (file)
@@ -6,31 +6,22 @@
  *
  *
  * IDENTIFICATION
- *
+ *       $Header$
  *
  *-------------------------------------------------------------------------
  */
 
-#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,
@@ -60,7 +51,9 @@ void          gistdelete(Relation r, ItemPointer tid);
 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
index 665bc830357e1d247f11fe4c7ce1a915a95bcee1..fc18377a94a27dba6da8c7e983ac3b10d8defbc5 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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,
index d26387d8280c944c1a80ce9ec2c3475a97b4ecd6..e7a864985a474d4854c8547d68fa7d24d7e1de13 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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);
index 69eb9c31c3f749dcca0306d0f8bde41c5c8cbb4c..e1a5e497a7d0d43faa5a3ab883b2473fce0d8e4c 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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
index 37f69f111dfa9277bfbdbda5e1c667891633dc32..56d3c0fb98fce261ab850feb0acefd3b70b1e4ca 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/hash.h"
+#include "access/heapam.h"
+#include "catalog/index.h"
+#include "executor/executor.h"
+#include "miscadmin.h"
+
 
 bool           BuildingHash = false;
 
index 1624b0d61f0c9d634f4f948762c485e1b1f22798..7f03a5cbc7d61be0b11659b0455c361376807272 100644 (file)
@@ -19,7 +19,6 @@
 #include "postgres.h"
 
 #include "access/hash.h"
-#include "utils/int8.h"
 
 uint32
 hashint2(int16 key)
index b84fb4632a191ad59d9719211a56726c6990e364..7f20a73ed61dc78f0a8b42c4580862819801d205 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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);
@@ -130,7 +128,7 @@ _hash_insertonpg(Relation rel,
 
        itemsz = IndexTupleDSize(hitem->hash_itup)
                + (sizeof(HashItemData) - sizeof(IndexTupleData));
-       itemsz = DOUBLEALIGN(itemsz);
+       itemsz = MAXALIGN(itemsz);
 
        while (PageGetFreeSpace(page) < itemsz)
        {
index 7a9fd70a0d267b532c5c4f98e8650fab1679d8b6..2f83f05343b048b68d005aef22c012f697a3d6ce 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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);
@@ -538,7 +531,7 @@ _hash_squeezebucket(Relation rel,
                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
index 7d15063f571ce42c8ea0f44af7f8c094c51475e8..c83d635f3f7650a5d1aec5d2154847e0e2949917 100644 (file)
@@ -27,9 +27,9 @@
  *-------------------------------------------------------------------------
  */
 
-#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);
index e9b91ad2f15911342cddad3e595a6a772ac35c65..e46f742fa24a868036ba151fff5ca196c42468cd 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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
index 505cdd25d9fca8167979d3a41a6ee203b05a7e1e..7c6e2bf64fe4f16a03e21cfe79b05724a97e90a9 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <postgres.h>
+#include "postgres.h"
 
-#include <access/hash.h>
-#include <access/istrat.h>
 
 /*
  *     only one valid strategy for hash tables: equality.
index 057514f8009a55b1f22e5b82fa16418191bbf2e8..437503b9dd64c093a49d88cee1052a48063fbafb 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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)
@@ -134,9 +127,9 @@ _hash_checkpage(Page page, int flags)
        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)
index d78e2b06bf793d2efd491b8626d1629babce0a66..e19bef9e3ed9ac69b8ae3a14db5a19048f2bab40 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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);
 
index 7e5bda5007214a2bfa598d4e40d2ab3a058bb883..f0bdf33941732bb88f2f01bbf71468afbf784d73 100644 (file)
  * ----------------------------------------------------------------
  */
 
-#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
index 70eee09649042fc31caaa0e9947e98f52c64adbb..be1d24db0d5584e3be29e8f03343d17fa4e0bc78 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "postgres.h"
 
-#include "miscadmin.h"
 #include "access/heapam.h"
 #include "access/istrat.h"
 #include "catalog/catname.h"
@@ -23,9 +22,8 @@
 #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);
index 0eedff04de28815b1e9485844db36dde2faf45a0..63ec4c3aa048addd9efa762ff2325827ecd6aebd 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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)
index 7a224b2f6a98b2525d6a3c2046e9aaf2823e9d04..9ac0afec80bcc313506ec7095ff32a68dd141df4 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "access/nbtree.h"
+
 
 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);
@@ -272,7 +263,7 @@ _bt_insertonpg(Relation rel,
        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 */
 
@@ -378,7 +369,7 @@ _bt_insertonpg(Relation rel,
                if (currsize > maxsize)
                        maxsize = currsize;
                maxsize += sizeof(PageHeaderData) +
-                       DOUBLEALIGN(sizeof(BTPageOpaqueData));
+                       MAXALIGN(sizeof(BTPageOpaqueData));
                if (maxsize >= PageGetPageSize(page) / 2)
                        do_split = true;
        }
@@ -469,7 +460,7 @@ _bt_insertonpg(Relation rel,
 
                        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);
@@ -698,8 +689,8 @@ l_spl:      ;
                                 * 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);
@@ -1600,7 +1591,7 @@ _bt_shift(Relation rel, Buffer buf, BTStack stack, int keysz,
        /* 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);
@@ -1608,7 +1599,7 @@ _bt_shift(Relation rel, Buffer buf, BTStack stack, int keysz,
        /* 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);
index 1411a4e776f44f24b95d44b25f370a2f5af358e8..239394d46bbd3867b9f03c4608171ec881c1fbf1 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index aa0b94ea8f8ab1e990579c3681b2b27a266e73ce..0a31db9e5982c4f8112fb8a3f278489ae9ecb680 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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
 
index ca2b3c8214838a6690d1e78c726b175df6d33ce6..abf56760c91c214324e78268bae63273851e721a 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <postgres.h>
+#include "postgres.h"
 
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
+#include "access/nbtree.h"
 
 typedef struct BTScanListData
 {
index 44b7b947f1f89db7b1331324010ba0814c41e893..1c1b81ac6dfa66eaeaa4888102f3c11bf42ebf30 100644 (file)
 #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
 
@@ -95,7 +86,7 @@ extern int    NDirectFileWrite;
  * 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
@@ -506,7 +497,7 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
                return (BTItem) NULL;
        bti = (BTItem) *pos;
        itemsz = BTITEMSZ(bti);
-       *pos += DOUBLEALIGN(itemsz);
+       *pos += MAXALIGN(itemsz);
        return bti;
 }
 
@@ -526,7 +517,7 @@ _bt_tapeadd(BTTapeBlock *tape, BTItem item, int itemsz)
 {
        memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
        ++tape->bttb_ntup;
-       tape->bttb_top += DOUBLEALIGN(itemsz);
+       tape->bttb_top += MAXALIGN(itemsz);
 }
 
 /*-------------------------------------------------------------------------
@@ -662,7 +653,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
 
        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
@@ -702,7 +693,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
                 * 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];
@@ -710,7 +701,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
                {
                        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)
                        {
@@ -912,7 +903,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
 
        pgspc = PageGetFreeSpace(npage);
        btisz = BTITEMSZ(bti);
-       btisz = DOUBLEALIGN(btisz);
+       btisz = MAXALIGN(btisz);
        if (pgspc < btisz)
        {
                Buffer          obuf = nbuf;
@@ -1230,7 +1221,7 @@ _bt_merge(Relation index, BTSpool *btspool)
                                if (bti != (BTItem) NULL)
                                {
                                        btisz = BTITEMSZ(bti);
-                                       btisz = DOUBLEALIGN(btisz);
+                                       btisz = MAXALIGN(btisz);
                                        if (doleaf)
                                        {
                                                _bt_buildadd(index, state, bti, BTP_LEAF);
index add5c1cf75507cfb562eb80d9d55494bf9d37f70..e9e15b1474721bcef4e00fbf6ce74d9781925e25 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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:
index e0b180868fe0301bfe057f6382f2719c11045183..64910dcb79c769686ac5d1590ce63f047991a253 100644 (file)
 #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)
index 4df68a3d4e78343d58fd7a51524a9575e0d66cd6..990b16d6a45e59568b61bfa5aeff7b6ad7b4c0bc 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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,
index b22099c7157418582117b33010555def894d0dea..9069739c4a1edd08b75fa086aa8b5311c9b9a639 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <postgres.h>
-
-#include <utils/builtins.h>
-#include <utils/geo_decls.h>
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "utils/builtins.h"
+
 
 BOX
                   *
index e4e138260c4bb241190e62b9504be8623d969d03..45d02c54fd5ce3173e3358b40987af7ec37b4000 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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
 {
index 856baa0d4a24faef4d965f45c84c8a0c6b71b3d9..3317543adce0758b810bb8f4922d2e0cf0c05e24 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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 */
index bde896e87109ee2d5b9dffa7227fe9199cdd440a..827dc0e19899b5aa1e2dbee676e61eeca8cc75f1 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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);
index d7b4993c005cc24ac47f3195484391defcbb37e5..277a414d9fa48b2f64b2a1df3e5ce5a9a2c9e509 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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);
index 56e5de1f36f9a5c08d79a1d6229387ef5e58bba0..49e8e3e51c83b80cdc8a9dbc43d02384f9cea46f 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <stdio.h>
 
-#include <postgres.h>
-#include <access/xact.h>
+#include "postgres.h"
+#include "access/xact.h"
 
 extern TransactionId NullTransactionId;
 extern TransactionId DisabledTransactionId;
index 7cdd352076a493e6db93c9a0dde6c79af65743da..885b6cab99965a28778b39a34efcd2ebe7ded72f 100644 (file)
@@ -225,7 +225,7 @@ cat > $TABCFILE <<FuNkYfMgRtAbStUfF
  */
 
 #include <string.h>
-#include <postgres.h>
+#include "postgres.h"
 #include "utils/fmgrtab.h"
 
 FuNkYfMgRtAbStUfF
index 47d0852848abeeed83fde3fb364affc9ec092339..4c76a4140c9767797e32dfb25e51696964c52318 100644 (file)
@@ -13,6 +13,16 @@ include ../../../Makefile.global
 
 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
@@ -40,4 +50,3 @@ clean:
 ifeq (depend,$(wildcard depend))
 include depend
 endif
-
index ad287ddb5c35c3dd8b96bd24eaa7c7b133763543..c5ebbbdf8a6b4fd1a9687508edf0fca177357bc1 100644 (file)
  *-------------------------------------------------------------------------
  */
 #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);
index 5e9a19abc1df5a0075abb7ccdcd847f16c626e4e..14d43f73e56ee0501ce7dec9746fbc78c990ffe7 100644 (file)
  */
 
 #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   "="
 
@@ -477,7 +472,7 @@ _ReadArrayStr(char *arrayStr,
                        if (values[i])
                        {
                                if (typalign == 'd')
-                                       *nbytes += DOUBLEALIGN(*(int32 *) values[i]);
+                                       *nbytes += MAXALIGN(*(int32 *) values[i]);
                                else
                                        *nbytes += INTALIGN(*(int32 *) values[i]);
                        }
index a049e6b41f8523574855c5f3e8f8023fc6b2162a..906b05a1590acbbc3f9f16d65e53576854fa055f 100644 (file)
@@ -15,9 +15,7 @@
 #define WEAK_C_OPTIMIZER
 
 #include "postgres.h"
-
 #include "utils/array.h"
-
 int
 GetOffset(int n, int *dim, int *lb, int *indx)
 {
index 0195276f9ccce84c836d70bd3e9f0e0a181a80e7..3ea29bfafd589623405b7907c7938bf931b4ce92 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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                                                                                                               *
index 8f25d129b3c45c46176fcf26bfca94fb7953c556..32a57e17d6bf311e19d9b2f414406af8e04b13a7 100644 (file)
@@ -12,8 +12,6 @@
  * $Header$
  */
 
-#include <stdio.h>
-#include <string.h>
 #include <limits.h>
 #include <ctype.h>
 #include <locale.h>
@@ -34,7 +32,6 @@ static const char *num_word(Cash value);
 
 #ifdef USE_LOCALE
 static struct lconv *lconvert = NULL;
-
 #endif
 
 /* cash_in()
index 0c7b13e21830a530139a4f81cb41d8317d1aa438..0fb3d036f30dd1ff328cef3af4e31f6034ef50a2 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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                                                                                                               *
index 505995974262c255eec9ad3e21e08a25c2d04ff0..7a6be854675c8ea79b1a7d0737b2993e972ec496 100644 (file)
 #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
index ec8ae905ddb619bdcaa3979f4392009e426e4501..5fe849379aa23ee09cbf9efaa17c89302d5c1589 100644 (file)
  *-------------------------------------------------------------------------
  */
 #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"
index 55dd18d16e41efb66e93e92e63f44cd642ef623b..74c75630cef2272a51fe12ae5e7cc7f178e35930 100644 (file)
@@ -11,8 +11,6 @@
  *
  *-------------------------------------------------------------------------
  */
-#include <stdio.h>                             /* for sprintf() */
-#include <string.h>
 #include <limits.h>
 
 #include "postgres.h"
@@ -21,9 +19,6 @@
 #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);
 
index 548ed96ca02e9d149d6933e51022292aa219364e..78789b3217905998ca04e5e31691e2f51f634015 100644 (file)
  * 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
index 575345a47f3c701b822f53ba838763070624845a..e688068216e3071a5426aca2e695886f900991dc 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
@@ -29,8 +26,9 @@
 #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,
index 3e37395101fa24ac4cf00e24062881fe3877b86c..8d81ff445289a13833c07d48f36dfb48954d10bd 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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)
index ccea1c55278bb38bebfe7fbdd7338b904a1a98f4..46f662ceb4c6ca961f361e218d2b2ae8773c22cf 100644 (file)
  *              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 */
@@ -60,8 +57,7 @@
 #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)
@@ -134,7 +130,7 @@ extern double rint(double x);
  * 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
 
index 0c068474adc7f9d85776156e19e8bdd8ab5bf704..f4bd4fa38981d0a5b67da0469e3eae9b90f392e8 100644 (file)
 #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
index 3b12e670a0b2069da4e02558b0cec92c75503224..88ddeea028fa2b8c6244d28e218c7bee8f11c3ae 100644 (file)
@@ -16,9 +16,6 @@
  */
 #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
index bb619001dd7db37e67e3ef9df5dde78385dd1b20..f2324ed03616c5058a916307285d338afc58204b 100644 (file)
@@ -26,12 +26,9 @@ static const char rcsid[] = "$Id$";
 #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)
index d061a4b9a0452089ef1821bfc99b4489f33ee0bc..46c75ea1087a83a7c67c220458de60a695fd6099 100644 (file)
@@ -28,12 +28,9 @@ static const char rcsid[] = "$Id$";
 #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)
index 8b5a16175a7663341b8545324a443e48d7842f80..5f3e3688c49fa128e2e3dc93f0024867f6241fb9 100644 (file)
  * 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)
index ba609865db88ff37b6c1fb8630ebd7fc9b365cfa..2e5e4ebf776d99339f64db21ba12c7faf8e8b473 100644 (file)
@@ -5,9 +5,6 @@
  *
  *-------------------------------------------------------------------------
  */
-#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>
@@ -15,7 +12,6 @@
 #include <limits.h>
 
 #include "postgres.h"
-#include "utils/palloc.h"
 #include "utils/int8.h"
 
 #define MAXINT8LEN             25
index 2d35bfabaca8acbe66be17660106b5406daa420f..84b8b6fff41e5ddf441b44f95d81a8ac42a2ebe0 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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);
 
@@ -111,7 +109,7 @@ textnlike(struct varlena * s, struct varlena * 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.
index 081b342ce07d03e81ccc716b548fc0d114020ea8..613599a3a1d6af54e05190a6e73225a853c7774c 100644 (file)
@@ -4,13 +4,9 @@
  *     $Id$
  */
 
-#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"},
index 16ba7a6407949f41859192ccbace132b8d9f1b1a..c71f8ddcb85c7d40a35a282cc998f8bd32ea8d0a 100644 (file)
@@ -15,8 +15,6 @@
 #include <sys/file.h>
 #include <time.h>
 #include "postgres.h"
-#include "utils/datum.h"
-#include "catalog/pg_type.h"
 #include "utils/builtins.h"
 
 /*-------------------------------------------------------------------------
index 6a224d6201f1f51fae2a9314941bc3b3751e8ccc..6cad0c812d8210a43a597ca52a01178b7fd42558 100644 (file)
@@ -7,13 +7,10 @@
  *       $Id$
  *
  */
-#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);
 
@@ -348,8 +347,6 @@ nabstimeout(AbsoluteTime time)
                        break;
                default:
                        abstime2tm(time, &tz, tm, tzn);
-#if DATEDEBUG
-#endif
                        EncodeDateTime(tm, fsec, &tz, &tzn, DateStyle, buf);
                        break;
        }
index a4bc492936a0f7360f44e15584a264a9a9c8c5f0..19392c6979aa01b8be88ae61182f79e35f60ada9 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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)                                                                                                *
index a3ad62a46fdd70017d52dceaf319475c7a319c6d..05f7a6828878ef35d7e88084c29b7f612f84cbfc 100644 (file)
 #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);
 
index 0256cf21a059f05ccce6a557e6d8d3a344dc1912..e03e8ccd7fcb635b45a257c79a0213adaa1ded17 100644 (file)
  * 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);
 
index f8b203ab2473ac7e444edf516c76b09b5f6f3aa1..0c5d37cf4419d40becd239f279e288afc6762355 100644 (file)
@@ -10,9 +10,6 @@
  * ----------
  */
 
-#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().
index cb297fe457b32146656829dd78fa18fbc4afb1e8..e748499e433b06cfe0788f28e2e81664cc370048 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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)
index a0778efb20b297b2e9cacef0062f0a3ea31704b6..736ad9eeca6ba104eea980a3eb41e0a95c312d65 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#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                                                                                                               *
index d27d809daeda251a63f85f25664a907a2b955664..00d5c24f2e89e447097948eddb37b2469e31f9f6 100644 (file)
@@ -9,7 +9,6 @@
 #include <ctype.h>
 #include "postgres.h"
 
-
 text      *lower(text *string);
 text      *upper(text *string);
 text      *initcap(text *string);
index eb3d2ec2372b07ae162653a337e8e6bb4a8ee8eb..79d9f7b0c4f986bec7d6ac23f4ecf2c26de2c25d 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index 17266f61d22533ab305543beb62d6a16e8f56ef7..baf97b7097f862a757c6d8b0f0b4e135db630d9e 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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                                                                                                               *
index 688ea42873d3fada31523981b22eec02a1f41cab..96cd15fd0aded707ad2581015463501b538f3349 100644 (file)
  *
  **********************************************************************/
 
-#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
 
index 1b77d98fcf49035adf5bf99f3dcd12724ff1da29..41f0a373e3a6528cc3f0994ca3694f943a97df95 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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)
index 7f56ff189891720d8ebb7c88a5bc0776cad06b15..0616ae5727545bf6244ac134db484eaabb157881 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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 */
 
index 741a844ef557b0b6ee90a7c39be30ac241956197..32ca3ba2e9216cb0c99b5efadcd64c46b7272a72 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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                 ')'
index 3c67ab854e2cac7d40e4ec20ea1fd806fecf3ccb..cdbac4c7f13a6ddf00c647e6f75747aa4cba6cf8 100644 (file)
@@ -1,11 +1,10 @@
-#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)
index e79cb964dcc3fa9347036846284bfaad79a224df..0c457ec717489c60160b822fbed73a0e12a9ca59 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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()
index a435e0925fdbb64969a91d6281a5255355dcfb9a..6edf147af04cb40d40789667411080e917707f0e 100644 (file)
  *-------------------------------------------------------------------------
  */
 #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);
 
index 6897a87ece037e472695fd27cfa1dbf0817dd93c..d4a9c8c6d30da8528411a8d53a25c0c3c6493f05 100644 (file)
@@ -10,7 +10,6 @@
  *-------------------------------------------------------------------------
  */
 
-#include <string.h>
 
 #include "postgres.h"
 #include "version.h"
index d7494930e33a026bc583fb0e81c86f76866b5815..19da193ddba260e61bbbe4963c355f3d68e88a71 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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);
index b78981f316a7df0308afee84f82215cd7bda09f6..249ca3b535344b18422df765149503e5347d4b92 100644 (file)
  */
 #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) ());
index f3df89f82c8d6de425c656f906fe7e67dac13f38..80a7b3fa960177eec0ab29465f073f52712387f5 100644 (file)
  *       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 ----------                                                */
 
index e7f63a7d7810f2243cde9360194f2b9881c8e6a1..8f8f34005c486b7cf82a1facc842a9771758a4da 100644 (file)
 /* #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"
 
 
 /*
index 8165cf0f5ca6cf023fa77ed2faf5c792c7def1c6..20c54d893582c47fd28d7ccae4f34d9d6db28ac9 100644 (file)
  *
  */
 #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,
index 94daa14b082b14e6e44ec513645b023ddf4057c8..549648b15acd64e8b5ea3a82b38190afc21bf4f7 100644 (file)
 #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 */
 
index d2c67acbde562f83864ec6e829328cd98bc5e033..82b94869191ce48179286418c589c6a430ada64a 100644 (file)
  */
 
 #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;
 
index d8baf67ac6cc56e3d42ff4d97cb780ef86cfbcd3..41748e9405a7c6d54583f90c552133a460013164 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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"
index d03ee818a57737ea860b1c151f03d245fae5abae..8319115454a7d36372dee3d10207c2b2d829bb47 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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"
index d89516dd5eba959e1f1f9f1116dd6ed27bc3c40a..98059fd3510dca67181573129063bb5eb3e7db4f 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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);
index 20e748698b94272087483c03f4de75b9ccc32d6d..e38639b44af8e5aad00c70722931b380d95220cb 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "postgres.h"
 
-#include "utils/exc.h"                 /* where function declarations go */
+#include "utils/exc.h"
 
 void
 ExcAbort(const Exception *excP,
index c7b8a4c69dcaec9a9dda1a2ec34b11529e1c5534..bbf29aff3aeecf74e1cac96572811ac088e693c4 100644 (file)
@@ -14,8 +14,6 @@
 
 #include "postgres.h"
 
-#include "utils/excid.h"
-
 /*****************************************************************************
  *      Generic Recoverable Exceptions                                                                                  *
  *****************************************************************************/
index 7a193aa49d2bfe8ebc15aef1361f7a5e8a47d5fc..896ed390876a70839c9f800d424e4bb13ad0079a 100644 (file)
@@ -11,8 +11,6 @@
  *
  *-------------------------------------------------------------------------
  */
-#include <stdio.h>
-#include <stdarg.h>
 #include "postgres.h"
 
 #define FormMaxSize            1024
index e5d76dab198cfaffb135dba5e484b9781e16ad3e..7e32ec5659685db88b3fd1d8fec52bfe52a08321 100644 (file)
  */
 #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;
index 30fe54ffc53df10583b2d64c534de85c78fc31bc..a9ed1a194a64b701ed5dae9ddbd9cb407e745bb8 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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"
 
 
 /*
index 95d2282e7abb307a1b1496f2bb575e8653383e6d..f5b2db3af901b730b9302b0540eb454ccd6d1347 100644 (file)
  * Modified by sullivan@postgres.berkeley.edu April 1990
  *             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 !
index 465b34a8d1159d27f69decc06171c92896ad7184..090833e8ea2c147b5a7f48d55fb3f0f3abe322b6 100644 (file)
@@ -11,7 +11,6 @@
  *
  *-------------------------------------------------------------------------
  */
-#include <string.h>
 #include "postgres.h"
 
 #include "utils/hsearch.h"
index 894b276e077bae2d6c87cbee742061e369c015a3..6591246d27a300584e68b4348e4907a236045dc0 100644 (file)
@@ -12,7 +12,7 @@
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
-#include "utils/module.h"              /* where the declarations go */
+#include "utils/module.h"
 
 /*
  * BypassEnable
index 8ac51d8264cb86b37c8f04acee446952f3640d16..8879210e70ffc69b5811e2b22cd6e56d0b07d985 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index 68c5b623fb8362e8f4bc7e740f5424b63b273f05..95acc158fcfc8f5ca853209783ee0b8f0e05bb2d 100644 (file)
  *-------------------------------------------------------------------------
  */
 #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;
 
index 4f7faa7df982d2bb045d49d4fb65382f2c025aa9..805b17d143044d485af68ddc52748444c1cd720c 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index 784fd465adb4064ff6716ca1f52ce0be89d21a8a..a70129493e372971ddb7545f1688172290a018fd 100644 (file)
  *-------------------------------------------------------------------------
  */
 #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);
index 2298da73d1d48726eed506f4ba8469c20fc20335..0518c4ddab0b622261efd8f0a567cc70307ec4db 100644 (file)
@@ -5,16 +5,13 @@
  * $Id$ */
 
 #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"
 
index 377cc2d107f18d148a3bdea0c5ef754dcd87c7d3..7aed7f2fda60fe92d7fcb97a4022cad9e30d682e 100644 (file)
@@ -5,9 +5,9 @@
  * Tatsuo Ishii
  * $Id$ */
 
-#include <stdio.h>
-#include <string.h>
 
+#include "postgres.h"
+#include "miscadmin.h"
 #include "mb/pg_wchar.h"
 
 static int     client_encoding = -1;
index 6bef9dd0b37cc91c9005db23e3d42712a8a77fa6..0d592e8ebe317db496c782af21a80f3ac3e4dd05 100644 (file)
@@ -2,11 +2,11 @@
  * testing of utf2wchar()
  * $Id$
  */
-#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()
 {
index 2240e11a0af70d8a17da6850cbe3d14e2ae4efbb..761d25c7dcd60b839d92dbf2135808e2ae90ab0f 100644 (file)
@@ -5,6 +5,7 @@
  * $Id$
  */
 
+#include "postgres.h"
 #include "mb/pg_wchar.h"
 
 bool
index 3efdcc6f396ea601d02e96d2eab6c45b3e7d0873..4b6a16b7d14bbb6dd9b15916539b65e42ab27199 100644 (file)
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  */
 
-#include <mb/pg_wchar.h>
+#include "mb/pg_wchar.h"
 
 int
 pg_char_and_wchar_strcmp(s1, s2)
index c7ccf1b4cb773b1ec98a8fc51970dadb61c98ef9..050a46191b42643a0d39bd72a4a0becdfbdbf8a1 100644 (file)
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  */
 
-#include <mb/pg_wchar.h>
+#include "mb/pg_wchar.h"
 
 int
 pg_wchar_strncmp(s1, s2, n)
index fc50ed6068722faf9e199dfc97a5052930245d69..ba8a0c59d24a8dd55a50659d8aeef1abd46a58b2 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index dc0c9bbd8935f01a97207912adedc70aaf103eb8..a25bdd948a47ff09dd4b21778f47fd29477d824a 100644 (file)
@@ -15,9 +15,9 @@
  *-------------------------------------------------------------------------
  */
 
-#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)
index 9676ca570a0c13a77b27be7d0138ed8617fa58a7..baf8ce6121868bc050835f4322c372e701ea7067 100644 (file)
@@ -9,9 +9,6 @@
  *-------------------------------------------------------------------------
  */
 
-#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
 /*
index 7703731b5a280f2e6764b91f5a48c95b6c97675d..41f86ba939e66b8510efc837595a76c89d1fa973 100644 (file)
  *                             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
index 0449499dd0ee7850fdaeb27511cbfe8e95fdfe96..e2c58300ba463821a1135dd2598ee8c2792b6a5d 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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
index c3dbde0dbab0c86e0ef604ef428f971835522856..bd5f088bace818866d2b203d4014acaa84f5e5f3 100644 (file)
@@ -17,7 +17,7 @@
  */
 #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);
index 02fae4e42ff9d2afb6b5cf1ef3fe92c64ac302d4..e8d88404eff927b31c276319b9b379e917e16153 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <string.h>
 
 #include "postgres.h"
 
-#include "utils/mcxt.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
-
 #include "nodes/memnodes.h"
 
 
index d7c61e775c267c0dd5ee123c67b97013a91a8c28..9d1f2d12ec32a7288dd8fc83a3756520a3c87fab 100644 (file)
  * 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);
index 965a48e3cd2a95c87f594a2dc7cbdd8e0d3f7c55..66d6ba3c4a6c77fa90a69212b8f505a0b65086a5 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-#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"
 
 /*
index 783dd22ef41be3b0dbbcb61e1a70f3eb33344840..984718dd5ba0abaaf17ad1ee8013a8384194089f 100644 (file)
  *                             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);
index bb5f8c6c67b808aef4b0a6a33a62798842c7abbe..0476d72eca7f06a8d04bbf49be95d28d21cb6ab2 100644 (file)
 
 #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;
index 383877e9adaa52ccd873665277de0588259832af..dd0aa92e40dd2cfe811f6abef32031041ba2524f 100644 (file)
 #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
index 4be3b676cabb28138cb70324ec4e1319330b872d..ef55ab395187af8b4e27caa888bde71797a5faee 100644 (file)
  */
 #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);
index 20ad45863f340cee13c1fba8d6c41415d8559b08..c2fc30edf4266839c541009f6bfe9e28c4208623 100644 (file)
@@ -12,8 +12,7 @@
 #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);
index dbb5adc6850268633c24442cc9d7f3f477a6babb..e8dc1a89b33c9873e703d4b196b5b78b2125593c 100644 (file)
 #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
@@ -203,7 +202,7 @@ typedef HashItemData *HashItem;
 #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
index 9c39802f30ac2ff61f67e898fbe4db134f704021..2e2293f9c366af2f12bc2e505dd7c79458b46db0 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef ISTRAT_H
 #define ISTRAT_H
 
-#include <utils/rel.h>
-#include <access/strat.h>
+#include "utils/rel.h"
 
 /*
  * StrategyNumberIsValid
index d4a71951e7fe59df45873e98ec8260295d7aaffb..c731001b069fa1ab90a81f2eeb50e47d906c00e7 100644 (file)
 #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
 
@@ -104,7 +103,7 @@ typedef struct PredInfo
        ) \
        : \
        ( \
-               (Size)DOUBLEALIGN(sizeof(IndexTupleData) + sizeof(IndexAttributeBitMapData)) \
+               (Size)MAXALIGN(sizeof(IndexTupleData) + sizeof(IndexAttributeBitMapData)) \
        ) \
 )
 
index 9a49cc812a0e075d545d43e7734fe5790f7a0b42..1ab5a394c0a6379018650a3eb46d5bcc132e9fc1 100644 (file)
 #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
index 6653e5cf6e866e0648a66b7d4d1eb44c2145fbea..e659f2aa3da63a97be175ae542e34366d1b62c37 100644 (file)
@@ -13,8 +13,7 @@
 #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);
index 936e980c318df8a8c605e9b436722f74e52aeb8d..f0a2cc1cbb59dd4327be4fccf9d41a23a7653c05 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef ARRAY_H
 #define ARRAY_H
 
-#include <stdio.h>
+#include "utils/memutils.h"
 
 typedef struct
 {
@@ -84,24 +84,20 @@ 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
 
index d2250dab1665eb72a0851871ef1002193acb54ba..828e7c68807092aaffaa09259060b5871cdb177c 100644 (file)
 #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/
index a759d353ec1f02965be78007d86c9b0ae6cac794..a5ee75d7c69f9d8393ab7b580b9876642bf1bdca 100644 (file)
@@ -13,8 +13,6 @@
 #ifndef DATETIME_H
 #define DATETIME_H
 
-#include "utils/dt.h"
-
 typedef int32 DateADT;
 
 typedef float8 TimeADT;
index e59e92a94ab9c8bc579431ea7b15beebea4ba0e3..78d6f7a6dc567aa43f5d9993a37bd0d4617af29f 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <time.h>
 #include <math.h>
+#include <limits.h>
 
 /*
  * DateTime represents absolute time.
index 0395e54918bd437b83913e2a4789f8a2a52687b7..9af97541c6fa537a2abaf80cf09c522dede28151 100644 (file)
@@ -16,7 +16,8 @@
 #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
index db09dca63e6483f31857afb5e6ca8a0a654d42de..085cc0ba8190873e96d1e03c8097d161863f1361 100644 (file)
@@ -29,7 +29,6 @@
 #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
index 753ed316bd2b67ed8ab5b252e85a65276bbc24ab..78217ba903a9e6a69fe6931994b8cb10fc7c4f8f 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef FCACHE_H
 #define FCACHE_H
 
-#include <fmgr.h>
+#include "fmgr.h"
 
 
 typedef struct
index 9e78964ac3a8bfcf7499e4eecfca437d501daabf..4d669a599b4153610d3b1f91fde771eadf26dbc1 100644 (file)
@@ -13,7 +13,7 @@
 #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);
 
index 79f4f581da14eb4ed11c4fc768cfdcb35dbbda11..587feb5f5c8bf8d726581ba0fd32a27e514774fb 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef INVAL_H
 #define INVAL_H
 
-#include <access/htup.h>
-#include <utils/rel.h>
+#include "access/htup.h"
 
 extern void InitLocalInvalidateData(void);
 
index 7f5f85c91439ecc8e3204d85b309cde8dc0d25d2..5399d56230c61ec4786e83e3b843aa25a292c95c 100644 (file)
 #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
index dc782bcf8d2468d8da23781b03ec9e6d0a1cc867..22d31f636dbdd79e17b94c760e5fee95064a4ff0 100644 (file)
@@ -13,8 +13,7 @@
 #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);
index ade7410a7f07903347a77e94855d090503055bff..8f07affe34a6b5f89a0fe75cd51ee25bd49cdf54 100644 (file)
 #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.
index 0026f685dec584b63d6a9c5fdab58f1b70dd5daf..19cd0096967dfe936f81b2a72ded3d8f631c7fee 100644 (file)
@@ -13,9 +13,6 @@
 #ifndef _PG_NUMERIC_H_
 #define _PG_NUMERIC_H_
 
-#include "postgres.h"
-
-
 /* ----------
  * The hardcoded limits and defaults of the numeric data type
  * ----------
index b26ddf525d74f5432ba96ecf0bfb09120f41acf8..1d7812f7d5cef1874ea4c581de3e8db60ff2c169 100644 (file)
 #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
 {
index 95991972e56c0dbb28931d5d30c772b5fb066471..f1a91f1c8d8b3b2bd36bf062eba5a463d779496b 100644 (file)
@@ -14,7 +14,6 @@
 #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);
index dc306612a9d60f6055d1dffb7842e9d61952f280..9a32f8f205baf506181a6d46426bf059d25ae945 100644 (file)
@@ -14,7 +14,8 @@
 #ifndef TQUAL_H
 #define TQUAL_H
 
-#include <access/htup.h>
+#include "access/htup.h"
+#include "access/xact.h"
 
 typedef struct SnapshotData
 {
index 3174026ca5cfe32ce8c6caed21b09c561c8cb088..4bcdee3ae575a220c5f84529741067ce0475a36e 100644 (file)
 #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);