*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.20 1999/05/25 16:06:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.20.2.1 1999/08/02 05:56:34 scrappy Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/hash.h>
-#include <storage/bufmgr.h>
-#include <miscadmin.h>
-#include <utils/memutils.h>
-#include <storage/lmgr.h>
-#include <access/genam.h>
+#include "access/genam.h"
+#include "access/hash.h"
+#include "miscadmin.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
static void _hash_setpagelock(Relation rel, BlockNumber blkno, int access);
static void _hash_unsetpagelock(Relation rel, BlockNumber blkno, int access);
for (i = metap->hashm_bshift; i > 0; --i)
{
if ((1 << i) < (metap->hashm_bsize -
- (DOUBLEALIGN(sizeof(PageHeaderData)) +
- DOUBLEALIGN(sizeof(HashPageOpaqueData)))))
+ (MAXALIGN(sizeof(PageHeaderData)) +
+ MAXALIGN(sizeof(HashPageOpaqueData)))))
break;
}
Assert(i);
itemsz = IndexTupleDSize(hitem->hash_itup)
+ (sizeof(HashItemData) - sizeof(IndexTupleData));
- itemsz = DOUBLEALIGN(itemsz);
+ itemsz = MAXALIGN(itemsz);
if (PageGetFreeSpace(npage) < itemsz)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.46 1999/07/09 04:51:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.46.2.1 1999/08/02 05:56:36 scrappy Exp $
*
*
* INTERFACE ROUTINES
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <storage/bufpage.h>
-#include <access/heapam.h>
-#include <miscadmin.h>
-#include <utils/relcache.h>
-#include <access/valid.h>
-#include <access/hio.h>
-#include <storage/lmgr.h>
-#include <storage/smgr.h>
-#include <catalog/catalog.h>
-#include <access/transam.h>
-#include <access/xact.h>
-#include <utils/inval.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 "access/hio.h"
+#include "access/valid.h"
+#include "catalog/catalog.h"
+#include "miscadmin.h"
+#include "storage/smgr.h"
+#include "utils/builtins.h"
+#include "utils/inval.h"
+#include "utils/relcache.h"
+
/* ----------------------------------------------------------------
* heap support routines
HEAP_XMAX_INVALID | HEAP_MARKED_FOR_UPDATE);
/* insert new item */
- if ((unsigned) DOUBLEALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
+ if ((unsigned) MAXALIGN(newtup->t_len) <= PageGetFreeSpace((Page) dp))
RelationPutHeapTuple(relation, buffer, newtup);
else
{
*
*
* IDENTIFICATION
- * $Id: hio.c,v 1.22 1999/07/03 01:56:16 momjian Exp $
+ * $Id: hio.c,v 1.22.2.1 1999/08/02 05:56:37 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <storage/bufpage.h>
-#include <access/hio.h>
-#include <access/htup.h>
-#include <access/heapam.h>
-#include <storage/bufmgr.h>
-#include <utils/memutils.h>
+#include "access/heapam.h"
+#include "access/hio.h"
/*
* amputunique - place tuple at tid
IncrHeapAccessStat(global_RelationPutHeapTuple);
pageHeader = (Page) BufferGetPage(buffer);
- len = (unsigned) DOUBLEALIGN(tuple->t_len); /* be conservative */
+ len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
Assert((int) len <= PageGetFreeSpace(pageHeader));
offnum = PageAddItem((Page) pageHeader, (Item) tuple->t_data,
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
pageHeader = (Page) BufferGetPage(buffer);
- len = (unsigned) DOUBLEALIGN(tuple->t_len); /* be conservative */
+ len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
/*
* Note that this is true if the above returned a bogus page, which it
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.16.2.1 1999/08/02 05:24:37 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.16.2.2 1999/08/02 05:56:37 scrappy Exp $
*
* NOTES
* initam should be moved someplace else.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.17.2.1 1999/08/02 05:24:38 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.17.2.2 1999/08/02 05:56:38 scrappy Exp $
*
* NOTES
* many of the old access method routines have been turned into
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.30 1999/02/13 23:14:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.30.2.1 1999/08/02 05:56:39 scrappy Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/genam.h>
-#include <utils/relcache.h>
-#include <fmgr.h>
-#include <storage/lmgr.h>
-#include <access/heapam.h>
+#include "access/genam.h"
+#include "access/heapam.h"
+#include "utils/relcache.h"
/* ----------------
* undefine macros we aren't going to use that would otherwise
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.33.2.1 1999/08/02 05:24:39 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.33.2.2 1999/08/02 05:56:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.45 1999/05/25 18:20:30 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.45.2.1 1999/08/02 05:56:42 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <access/genam.h>
-#include <fmgr.h>
-#include <storage/bufpage.h>
-#include <access/nbtree.h>
-#include <catalog/pg_proc.h>
-
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+#include "access/genam.h"
+#include "access/nbtree.h"
static BTStack _bt_searchr(Relation rel, int keysz, ScanKey scankey,
Buffer *bufP, BTStack stack_in);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.27 1999/06/10 14:17:06 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.27.2.1 1999/08/02 05:56:46 scrappy Exp $
*
* NOTES
* This file contains the high level access-method interface to the
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/transam.h>
-#include <access/xact.h>
-#include <access/heapam.h>
-#include <utils/mcxt.h>
-#include <catalog/catname.h>
-#include <storage/spin.h>
-#include <commands/vacuum.h>
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "commands/vacuum.h"
static int RecoveryCheckingEnabled(void);
static void TransRecover(Relation logRelation);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.21.2.1 1999/08/02 05:24:46 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.21.2.2 1999/08/02 05:56:46 scrappy Exp $
*
* NOTES
* This file contains support functions for the high
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.22 1999/06/06 20:19:33 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.22.2.1 1999/08/02 05:56:47 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/transam.h>
-#include <storage/spin.h>
-#include <access/xact.h>
-#include <access/heapam.h>
-#include <catalog/catname.h>
-#include <storage/proc.h>
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "storage/proc.h"
static void GetNewObjectIdBlock(Oid *oid_return, int oid_block_size);
static void VariableRelationGetNextOid(Oid *oid_return);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.42 1999/06/29 04:54:46 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.42.2.1 1999/08/02 05:56:48 scrappy Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
* [PA, 7/17/98]
* [PA] is Pascal André <andre@via.ecp.fr>
*/
-#include <postgres.h>
-
-#include <access/xact.h>
-#include <utils/inval.h>
-#include <utils/portal.h>
-#include <access/transam.h>
-#include <storage/fd.h>
-#include <storage/proc.h>
-#include <utils/mcxt.h>
-#include <catalog/heap.h>
-#include <utils/relcache.h>
-#include <miscadmin.h>
-#include <commands/async.h>
-#include <commands/sequence.h>
-#include <libpq/be-fsstubs.h>
+#include "postgres.h"
+
+#include "catalog/heap.h"
+#include "commands/async.h"
+#include "commands/sequence.h"
+#include "libpq/be-fsstubs.h"
+#include "storage/proc.h"
+#include "utils/inval.h"
+#include "utils/portal.h"
+#include "utils/relcache.h"
extern bool SharedBufferChanged;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xid.c,v 1.22.2.1 1999/08/02 05:24:46 scrappy Exp $
+ * $Id: xid.c,v 1.22.2.2 1999/08/02 05:56:49 scrappy Exp $
*
* OLD COMMENTS
* XXX WARNING
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.25 1999/05/10 00:44:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.25.2.1 1999/08/02 05:56:51 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
#include <time.h>
#include "postgres.h"
-#include "miscadmin.h"
#include "access/attnum.h"
#include "access/funcindex.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_class.h"
#include "commands/defrem.h"
+#include "miscadmin.h"
#include "nodes/nodes.h"
#include "nodes/parsenodes.h"
#include "nodes/pg_list.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.12 1999/02/13 23:14:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.12.2.1 1999/08/02 05:56:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <time.h>
-#include <string.h>
#include "postgres.h"
-#include "storage/block.h"
-#include "storage/off.h"
-#include "storage/itemptr.h"
-#include "catalog/pg_attribute.h"
#include "access/attnum.h"
-#include "nodes/pg_list.h"
-#include "access/tupdesc.h"
-#include "access/itup.h"
#include "access/funcindex.h"
-#include "storage/fd.h"
-#include "catalog/pg_am.h"
-#include "catalog/pg_class.h"
-#include "nodes/nodes.h"
-#include "rewrite/prs2lock.h"
+#include "access/htup.h"
+#include "access/itup.h"
#include "access/skey.h"
#include "access/strat.h"
-#include "utils/rel.h"
+#include "access/tupdesc.h"
#include "bootstrap/bootstrap.h"
-
-#include "nodes/primnodes.h"
-#include "utils/nabstime.h"
-#include "access/htup.h"
+#include "catalog/pg_am.h"
+#include "catalog/pg_attribute.h"
+#include "catalog/pg_class.h"
+#include "nodes/nodes.h"
#include "nodes/parsenodes.h"
-
+#include "nodes/pg_list.h"
+#include "nodes/primnodes.h"
#include "parser/scansup.h"
+#include "rewrite/prs2lock.h"
+#include "storage/block.h"
+#include "storage/fd.h"
+#include "storage/itemptr.h"
+#include "storage/off.h"
+#include "utils/nabstime.h"
+#include "utils/rel.h"
#include "bootstrap_tokens.h"
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.60 1999/05/25 16:07:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.60.2.1 1999/08/02 05:56:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <unistd.h> /* For getopt() */
+#include <unistd.h>
#include <time.h>
-#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
-#include <string.h>
-#ifdef __CYGWIN32__
-#include <getopt.h>
-#endif
#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
#include "postgres.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
-#include "miscadmin.h"
-#include "fmgr.h"
-
-#include "access/attnum.h"
-#include "access/funcindex.h"
#include "access/genam.h"
#include "access/heapam.h"
-#include "access/htup.h"
-#include "access/itup.h"
-#include "access/relscan.h"
-#include "access/sdir.h"
-#include "access/skey.h"
-#include "access/strat.h"
-#include "access/tupdesc.h"
-#include "access/xact.h"
#include "bootstrap/bootstrap.h"
#include "catalog/catname.h"
#include "catalog/index.h"
-#include "catalog/pg_am.h"
-#include "catalog/pg_attribute.h"
-#include "catalog/pg_class.h"
#include "catalog/pg_type.h"
-#include "executor/execdesc.h"
-#include "executor/hashjoin.h"
-#include "executor/tuptable.h"
#include "libpq/pqsignal.h"
-#include "nodes/execnodes.h"
-#include "nodes/memnodes.h"
-#include "nodes/nodes.h"
-#include "nodes/params.h"
-#include "nodes/parsenodes.h"
-#include "nodes/plannodes.h"
-#include "nodes/pg_list.h"
-#include "nodes/primnodes.h"
-#include "rewrite/prs2lock.h"
-#include "storage/block.h"
-#include "storage/buf.h"
-#include "storage/fd.h"
-#include "storage/ipc.h"
-#include "storage/itemptr.h"
-#include "storage/lock.h"
-#include "storage/off.h"
-#include "storage/shmem.h"
-#include "storage/spin.h"
-#include "tcop/dest.h"
+#include "miscadmin.h"
#include "tcop/tcopprot.h"
#include "utils/builtins.h"
-#include "utils/geo_decls.h"
-#include "utils/hsearch.h"
#include "utils/lsyscache.h"
-#include "utils/mcxt.h"
-#include "utils/nabstime.h"
#include "utils/portal.h"
-#include "utils/rel.h"
-
-#ifndef HAVE_MEMMOVE
-#include "regex/utils.h"
-#endif
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
#define FIRST_TYPE_OID 16 /* OID of the first type */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.22 1999/06/19 05:05:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.22.2.1 1999/08/02 05:56:53 scrappy Exp $
*
* NOTES
* See acl.h.
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
-#include "utils/acl.h" /* where declarations for this file go */
#include "access/heapam.h"
-#include "access/htup.h"
-#include "access/tupmacs.h"
-#include "catalog/indexing.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
+#include "catalog/indexing.h"
#include "catalog/pg_aggregate.h"
#include "catalog/pg_group.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_shadow.h"
#include "catalog/pg_type.h"
-#include "fmgr.h"
+#include "miscadmin.h"
#include "parser/parse_agg.h"
#include "parser/parse_func.h"
-#include "storage/bufmgr.h"
-#include "utils/builtins.h"
-#include "utils/memutils.h"
+#include "utils/acl.h"
#include "utils/syscache.h"
-#include "utils/tqual.h"
-#include "miscadmin.h"
static int32 aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.21 1999/05/25 16:08:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.21.2.1 1999/08/02 05:56:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-#include <postgres.h>
+#include "postgres.h"
-#include <miscadmin.h> /* for DataDir */
-#include <utils/syscache.h>
-#include <catalog/catname.h> /* NameIs{,Shared}SystemRelationName */
-#include <catalog/pg_type.h>
-#include <catalog/catalog.h>
-#include <access/transam.h>
+#include "access/transam.h"
+#include "catalog/catalog.h"
+#include "catalog/catname.h"
+#include "catalog/pg_type.h"
+#include "miscadmin.h"
+#include "utils/syscache.h"
/*
* relpath - path to the relation
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.81 1999/07/07 09:27:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.81.2.1 1999/08/02 05:56:54 scrappy Exp $
*
*
* INTERFACE ROUTINES
*/
#include "postgres.h"
+
#include "access/genam.h"
-#include "access/htup.h"
#include "access/heapam.h"
#include "access/istrat.h"
-#include "access/xact.h"
#include "bootstrap/bootstrap.h"
-#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/heap.h"
#include "catalog/index.h"
#include "catalog/indexing.h"
+#include "catalog/pg_index.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "executor/executor.h"
-#include "fmgr.h"
#include "miscadmin.h"
#include "optimizer/clauses.h"
#include "optimizer/prep.h"
#include "parser/parse_func.h"
-#include "storage/lmgr.h"
#include "storage/smgr.h"
#include "utils/builtins.h"
-#include "utils/catcache.h"
-#include "utils/mcxt.h"
#include "utils/relcache.h"
#include "utils/syscache.h"
-#include "utils/tqual.h"
#include "utils/temprel.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
-
/*
* macros used in guessing how many tuples are on a page.
*/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.38 1999/05/25 16:08:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.38.2.1 1999/08/02 05:56:54 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
#include "catalog/index.h"
#include "catalog/indexing.h"
#include "catalog/pg_index.h"
-#include "catalog/pg_proc.h"
-#include "fmgr.h"
#include "miscadmin.h"
-#include "nodes/execnodes.h"
-#include "storage/bufmgr.h"
-#include "utils/builtins.h"
#include "utils/syscache.h"
#include "utils/temprel.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.20 1999/02/13 23:14:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.20.2.1 1999/08/02 05:56:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
+#include "postgres.h"
-#include <access/heapam.h>
-#include <utils/builtins.h>
-#include <fmgr.h>
-#include <catalog/catname.h>
-#include <utils/syscache.h>
-#include <catalog/pg_operator.h>
-#include <catalog/pg_proc.h>
-#include <catalog/pg_type.h>
-#include <catalog/pg_aggregate.h>
-#include <miscadmin.h>
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "catalog/pg_aggregate.h"
+#include "catalog/pg_proc.h"
+#include "catalog/pg_type.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
+#include "utils/syscache.h"
/* ----------------
* AggregateCreate
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.37 1999/05/25 16:08:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.37.2.1 1999/08/02 05:56:55 scrappy Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
-#include "fmgr.h"
#include "miscadmin.h"
-#include "parser/parse_oper.h"
-#include "storage/bufmgr.h"
+#include "parser/parse_func.h"
#include "utils/builtins.h"
#include "utils/syscache.h"
-#include "utils/tqual.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
static Oid OperatorGetWithOpenRelation(Relation pg_operator_desc,
const char *operatorName,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.29 1999/05/25 16:08:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.29.2.1 1999/08/02 05:56:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "access/heapam.h"
-#include "access/relscan.h"
#include "catalog/catname.h"
#include "catalog/indexing.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
-#include "fmgr.h"
#include "miscadmin.h"
-#include "optimizer/internal.h"
#include "optimizer/planner.h"
-#include "parser/parse_node.h"
+#include "parser/parse_type.h"
#include "tcop/tcopprot.h"
#include "utils/builtins.h"
#include "utils/fmgrtab.h"
#include "utils/sets.h"
#include "utils/syscache.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
/* ----------------------------------------------------------------
* ProcedureCreate
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.37 1999/05/25 16:08:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.37.2.1 1999/08/02 05:56:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "access/heapam.h"
-#include "access/relscan.h"
#include "catalog/catname.h"
#include "catalog/indexing.h"
#include "catalog/pg_type.h"
-#include "fmgr.h"
#include "miscadmin.h"
#include "parser/parse_func.h"
-#include "storage/bufmgr.h"
-#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/syscache.h"
-#include "utils/tqual.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
static Oid TypeShellMakeWithOpenRelation(Relation pg_type_desc,
char *typeName);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.4 1999/05/25 22:40:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.4.2.1 1999/08/02 05:57:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <nodes/parsenodes.h>
-#include <nodes/plannodes.h>
-#include <nodes/execnodes.h>
-#include <nodes/makefuncs.h>
-#include <catalog/pg_type.h>
-#include <commands/recipe.h>
-#include <libpq/libpq-be.h>
-#include <parser/parse_node.h>
-#include <utils/builtins.h>
-#include <utils/relcache.h> /* for RelationNameGetRelation */
-#include <rewrite/rewriteHandler.h>
-#include <rewrite/rewriteManip.h>
-#include <tcop/pquery.h>
-#include <tcop/dest.h>
-#include <optimizer/planner.h>
-#include <executor/executor.h>
+#include "postgres.h"
+
+#include "catalog/pg_type.h"
+#include "commands/recipe.h"
+#include "executor/executor.h"
+#include "libpq/libpq-be.h"
+#include "nodes/execnodes.h"
+#include "nodes/makefuncs.h"
+#include "nodes/parsenodes.h"
+#include "nodes/plannodes.h"
+#include "optimizer/planner.h"
+#include "parser/parse_node.h"
+#include "rewrite/rewriteHandler.h"
+#include "rewrite/rewriteManip.h"
+#include "tcop/dest.h"
+#include "tcop/pquery.h"
+#include "utils/builtins.h"
+#include "utils/relcache.h"
/* from tcop/postgres.c */
extern CommandDest whereToSendOutput;
#else
-#include <tioga/tgRecipe.h>
+#include "tioga/tgRecipe.h"
#define DEBUG_RECIPE 1
* doesn't work! - jolly 8/19/95
*
*
- * $Id: version.c,v 1.19 1999/05/25 16:08:32 momjian Exp $
+ * $Id: version.c,v 1.19.2.1 1999/08/02 05:57:02 scrappy Exp $
*
* NOTES
* At the point the version is defined, 2 physical relations are created
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
-#include <postgres.h>
+#include "postgres.h"
-#include <access/heapam.h>
-#include <utils/builtins.h>
-#include <commands/version.h>
-#include <access/xact.h> /* for GetCurrentXactStartTime */
-#include <parser/parse_node.h>
-#include <tcop/tcopprot.h>
#define MAX_QUERY_LEN 1024
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.47 1999/05/25 16:08:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.47.2.1 1999/08/02 05:56:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <unistd.h>
#include <signal.h>
-#include <string.h>
#include <errno.h>
-#include <sys/types.h> /* Needed by in.h on Ultrix */
+#include <sys/types.h>
#include <netinet/in.h>
#include "postgres.h"
-#include "commands/async.h"
#include "access/heapam.h"
-#include "access/relscan.h"
-#include "access/xact.h"
#include "catalog/catname.h"
#include "catalog/pg_listener.h"
-#include "fmgr.h"
+#include "commands/async.h"
#include "lib/dllist.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "miscadmin.h"
-#include "storage/bufmgr.h"
-#include "storage/lmgr.h"
-#include "tcop/dest.h"
+#include "utils/ps_status.h"
#include "utils/syscache.h"
-#include <utils/trace.h>
-#include <utils/ps_status.h>
+#include "utils/trace.h"
/* stuff that we really ought not be touching directly :-( */
extern TransactionState CurrentTransactionState;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.47 1999/06/19 04:54:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.47.2.1 1999/08/02 05:56:57 scrappy Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
#include "postgres.h"
#include "access/heapam.h"
-#include "access/relscan.h"
-#include "catalog/indexing.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
+#include "catalog/indexing.h"
#include "catalog/pg_type.h"
#include "commands/command.h"
#include "executor/execdefs.h"
#include "executor/executor.h"
-#include "fmgr.h"
+#include "miscadmin.h"
#include "optimizer/prep.h"
#include "utils/acl.h"
-#include "utils/array.h"
#include "utils/builtins.h"
-#include "utils/mcxt.h"
-#include "utils/portal.h"
-#include "utils/relcache.h"
-#include "utils/temprel.h"
#include "utils/syscache.h"
-#include "miscadmin.h"
-#include "string.h"
+#include "utils/temprel.h"
/* ----------------
* PortalExecutorHeapMemory stuff
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.41 1999/05/25 16:08:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.41.2.1 1999/08/02 05:56:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
-
-#include <postgres.h>
-
-#include <utils/rel.h>
-#include <nodes/parsenodes.h>
-#include <catalog/heap.h>
-#include <commands/creatinh.h>
-#include <access/xact.h>
-#include <access/heapam.h>
-#include <utils/syscache.h>
-#include <catalog/catname.h>
-#include <catalog/pg_type.h>
-#include <catalog/pg_inherits.h>
-#include <catalog/pg_ipl.h>
+
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "catalog/heap.h"
+#include "catalog/pg_inherits.h"
+#include "catalog/pg_ipl.h"
+#include "catalog/pg_type.h"
+#include "commands/creatinh.h"
+#include "utils/syscache.h"
/* ----------------
* local stuff
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.35 1999/05/25 16:08:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.35.2.1 1999/08/02 05:56:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
#include <signal.h>
#include <sys/stat.h>
#include "postgres.h"
#include "access/heapam.h"
-#include "access/htup.h"
-#include "access/relscan.h"
#include "catalog/catname.h"
#include "catalog/pg_database.h"
#include "catalog/pg_shadow.h"
-#include "fmgr.h"
-#include "miscadmin.h" /* for DataDir */
-#include "storage/bufmgr.h"
-#include "storage/fd.h"
-#include "storage/lmgr.h"
-#include "tcop/tcopprot.h"
#include "commands/dbcommands.h"
-#include "utils/rel.h"
+#include "miscadmin.h"
+#include "tcop/tcopprot.h"
#include "utils/syscache.h"
*
* Copyright (c) 1994-5, Regents of the University of California
*
- * $Id: explain.c,v 1.38 1999/06/17 23:45:32 tgl Exp $
+ * $Id: explain.c,v 1.38.2.1 1999/08/02 05:56:58 scrappy Exp $
*
*/
-#include <stdio.h>
-#include <string.h>
-
-#include <postgres.h>
-
-#include <nodes/plannodes.h>
-#include <nodes/print.h>
-#include <tcop/tcopprot.h>
-#include <lib/stringinfo.h>
-#include <commands/explain.h>
-#include <parser/parsetree.h>
-#include <parser/parse_node.h>
-#include <optimizer/planner.h>
-#include <access/xact.h>
-#include <utils/relcache.h>
-#include <rewrite/rewriteHandler.h>
+
+#include "postgres.h"
+
+#include "commands/explain.h"
+#include "lib/stringinfo.h"
+#include "nodes/print.h"
+#include "optimizer/planner.h"
+#include "parser/parsetree.h"
+#include "rewrite/rewriteHandler.h"
+#include "utils/relcache.h"
typedef struct ExplainState
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.4 1999/05/25 16:08:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.4.2.1 1999/08/02 05:56:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
-
-#include <postgres.h>
-
-#include <access/attnum.h>
-#include <access/genam.h>
-#include <access/heapam.h>
-#include <utils/builtins.h>
-#include <utils/syscache.h>
-#include <catalog/heap.h>
-#include <catalog/index.h>
-#include <catalog/pg_index.h>
-#include <catalog/pg_proc.h>
-#include <catalog/pg_type.h>
-#include <catalog/pg_opclass.h>
-#include <nodes/plannodes.h>
-#include <nodes/primnodes.h>
-#include <nodes/relation.h>
-#include <utils/relcache.h>
-#include <utils/lsyscache.h>
-#include <commands/defrem.h>
-#include <parser/parsetree.h> /* for getrelid() */
-#include <optimizer/prep.h>
-#include <optimizer/clauses.h>
-#include <storage/lmgr.h>
-#include <fmgr.h>
+
+#include "postgres.h"
+
+#include "access/genam.h"
+#include "access/heapam.h"
+#include "catalog/heap.h"
+#include "catalog/index.h"
+#include "catalog/pg_index.h"
+#include "catalog/pg_opclass.h"
+#include "catalog/pg_proc.h"
+#include "catalog/pg_type.h"
+#include "commands/defrem.h"
+#include "optimizer/clauses.h"
+#include "optimizer/prep.h"
+#include "parser/parsetree.h"
+#include "utils/builtins.h"
+#include "utils/syscache.h"
#define IsFuncIndex(ATTR_LIST) (((IndexElem*)lfirst(ATTR_LIST))->args!=NULL)
*-------------------------------------------------------------------------
*/
#include <ctype.h>
-#include <string.h>
#include "postgres.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.33 1999/05/25 16:08:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.33.2.1 1999/08/02 05:56:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "access/heapam.h"
#include "catalog/catname.h"
-#include "catalog/pg_aggregate.h"
#include "catalog/pg_language.h"
-#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "commands/defrem.h"
-#include "fmgr.h"
#include "miscadmin.h"
#include "parser/parse_func.h"
-#include "storage/bufmgr.h"
#include "utils/acl.h"
-#include "utils/builtins.h"
#include "utils/syscache.h"
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
/*
* RemoveOperator
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.25 1999/05/25 16:08:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.25.2.1 1999/08/02 05:56:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <postgres.h>
-
-#include <access/heapam.h>
-#include <access/relscan.h>
-#include <utils/builtins.h>
-#include <catalog/catname.h>
-#include <utils/syscache.h>
-#include <catalog/heap.h>
-#include <catalog/indexing.h>
-#include <catalog/catalog.h>
-#include <commands/copy.h>
-#include <commands/rename.h>
-#include <executor/execdefs.h> /* for EXEC_{FOR,BACK,FDEBUG,BDEBUG} */
-#include <miscadmin.h>
-#include <utils/portal.h>
-#include <tcop/dest.h>
-#include <commands/command.h>
-#include <storage/bufmgr.h>
-#include <utils/excid.h>
-#include <utils/mcxt.h>
-#include <catalog/pg_proc.h>
-#include <catalog/pg_class.h>
-#include <optimizer/internal.h>
-#include <optimizer/prep.h> /* for find_all_inheritors */
-#ifndef NO_SECURITY
-#include <utils/acl.h>
-#endif /* !NO_SECURITY */
-#ifndef HAVE_MEMMOVE
-#include <regex/utils.h>
-#else
-#include <string.h>
-#endif
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "utils/syscache.h"
+#include "catalog/heap.h"
+#include "catalog/indexing.h"
+#include "catalog/catalog.h"
+#include "commands/rename.h"
+#include "miscadmin.h"
+#include "optimizer/prep.h"
+#include "utils/acl.h"
/*
* renameatt - changes the name of a attribute in a relation
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
-
-#include <postgres.h>
-#include <miscadmin.h>
-
-#include <storage/bufmgr.h>
-#include <storage/bufpage.h>
-#include <storage/lmgr.h>
-#include <access/heapam.h>
-#include <nodes/parsenodes.h>
-#include <commands/creatinh.h>
-#include <commands/sequence.h>
-#include <utils/builtins.h>
-#include <utils/acl.h>
+
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "commands/creatinh.h"
+#include "commands/sequence.h"
+#include "miscadmin.h"
+#include "utils/acl.h"
+#include "utils/builtins.h"
#define SEQ_MAGIC 0x1717
*
*-------------------------------------------------------------------------
*/
-#include <string.h>
#include "postgres.h"
+
#include "access/genam.h"
#include "access/heapam.h"
-#include "access/valid.h"
-#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/indexing.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_trigger.h"
#include "commands/trigger.h"
-#include "fmgr.h"
-#include "nodes/memnodes.h"
-#include "nodes/parsenodes.h"
-#include "storage/lmgr.h"
-#include "storage/bufmgr.h"
-#include "utils/mcxt.h"
-#include "utils/inval.h"
-#include "utils/builtins.h"
-#include "utils/syscache.h"
#include "executor/executor.h"
-
-#ifndef NO_SECURITY
#include "miscadmin.h"
#include "utils/acl.h"
-#endif
+#include "utils/builtins.h"
+#include "utils/inval.h"
+#include "utils/syscache.h"
DLLIMPORT TriggerData *CurrentTriggerData = NULL;
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: user.c,v 1.28 1999/05/25 16:08:27 momjian Exp $
+ * $Id: user.c,v 1.28.2.1 1999/08/02 05:56:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <postgres.h>
-
-#include <miscadmin.h>
-#include <catalog/catname.h>
-#include <catalog/pg_database.h>
-#include <catalog/pg_shadow.h>
-#include <libpq/crypt.h>
-#include <access/heapam.h>
-#include <access/xact.h>
-#include <storage/bufmgr.h>
-#include <storage/lmgr.h>
-#include <tcop/tcopprot.h>
-#include <utils/acl.h>
-#include <utils/rel.h>
-#include <utils/syscache.h>
-#include <commands/user.h>
+#include "postgres.h"
+
+#include "access/heapam.h"
+#include "catalog/catname.h"
+#include "catalog/pg_database.h"
+#include "catalog/pg_shadow.h"
+#include "commands/user.h"
+#include "libpq/crypt.h"
+#include "miscadmin.h"
+#include "tcop/tcopprot.h"
+#include "utils/acl.h"
+#include "utils/syscache.h"
static void CheckPgUserAclNotNull(void);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.110 1999/07/03 00:32:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.110.2.1 1999/08/02 05:57:00 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
#include <sys/file.h>
-#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "postgres.h"
-#include "miscadmin.h"
#include "access/genam.h"
#include "access/heapam.h"
-#include "access/transam.h"
-#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/index.h"
-#include "catalog/pg_class.h"
-#include "catalog/pg_index.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_statistic.h"
#include "catalog/pg_type.h"
#include "commands/vacuum.h"
-#include "fmgr.h"
+#include "miscadmin.h"
#include "parser/parse_oper.h"
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
-#include "storage/shmem.h"
#include "storage/smgr.h"
-#include "storage/itemptr.h"
-#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/inval.h"
-#include "utils/mcxt.h"
#include "utils/portal.h"
#include "utils/relcache.h"
#include "utils/syscache.h"
#ifndef HAVE_GETRUSAGE
-#include <rusagestub.h>
+#include "rusagestub.h"
#else
#include <sys/time.h>
#include <sys/resource.h>
to_item = i;
to_vpd = fraged_pages->vpl_pagedesc[to_item];
}
- to_vpd->vpd_free -= DOUBLEALIGN(tlen);
+ to_vpd->vpd_free -= MAXALIGN(tlen);
if (to_vpd->vpd_offsets_used >= to_vpd->vpd_offsets_free)
- to_vpd->vpd_free -= DOUBLEALIGN(sizeof(ItemIdData));
+ to_vpd->vpd_free -= MAXALIGN(sizeof(ItemIdData));
(to_vpd->vpd_offsets_used)++;
if (free_vtmove == 0)
{
vc_enough_space(VPageDescr vpd, Size len)
{
- len = DOUBLEALIGN(len);
+ len = MAXALIGN(len);
if (len > vpd->vpd_free)
return false;
return true; /* and len <= free_space */
/* ok. noff_usd >= noff_free and so we'll have to allocate new itemid */
- if (len + DOUBLEALIGN(sizeof(ItemIdData)) <= vpd->vpd_free)
+ if (len + MAXALIGN(sizeof(ItemIdData)) <= vpd->vpd_free)
return true;
return false;
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
- * $Id: variable.c,v 1.23 1999/07/07 09:36:45 momjian Exp $
+ * $Id: variable.c,v 1.23.2.1 1999/08/02 05:57:00 scrappy Exp $
*
*/
-#include <stdio.h>
-#include <string.h>
#include <ctype.h>
#include <time.h>
+
#include "postgres.h"
-#include "miscadmin.h"
+#include "access/xact.h"
#include "commands/variable.h"
-#include "utils/builtins.h"
+#include "miscadmin.h"
#include "optimizer/internal.h"
-#include "access/xact.h"
+#include "utils/builtins.h"
#include "utils/tqual.h"
+
#ifdef MULTIBYTE
#include "mb/pg_wchar.h"
#endif
+
static bool show_date(void);
static bool reset_date(void);
static bool parse_date(const char *);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: view.c,v 1.33 1999/05/25 16:08:28 momjian Exp $
+ * $Id: view.c,v 1.33.2.1 1999/08/02 05:57:00 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
-#include <stdio.h>
-#include <string.h>
-
-#include <postgres.h>
-
-#include <catalog/heap.h>
-#include <access/heapam.h>
-#include <access/xact.h>
-#include <utils/builtins.h>
-#include <nodes/relation.h>
-#include <parser/parse_relation.h>
-#include <parser/parse_type.h>
-#include <rewrite/rewriteDefine.h>
-#include <rewrite/rewriteHandler.h>
-#include <rewrite/rewriteManip.h>
-#include <rewrite/rewriteRemove.h>
-#include <commands/creatinh.h>
-#include <commands/view.h>
+
+#include "postgres.h"
+
+#include "access/xact.h"
+#include "catalog/heap.h"
+#include "commands/creatinh.h"
+#include "commands/view.h"
+#include "parser/parse_relation.h"
+#include "parser/parse_type.h"
+#include "rewrite/rewriteDefine.h"
+#include "rewrite/rewriteManip.h"
+#include "rewrite/rewriteRemove.h"
/*---------------------------------------------------------------------
* DefineVirtualRelation
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_copy.c,v 1.5 1999/02/13 23:16:04 momjian Exp $
+ * $Id: geqo_copy.c,v 1.5.2.1 1999/08/02 05:57:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
#include "optimizer/geqo_copy.h"
/* geqo_copy
* CX operator according to Oliver et al
* (Proc 2nd Int'l Conf on GA's)
*
-* $Id: geqo_cx.c,v 1.6 1999/02/13 23:16:05 momjian Exp $
+* $Id: geqo_cx.c,v 1.6.2.1 1999/08/02 05:57:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
* geqo_erx.c
* edge recombination crossover [ER]
*
-* $Id: geqo_erx.c,v 1.11 1999/02/13 23:16:06 momjian Exp $
+* $Id: geqo_erx.c,v 1.11.2.1 1999/08/02 05:57:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.39 1999/05/25 22:41:19 momjian Exp $
+ * $Id: geqo_eval.c,v 1.39.2.1 1999/08/02 05:57:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
-#include "postgres.h"
-
#include <math.h>
+
+#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#ifndef MAXINT
#include <values.h>
#endif
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-#include "utils/portal.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
#include "optimizer/cost.h"
-#include "optimizer/tlist.h"
-#include "optimizer/joininfo.h"
-
-#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
+#include "optimizer/paths.h"
+#include "utils/portal.h"
+
/*
* Variables set by geqo_eval_startup for use within a single GEQO run
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_main.c,v 1.16 1999/05/25 16:09:16 momjian Exp $
+ * $Id: geqo_main.c,v 1.16.2.1 1999/08/02 05:57:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/plannodes.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
+#include "optimizer/geqo_misc.h"
#include "optimizer/geqo_pool.h"
#include "optimizer/geqo_selection.h"
-#include "optimizer/geqo_recombination.h"
-#include "optimizer/geqo_mutation.h"
-#include "optimizer/geqo_misc.h"
/* define edge recombination crossover [ERX] per default */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_misc.c,v 1.19 1999/05/25 22:41:20 momjian Exp $
+ * $Id: geqo_misc.c,v 1.19.2.1 1999/08/02 05:57:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
*/
-#include <stdio.h>
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo_pool.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_misc.h"
static float avg_pool(Pool *pool);
*
* TSP mutation routines
*
-* $Id: geqo_mutation.c,v 1.5 1999/02/13 23:16:09 momjian Exp $
+* $Id: geqo_mutation.c,v 1.5.2.1 1999/08/02 05:57:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo_random.h"
#include "optimizer/geqo_mutation.h"
+#include "optimizer/geqo_random.h"
void
geqo_mutation(Gene *tour, int num_gene)
* OX1 operator according to Davis
* (Proc Int'l Joint Conf on AI)
*
-* $Id: geqo_ox1.c,v 1.5 1999/02/13 23:16:10 momjian Exp $
+* $Id: geqo_ox1.c,v 1.5.2.1 1999/08/02 05:57:05 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_recombination.h"
/* ox1
* OX2 operator according to Syswerda
* (The Genetic Algorithms Handbook, ed L Davis)
*
-* $Id: geqo_ox2.c,v 1.5 1999/02/13 23:16:10 momjian Exp $
+* $Id: geqo_ox2.c,v 1.5.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_recombination.h"
/* ox2
*
* Copyright (c) 1994, Regents of the University of California
*
-* $Id: geqo_params.c,v 1.17 1999/05/22 23:27:19 tgl Exp $
+* $Id: geqo_params.c,v 1.17.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
-#include <stdio.h>
#include <time.h>
#include <math.h>
#include <ctype.h>
-#include <string.h>
#include "postgres.h"
#include "miscadmin.h"
-
#include "nodes/pg_list.h"
-#include "nodes/relation.h"
#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
+#include "nodes/relation.h"
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
-
+#include "optimizer/geqo_gene.h"
+#include "optimizer/internal.h"
+#include "optimizer/pathnode.h"
+#include "optimizer/paths.h"
#include "storage/fd.h"
+
/*
* Parameter values read from the config file (or defaulted) are stored here
* by geqo_params().
* PMX operator according to Goldberg & Lingle
* (Proc Int'l Conf on GA's)
*
-* $Id: geqo_pmx.c,v 1.5 1999/02/13 23:16:11 momjian Exp $
+* $Id: geqo_pmx.c,v 1.5.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_recombination.h"
/* pmx
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_pool.c,v 1.12 1999/05/25 16:09:18 momjian Exp $
+ * $Id: geqo_pool.c,v 1.12.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
-#include "optimizer/geqo_pool.h"
#include "optimizer/geqo_copy.h"
+#include "optimizer/geqo_pool.h"
#include "optimizer/geqo_recombination.h"
* PX operator according to Syswerda
* (The Genetic Algorithms Handbook, L Davis, ed)
*
-* $Id: geqo_px.c,v 1.6 1999/02/13 23:16:12 momjian Exp $
+* $Id: geqo_px.c,v 1.6.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*************************************************************/
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_recombination.h"
/* px
* geqo_recombination.c
* misc recombination procedures
*
-* $Id: geqo_recombination.c,v 1.7 1999/02/13 23:16:12 momjian Exp $
+* $Id: geqo_recombination.c,v 1.7.2.1 1999/08/02 05:57:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo.h"
-#include "optimizer/geqo_recombination.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_recombination.h"
/*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_selection.c,v 1.7 1999/02/13 23:16:13 momjian Exp $
+ * $Id: geqo_selection.c,v 1.7.2.1 1999/08/02 05:57:07 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <math.h>
#include "postgres.h"
-
-#include "nodes/pg_list.h"
-#include "nodes/relation.h"
-#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-#include "utils/elog.h"
-
-#include "optimizer/internal.h"
-#include "optimizer/paths.h"
-#include "optimizer/pathnode.h"
-#include "optimizer/clauses.h"
-#include "optimizer/cost.h"
-
-#include "optimizer/geqo_gene.h"
-#include "optimizer/geqo_selection.h"
#include "optimizer/geqo_copy.h"
#include "optimizer/geqo_random.h"
+#include "optimizer/geqo_selection.h"
static int linear(int max, double bias);
*
*
* IDENTIFICATION
-* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.12 1999/05/25 22:41:22 momjian Exp $
+* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.12.2.1 1999/08/02 05:57:07 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+
#include "nodes/pg_list.h"
-#include "nodes/relation.h"
#include "nodes/primnodes.h"
-
-#include "utils/palloc.h"
-
+#include "nodes/relation.h"
#include "optimizer/cost.h"
-
-/*
- include "optimizer/geqo/tsp.h"
- */
-
-#include "optimizer/geqo/geqo_gene.h"
#include "optimizer/geqo/geqo.h"
+#include "optimizer/geqo/geqo_gene.h"
/*
* minspantree