diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c index 817227284c646e918b5a9c1377d21018abd1c4aa..dfbda65ef4c0e0f8e2eea8a47de696ccaeefa024 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -7,24 +7,18 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.3 1996/11/03 23:27:00 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.4 1996/11/06 06:47:01 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> /* XXX */ +#include <postgres.h> -#include "postgres.h" -#include "miscadmin.h" /* for DataDir */ - -#include "utils/syscache.h" -#include "storage/buf.h" -#include "utils/palloc.h" - -#include "catalog/catname.h" /* NameIs{,Shared}SystemRelationName */ -#include "catalog/pg_attribute.h" -#include "catalog/pg_type.h" -#include "catalog/catalog.h" -#include "access/transam.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> /* * relpath - path to the relation diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 45ad0408598ff2752a14aa067c5271a1f9c16184..7dd8ca6d828cd1d5f9dbcdd1198f1e3cac8fbe0d 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.4 1996/11/05 11:57:50 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.5 1996/11/06 06:47:03 scrappy Exp $ * * INTERFACE ROUTINES * heap_creatr() - Create an uncataloged heap relation @@ -24,44 +24,49 @@ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <sys/file.h> -#include <string.h> - -#include "postgres.h" +#include <postgres.h> + +#include <utils/mcxt.h> +#include <parser/catalog_utils.h> +#include <catalog/index.h> +#include <fmgr.h> +#include <catalog/pg_index.h> +#include <catalog/pg_type.h> +#include <catalog/catname.h> +#include <utils/relcache.h> +#include <storage/bufmgr.h> +#include <catalog/heap.h> +#include <rewrite/rewriteRemove.h> +#include <storage/lmgr.h> +#include <storage/smgr.h> +#include <access/relscan.h> +#include <utils/tqual.h> +/* #include <catalog/heap.h> #include <catalog/pg_proc.h> - -#include "parser/catalog_utils.h" - -#include "access/heapam.h" -#include "access/genam.h" -#include "access/istrat.h" -#include "storage/bufmgr.h" -#include "lib/hasht.h" -#include "miscadmin.h" -#include "fmgr.h" -#include "utils/builtins.h" -#include "utils/mcxt.h" -#include "utils/palloc.h" -#include "utils/relcache.h" - -#include "catalog/catname.h" -#include "catalog/pg_attribute.h" -#include "catalog/pg_index.h" -#include "catalog/pg_inherits.h" -#include "catalog/pg_ipl.h" -#include "catalog/index.h" -#include "catalog/indexing.h" - -#include "catalog/catalog.h" - -#include "storage/lmgr.h" - -#include "rewrite/rewriteRemove.h" - -#include "storage/smgr.h" +#include <parser/catalog_utils.h> +#include <access/heapam.h> +#include <access/genam.h> +#include <access/istrat.h> +#include <storage/bufmgr.h> +#include <lib/hasht.h> +#include <miscadmin.h> +#include <fmgr.h> +#include <utils/builtins.h> +#include <utils/mcxt.h> +#include <utils/relcache.h> +#include <catalog/catname.h> +#include <catalog/pg_index.h> +#include <catalog/pg_inherits.h> +#include <catalog/pg_ipl.h> +#include <catalog/index.h> +#include <catalog/indexing.h> +#include <catalog/catalog.h> +#include <storage/lmgr.h> +#include <rewrite/rewriteRemove.h> +#include <storage/smgr.h> +*/ static void AddNewAttributeTuples(Oid new_rel_oid, TupleDesc tupdesc); static void CheckAttributeNames(TupleDesc tupdesc); @@ -1174,263 +1179,4 @@ DeletePgTypeTuple(Relation rdesc) /* ---------------- * now scan pg_attribute. if any other relations have - * attributes of the type of the relation we are deleteing - * then we have to disallow the deletion. should talk to - * stonebraker about this. -cim 6/19/90 - * ---------------- - */ - typoid = tup->t_oid; - - pg_attribute_desc = heap_openr(AttributeRelationName); - - ScanKeyEntryInitialize(&attkey, - 0, Anum_pg_attribute_atttypid, F_INT4EQ, - typoid); - - pg_attribute_scan = heap_beginscan(pg_attribute_desc, - 0, - NowTimeQual, - 1, - &attkey); - - /* ---------------- - * try and get a pg_attribute tuple. if we succeed it means - * we cant delete the relation because something depends on - * the schema. - * ---------------- - */ - atttup = heap_getnext(pg_attribute_scan, 0, (Buffer *)NULL); - - if (PointerIsValid(atttup)) { - Oid relid = ((AttributeTupleForm) GETSTRUCT(atttup))->attrelid; - - heap_endscan(pg_type_scan); - heap_close(pg_type_desc); - heap_endscan(pg_attribute_scan); - heap_close(pg_attribute_desc); - - elog(WARN, "DeletePgTypeTuple: att of type %s exists in relation %d", - &rdesc->rd_rel->relname, relid); - } - heap_endscan(pg_attribute_scan); - heap_close(pg_attribute_desc); - - /* ---------------- - * Ok, it's safe so we delete the relation tuple - * from pg_type and finish up. But first end the scan so that - * we release the read lock on pg_type. -mer 13 Aug 1991 - * ---------------- - */ - heap_endscan(pg_type_scan); - heap_delete(pg_type_desc, &tup->t_ctid); - - heap_close(pg_type_desc); -} - -/* -------------------------------- - * heap_destroy - * - * -------------------------------- - */ -void -heap_destroy(char *relname) -{ - Relation rdesc; - - /* ---------------- - * first open the relation. if the relation does exist, - * heap_openr() returns NULL. - * ---------------- - */ - rdesc = heap_openr(relname); - if (rdesc == NULL) - elog(WARN,"Relation %s Does Not Exist!", relname); - - /* ---------------- - * prevent deletion of system relations - * ---------------- - */ - if (IsSystemRelationName(RelationGetRelationName(rdesc)->data)) - elog(WARN, "amdestroy: cannot destroy %s relation", - &rdesc->rd_rel->relname); - - /* ---------------- - * remove inheritance information - * ---------------- - */ - RelationRemoveInheritance(rdesc); - - /* ---------------- - * remove indexes if necessary - * ---------------- - */ - if (rdesc->rd_rel->relhasindex) { - RelationRemoveIndexes(rdesc); - } - - /* ---------------- - * remove rules if necessary - * ---------------- - */ - if (rdesc->rd_rules != NULL) { - RelationRemoveRules(rdesc->rd_id); - } - - /* ---------------- - * delete attribute tuples - * ---------------- - */ - DeletePgAttributeTuples(rdesc); - - /* ---------------- - * delete type tuple. here we want to see the effects - * of the deletions we just did, so we use setheapoverride(). - * ---------------- - */ - setheapoverride(true); - DeletePgTypeTuple(rdesc); - setheapoverride(false); - - /* ---------------- - * delete relation tuple - * ---------------- - */ - DeletePgRelationTuple(rdesc); - - /* ---------------- - * flush the relation from the relcache - * ---------------- - */ - RelationIdInvalidateRelationCacheByRelationId(rdesc->rd_id); - - /* ---------------- - * unlink the relation and finish up. - * ---------------- - */ - (void) smgrunlink(rdesc->rd_rel->relsmgr, rdesc); - if(rdesc->rd_istemp) { - rdesc->rd_tmpunlinked = TRUE; - } - heap_close(rdesc); -} - -/* - * heap_destroyr - * destroy and close temporary relations - * - */ - -void -heap_destroyr(Relation rdesc) -{ - ReleaseTmpRelBuffers(rdesc); - (void) smgrunlink(rdesc->rd_rel->relsmgr, rdesc); - if(rdesc->rd_istemp) { - rdesc->rd_tmpunlinked = TRUE; - } - heap_close(rdesc); - RemoveFromTempRelList(rdesc); -} - - -/************************************************************** - functions to deal with the list of temporary relations -**************************************************************/ - -/* -------------- - InitTempRellist(): - - initialize temporary relations list - the tempRelList is a list of temporary relations that - are created in the course of the transactions - they need to be destroyed properly at the end of the transactions - - MODIFIES the global variable tempRels - - >> NOTE << - - malloc is used instead of palloc because we KNOW when we are - going to free these things. Keeps us away from the memory context - hairyness - -*/ -void -InitTempRelList() -{ - if (tempRels) { - free(tempRels->rels); - free(tempRels); - }; - - tempRels = (TempRelList*)malloc(sizeof(TempRelList)); - tempRels->size = TEMP_REL_LIST_SIZE; - tempRels->rels = (Relation*)malloc(sizeof(Relation) * tempRels->size); - memset(tempRels->rels, 0, sizeof(Relation) * tempRels->size); - tempRels->num = 0; -} - -/* - removes a relation from the TempRelList - - MODIFIES the global variable tempRels - we don't really remove it, just mark it as NULL - and DestroyTempRels will look for NULLs -*/ -void -RemoveFromTempRelList(Relation r) -{ - int i; - - if (!tempRels) - return; - - for (i=0; i<tempRels->num; i++) { - if (tempRels->rels[i] == r) { - tempRels->rels[i] = NULL; - break; - } - } -} - -/* - add a temporary relation to the TempRelList - - MODIFIES the global variable tempRels -*/ -void -AddToTempRelList(Relation r) -{ - if (!tempRels) - return; - - if (tempRels->num == tempRels->size) { - tempRels->size += TEMP_REL_LIST_SIZE; - tempRels->rels = realloc(tempRels->rels, tempRels->size); - } - tempRels->rels[tempRels->num] = r; - tempRels->num++; -} - -/* - go through the tempRels list and destroy each of the relations -*/ -void -DestroyTempRels() -{ - int i; - Relation rdesc; - - if (!tempRels) - return; - - for (i=0;i<tempRels->num;i++) { - rdesc = tempRels->rels[i]; - /* rdesc may be NULL if it has been removed from the list already */ - if (rdesc) - heap_destroyr(rdesc); - } - free(tempRels->rels); - free(tempRels); - tempRels = NULL; -} - + * attributes of the type of the relation we are de \ No newline at end of file diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index ca05430e0190d3eaa566ea4308433d6abc0457ff..1e8aeb0bf6c19c605127733a767618f95a86bd14 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.12 1996/11/03 23:57:22 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.13 1996/11/06 06:47:09 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,8 @@ #include <utils/builtins.h> +#include <utils/acl.h> + #include <sys/stat.h> #include <catalog/pg_index.h> diff --git a/src/backend/commands/defind.c b/src/backend/commands/defind.c index 131197a37ef41e074d13960cb07b312534ac8f26..cc5703f8faa66b884f5fc646b21cdacfe6b5c3bd 100644 --- a/src/backend/commands/defind.c +++ b/src/backend/commands/defind.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.6 1996/11/03 23:57:27 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.7 1996/11/06 06:47:12 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,7 @@ #include "optimizer/prep.h" #include "optimizer/clauses.h" #include "storage/lmgr.h" +#include "fmgr.h" #define IsFuncIndex(ATTR_LIST) (((IndexElem*)lfirst(ATTR_LIST))->args!=NULL) diff --git a/src/backend/commands/remove.c b/src/backend/commands/remove.c index c9e765501a0cd4050dbe6e9023847d536d65e13e..be74f376729b3feb59e351509522490d7f8c7723 100644 --- a/src/backend/commands/remove.c +++ b/src/backend/commands/remove.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.4 1996/11/03 23:57:38 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.5 1996/11/06 06:47:16 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -18,6 +18,7 @@ #include "access/heapam.h" #include "utils/builtins.h" #include "utils/tqual.h" /* for NowTimeQual */ +#include "utils/syscache.h" #include "catalog/catname.h" #include "commands/defrem.h" @@ -26,6 +27,7 @@ #include "catalog/pg_aggregate.h" #include "catalog/pg_language.h" #include "catalog/pg_operator.h" +#include "catalog/pg_proc.h" #include "parser/catalog_utils.h" #include "storage/bufmgr.h" #include "fmgr.h" diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index b322f855255cb1c1d1581395285dc4b6cce813a2..ff9527e17ca94ba1f207f4a5fa4b55941723c951 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -7,12 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.6 1996/11/03 23:57:40 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.7 1996/11/06 06:47:18 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <sys/file.h> #include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> #include "postgres.h" #include "utils/portal.h" diff --git a/src/backend/executor/Makefile b/src/backend/executor/Makefile index cc1f5d1c2e14adf440d2bd1635ad67a328a37ff5..16838d28fa55708666ca85858b9808ec96af8861 100644 --- a/src/backend/executor/Makefile +++ b/src/backend/executor/Makefile @@ -4,7 +4,7 @@ # Makefile for executor # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/executor/Makefile,v 1.1 1996/10/27 09:47:26 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/backend/executor/Makefile,v 1.2 1996/11/06 06:47:24 scrappy Exp $ # #------------------------------------------------------------------------- @@ -13,7 +13,6 @@ include ../../Makefile.global INCLUDE_OPT = -I.. \ -I../port/$(PORTNAME) \ - -I../include \ -I../../include CFLAGS+=$(INCLUDE_OPT) diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index 7a245ea756eb507490b0fc8a83a2f7375be8d941..0fae4f2d05ab659e42920283e6d62c69a9a7273c 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.2 1996/10/31 10:11:21 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.3 1996/11/06 06:47:26 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -32,6 +32,7 @@ #include "executor/executor.h" #include "storage/smgr.h" +#include "utils/mcxt.h" #include "executor/nodeSeqscan.h" #include "executor/nodeIndexscan.h" #include "executor/nodeSort.h" @@ -400,8 +401,8 @@ ExecCreatR(TupleDesc tupType, { Relation relDesc; - EU4_printf("ExecCreatR: %s numatts=%d type=%d oid=%d\n", - "entering: ", numberAttributes, tupType, relationOid); + EU4_printf("ExecCreatR: %s type=%d oid=%d\n", + "entering: ", tupType, relationOid); CXT1_printf("ExecCreatR: context is %d\n", CurrentMemoryContext); relDesc = NULL; diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index ff41238959b32cd9cd5644868b913eb130f0f337..c5e26186087e7edce7480a348d973deec86c475c 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,23 +26,32 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.7 1996/10/31 10:11:24 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.8 1996/11/06 06:47:32 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <string.h> #include "postgres.h" +#include "miscadmin.h" #include "executor/executor.h" +#include "executor/execdefs.h" +#include "executor/execdebug.h" #include "executor/nodeIndexscan.h" #include "utils/builtins.h" #include "utils/palloc.h" #include "utils/acl.h" +#include "utils/syscache.h" #include "parser/parsetree.h" /* rt_fetch() */ #include "storage/bufmgr.h" #include "storage/lmgr.h" +#include "storage/smgr.h" #include "commands/async.h" /* #include "access/localam.h" */ #include "optimizer/var.h" +#include "access/heapam.h" +#include "catalog/heap.h" + /* decls for local routines only used within this module */ diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index a632ed50054b8a957d8a5d036202a17a1a57dddc..f18cb4ed9367303eaf82c223fee6d3e361f1b3ae 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.8 1996/10/31 10:11:28 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.9 1996/11/06 06:47:34 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -30,6 +30,7 @@ * */ #include "postgres.h" +#include "fmgr.h" #include "nodes/primnodes.h" #include "nodes/relation.h" @@ -38,7 +39,9 @@ #include "nodes/memnodes.h" #include "catalog/pg_language.h" +#include "catalog/pg_proc.h" #include "executor/executor.h" +#include "executor/execdebug.h" #include "executor/execFlatten.h" #include "executor/functions.h" #include "access/heapam.h" @@ -48,6 +51,7 @@ #include "utils/fcache.h" #include "utils/fcache2.h" #include "utils/array.h" +#include "utils/mcxt.h" /* ---------------- * externs and constants diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 397053bf3677281e11080926037ee44fc6e96651..276bb632ae9026f7bb587f49e2030f0e60159eeb 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.3 1996/10/31 10:11:43 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.4 1996/11/06 06:47:35 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -41,13 +41,20 @@ */ #include "postgres.h" +#include "fmgr.h" #include "executor/executor.h" +#include "executor/execdebug.h" #include "access/itup.h" +#include "access/heapam.h" +#include "access/genam.h" #include "optimizer/clauses.h" #include "utils/palloc.h" +#include "utils/mcxt.h" #include "commands/command.h" #include "catalog/index.h" +#include "catalog/catname.h" +#include "catalog/pg_proc.h" /* ---------------------------------------------------------------- * global counters for number of tuples processed, retrieved, diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 36ac698f89da0d5979e5cc285087cfc410b83426..a1e6bf1c45ab24c473e32fa3ebf294659303396f 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,10 +8,11 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.3 1996/10/26 04:13:20 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.4 1996/11/06 06:47:36 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <string.h> #include "postgres.h" #include "nodes/primnodes.h" @@ -35,6 +36,7 @@ #include "access/heapam.h" #include "access/xact.h" #include "executor/executor.h" +#include "executor/execdefs.h" #include "executor/functions.h" #undef new diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index e7bbc2fb59c86ade7d70b58621b0ce94370ec98d..44e051a3038db9ac1569600df43efd568b7a2763 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -15,7 +15,10 @@ * *------------------------------------------------------------------------- */ +#include <string.h> + #include "postgres.h" +#include "fmgr.h" #include "access/heapam.h" #include "catalog/pg_aggregate.h" @@ -24,6 +27,7 @@ #include "executor/nodeAgg.h" #include "storage/bufmgr.h" #include "utils/palloc.h" +#include "utils/syscache.h" #include "parser/catalog_utils.h" /* diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index cdbdab6592de9d2f6171a68c16502cde7a1da5b2..fe2e88a7ad679291e528f80afcc5b5b52aaa9559 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.3 1996/10/31 10:11:54 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.4 1996/11/06 06:47:39 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -55,10 +55,13 @@ #include "postgres.h" +#include "access/heapam.h" #include "executor/executor.h" +#include "executor/execdebug.h" #include "executor/nodeAppend.h" #include "executor/nodeIndexscan.h" #include "utils/palloc.h" +#include "utils/mcxt.h" #include "parser/parsetree.h" /* for rt_store() macro */ /* ---------------------------------------------------------------- diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index d6067713cfe6e6d7baecea04911e9dd01129571a..e3b004c0a29bbad709136dadb485b2a9899dc061 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.6 1996/10/31 10:12:00 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.7 1996/11/06 06:47:40 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -21,7 +21,14 @@ #include <stdio.h> /* for sprintf() */ #include <math.h> +#include <string.h> #include <sys/file.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include <unistd.h> + #include "postgres.h" @@ -31,6 +38,7 @@ #include "executor/executor.h" #include "executor/nodeHash.h" #include "executor/nodeHashjoin.h" +#include "executor/execdebug.h" #include "utils/palloc.h" #include "utils/hsearch.h" @@ -845,7 +853,7 @@ static int hjtmpcnt = 0; static void mk_hj_temp(char *tempname) { - sprintf(tempname, "HJ%d.%d", getpid(), hjtmpcnt); + sprintf(tempname, "HJ%d.%d", (int)getpid(), hjtmpcnt); hjtmpcnt = (hjtmpcnt + 1) % 1000; } diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 40fa9d956286d663cf4ade6accb62b58242ee919..e6eee333b87c2773efff1e6e64d828db05af3647 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -7,16 +7,23 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.2 1996/10/31 05:53:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.3 1996/11/06 06:47:41 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <string.h> #include <sys/file.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + + #include "postgres.h" #include "storage/bufmgr.h" /* for BLCKSZ */ #include "storage/fd.h" /* for SEEK_ */ #include "executor/executor.h" +#include "executor/execdebug.h" #include "executor/nodeHash.h" #include "executor/nodeHashjoin.h" diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index bb50aea276961a6761b959fdbbd4b60ade3cc577..db918eb3cd3fe62a186361dfcb9027f11e86756d 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.3 1996/10/31 10:12:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.4 1996/11/06 06:47:42 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -31,13 +31,17 @@ #include "postgres.h" #include "executor/executor.h" +#include "executor/execdebug.h" #include "executor/nodeIndexscan.h" #include "optimizer/clauses.h" /* for get_op, get_leftop, get_rightop */ #include "parser/parsetree.h" /* for rt_fetch() */ #include "access/skey.h" +#include "access/heapam.h" +#include "access/genam.h" #include "utils/palloc.h" +#include "utils/mcxt.h" #include "catalog/index.h" #include "storage/bufmgr.h" #include "storage/lmgr.h" diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c index 19edb49e5d8d5a201b55154063ed85cca5da8f15..d836ae98e80c9e597d8df39c8d132893bfc72277 100644 --- a/src/backend/executor/nodeMaterial.c +++ b/src/backend/executor/nodeMaterial.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.3 1996/10/31 10:12:09 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.4 1996/11/06 06:47:44 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -24,7 +24,9 @@ #include "executor/executor.h" #include "executor/nodeMaterial.h" #include "catalog/catalog.h" +#include "catalog/heap.h" #include "optimizer/internal.h" /* for _TEMP_RELATION_ID_ */ +#include "access/heapam.h" /* ---------------------------------------------------------------- * ExecMaterial diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index aabc985d8005d3cb97e87a2a2aab51d9f5f3490e..94bf950c579fb6c2b3854270d4ad4385052615d5 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.2 1996/10/31 10:12:11 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.3 1996/11/06 06:47:45 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -78,6 +78,7 @@ #include "postgres.h" #include "executor/executor.h" +#include "executor/execdefs.h" #include "executor/nodeMergejoin.h" #include "utils/lsyscache.h" diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c index a43800e0e5c0acc484455af9e11f4af67588f938..ee8be28ca539ae1afe078c8df6c1a0940c44ccc4 100644 --- a/src/backend/executor/nodeTee.c +++ b/src/backend/executor/nodeTee.c @@ -15,7 +15,7 @@ * ExecEndTee * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.2 1996/10/31 10:12:24 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.3 1996/11/06 06:47:46 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -25,7 +25,9 @@ #include "utils/palloc.h" #include "utils/relcache.h" +#include "utils/mcxt.h" #include "storage/bufmgr.h" /* for IncrBufferRefCount */ +#include "storage/smgr.h" #include "optimizer/internal.h" #include "executor/executor.h" #include "executor/nodeTee.h" diff --git a/src/backend/lib/bit.c b/src/backend/lib/bit.c index 995d8e3adf338f1606375f199ef09abda88dc4de..779a66ae598e65bbc99548aa644b36cf2a1e0ada 100644 --- a/src/backend/lib/bit.c +++ b/src/backend/lib/bit.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.2 1996/10/31 10:26:27 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.3 1996/11/06 06:47:53 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,7 @@ */ #include "postgres.h" +#include "utils/bit.h" #include "utils/memutils.h" void diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index bda22d19ab76ea6e228824deb2b35ce8b20a2f06..8970469f90932431c2566b841fd10c1d8a62326a 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.5 1996/10/31 10:37:48 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.6 1996/11/06 06:48:06 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -63,6 +63,7 @@ #include <arpa/inet.h> #include "postgres.h" +#include "miscadmin.h" #include "libpq/auth.h" #include "libpq/libpq.h" diff --git a/src/backend/libpq/be-dumpdata.c b/src/backend/libpq/be-dumpdata.c index fb6b90c1495b875f79adfccefbfbe929d4639d18..9242741992f864e8c91deb48dfdf437f899e55bf 100644 --- a/src/backend/libpq/be-dumpdata.c +++ b/src/backend/libpq/be-dumpdata.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.1.1.1 1996/07/09 06:21:30 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.2 1996/11/06 06:48:10 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -29,6 +29,7 @@ * puts portals on the stack and the PQ functions remove them. * */ +#include <string.h> #include "postgres.h" #include "lib/dllist.h" diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 0f61d76d5bc997e837bc493fba232ab78df44b88..b93890231f0199e15154ec4ad33ed33971257481 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.8 1996/11/03 09:24:04 bryanh Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.9 1996/11/06 06:48:12 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -21,7 +21,7 @@ #include <arpa/inet.h> #include <unistd.h> #if defined(sparc_solaris) -#include "port/inet_aton.h" +#include "inet_aton.h" /* after I copied it into port/sparc_solaris */ #endif #include "postgres.h" diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 077bfd639b64ca4eb1a3be2ce1c5413d57daba68..95b1a81da1598fd824bf20a7dec166c9f77728fd 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.11 1996/11/04 04:35:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.12 1996/11/06 06:48:20 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -22,11 +22,13 @@ #include "nodes/relation.h" #include "parse.h" /* for AND, OR, etc. */ #include "catalog/pg_type.h" /* for INT4OID, etc. */ +#include "catalog/pg_proc.h" #include "utils/elog.h" #include "utils/builtins.h" /* namecmp(), textout() */ #include "utils/lsyscache.h" #include "utils/palloc.h" #include "utils/mcxt.h" +#include "utils/syscache.h" #include "parser/parse_query.h" #include "parser/parse_state.h" #include "nodes/makefuncs.h" /* for makeResdom(), etc. */ diff --git a/src/backend/parser/catalog_utils.c b/src/backend/parser/catalog_utils.c index 4194699f9f7d0f82c7172e5a1a223ab3e5fb4e60..d26cf1c1342b258abfafde771463cd607bae76c6 100644 --- a/src/backend/parser/catalog_utils.c +++ b/src/backend/parser/catalog_utils.c @@ -6,10 +6,11 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.6 1996/11/04 04:35:40 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.7 1996/11/06 06:48:23 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <string.h> #include "postgres.h" #include "lib/dllist.h" @@ -29,6 +30,7 @@ #include "catalog/pg_inherits.h" #include "catalog/pg_operator.h" #include "catalog/pg_type.h" +#include "catalog/pg_proc.h" #include "catalog/indexing.h" #include "catalog/catname.h" diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c index c0b1747d54f7db4720c96f2326fdd39fdaa06ed7..344fe3b448b51c9ab69c79e5daff1527dfcc0ead 100644 --- a/src/backend/parser/parser.c +++ b/src/backend/parser/parser.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.4 1996/11/04 04:35:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.5 1996/11/06 06:48:26 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -23,6 +23,7 @@ #include "utils/exc.h" #include "utils/excid.h" #include "utils/palloc.h" +#include "utils/syscache.h" #include "catalog/pg_aggregate.h" #include "catalog/pg_type.h" #include "nodes/primnodes.h" diff --git a/src/backend/port/sparc_solaris/port.c b/src/backend/port/sparc_solaris/port.c index f3c6b8a7943034f72116749dac5ed87cbf9d235a..2fa72e7d682cf3020e6cb8b70db63e6e1527fa39 100644 --- a/src/backend/port/sparc_solaris/port.c +++ b/src/backend/port/sparc_solaris/port.c @@ -7,11 +7,12 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.2 1996/11/06 06:48:35 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <math.h> /* for pow() prototype */ +#include <stdlib.h> #include <errno.h> #include "rusagestub.h" diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index a26ee5ae42a3cfa2f3d699c3ef62761d0e664fa4..d6ef58614d18e096be06586aa3ed90eb83fb94df 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -6,10 +6,11 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.2 1996/07/23 02:23:54 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.3 1996/11/06 06:48:44 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <string.h> #include "postgres.h" #include "nodes/pg_list.h" #include "utils/elog.h" diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 9c5d3df0388a87d937252187ed811e01c6ae70f0..2bdd701481b35c42e28f07ed3612c3a9f56b258b 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -6,7 +6,7 @@ * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Id: fd.c,v 1.7 1996/11/04 04:53:24 momjian Exp $ + * $Id: fd.c,v 1.8 1996/11/06 06:48:51 scrappy Exp $ * * NOTES: * @@ -44,6 +44,8 @@ #include <sys/stat.h> #include <string.h> #include <unistd.h> +#include <sys/types.h> +#include <fcntl.h> #include "c.h" #include "miscadmin.h" /* for DataDir */ @@ -197,6 +199,7 @@ static int FileAccess(File file); static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode); static char *filepath(char *filename); +int pg_fsync(fd) { extern int fsyncOff; diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index b6a9df61c4d27f412c9fc82af9d95e9454a8575b..b384f6a1810b7d2d5a506f31950339688b903b89 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.6 1996/11/03 05:06:54 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.7 1996/11/06 06:49:01 scrappy Exp $ * * NOTES * @@ -41,6 +41,11 @@ #include "storage/ipc.h" #include "utils/memutils.h" +#if defined(sparc_solaris) +#include <string.h> +#include <sys/ipc.h> +#endif + #if defined(bsd44) int UsePrivateMemory = 1; #else diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 6566657f417a03ee5bc8dbf79290c8d619219c59..70c73f14c56f6a6e860f409e4a74763784aa5fbe 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.2 1996/11/03 05:06:55 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.3 1996/11/06 06:49:03 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,11 @@ #include "storage/lock.h" #include "miscadmin.h" /* for DebugLvl */ +#if defined(sparc_solaris) +#include <string.h> +#include <sys/ipc.h> +#endif + /* * SystemPortAddressCreateMemoryKey -- * Returns a memory key given a port address. diff --git a/src/backend/storage/ipc/s_lock.c b/src/backend/storage/ipc/s_lock.c index 1460fa3584c401e5940c8a0dec7fa5916aefef98..3c8f8c14eb2f2f264de4cedb3966e1bf792772fe 100644 --- a/src/backend/storage/ipc/s_lock.c +++ b/src/backend/storage/ipc/s_lock.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.6 1996/11/03 05:06:56 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.7 1996/11/06 06:49:04 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -316,7 +316,7 @@ tas_dummy() * SPARC (SunOS 4) */ -#if defined(sparc) +#if defined(sparc) && !defined(sparc_solaris) /* if we're using -ansi w/ gcc, use __asm__ instead of asm */ #if defined(__STRICT_ANSI__) diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index c7f88559d248355e53e978fabc13c2fca268980e..8ea1643049ef96be88ab02341bc70ed518b625fa 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.3 1996/11/03 05:06:59 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.4 1996/11/06 06:49:09 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -18,6 +18,7 @@ #include "postgres.h" +#include "storage/backendid.h" #include "storage/sinval.h" #include "storage/sinvaladt.h" #include "storage/spin.h" diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 0869a46a830944010bff3be39741e276b38445db..3c801729a20b3d851fdf1e59f395c0cdb6c70369 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -7,14 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.2 1996/11/03 05:07:00 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.3 1996/11/06 06:49:10 scrappy Exp $ * *------------------------------------------------------------------------- */ +#include <stdio.h> #include "postgres.h" #include "storage/ipc.h" +#include "storage/backendid.h" #include "storage/sinvaladt.h" #include "storage/lmgr.h" #include "utils/palloc.h" diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 719b0e5cb12788a3f52195a2b58ec09c151307b9..01c531ed4e5e98fee337f8980cb2a353cfa6c473 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -8,13 +8,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.3 1996/11/03 05:07:10 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.4 1996/11/06 06:49:17 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> /* for sprintf() */ #include <sys/file.h> #include "postgres.h" +#include "miscadmin.h" #include "libpq/libpq-fs.h" #include "access/genam.h" #include "access/heapam.h" diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 8ee7b6f78bad0253fb00163c88ae04eade8375d1..59007edb9f5d8e18ad32ddd48233c0088969e65d 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7 1996/11/03 05:07:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.8 1996/11/06 06:49:24 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -46,7 +46,7 @@ * This is so that we can support more backends. (system-wide semaphore * sets run out pretty fast.) -ay 4/95 * - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.7 1996/11/03 05:07:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.8 1996/11/06 06:49:24 scrappy Exp $ */ #include <sys/time.h> #ifndef WIN32 @@ -55,7 +55,13 @@ #include <string.h> #include <sys/types.h> +#if defined(sparc_solaris) +#include <sys/ipc.h> +#include <sys/sem.h> +#endif + #include "postgres.h" +#include "miscadmin.h" #include "libpq/pqsignal.h" /* substitute for <signal.h> */ #include "access/xact.h" diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 97f9c6e47f229eb9daef3834e3e39bf177ca7c32..74e70285c074ca203e89799a9a5b8410d6dc3dcb 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.3 1996/11/03 06:53:01 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.4 1996/11/06 06:49:34 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,6 @@ #include <string.h> #include "postgres.h" #include "utils/acl.h" -#include "access/htup.h" #include "catalog/pg_user.h" #include "utils/syscache.h" #include "utils/palloc.h" diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 30b0589d11f9e6c16b7c0287ab05de6e1e86e403..fca9fe083ae3f179b6998926ea7b81c266dacc6a 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -7,13 +7,11 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.7 1996/11/04 04:19:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.8 1996/11/06 06:49:36 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include "config.h" - #include <ctype.h> #include <stdio.h> @@ -27,7 +25,6 @@ #include "utils/memutils.h" #include "storage/fd.h" /* for SEEK_ */ #include "fmgr.h" -#include "utils/elog.h" #include "utils/array.h" #include "libpq/libpq-fs.h" diff --git a/src/backend/utils/adt/arrayutils.c b/src/backend/utils/adt/arrayutils.c index 9a16b950f2bcd8259d2168f703be677475481cca..5f175df031913a79e2c313aa0efaa572f060b5b7 100644 --- a/src/backend/utils/adt/arrayutils.c +++ b/src/backend/utils/adt/arrayutils.c @@ -7,14 +7,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.1.1.1 1996/07/09 06:22:03 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.2 1996/11/06 06:49:41 scrappy Exp $ * *------------------------------------------------------------------------- */ #define WEAK_C_OPTIMIZER -#include "c.h" +#include "postgres.h" int GetOffset(int n, int dim[], int lb[], int indx[]) diff --git a/src/backend/utils/adt/chunk.c b/src/backend/utils/adt/chunk.c index ca0cb2647eab8d12c149994b57d68d323f7f92c6..f3ae8e996c3dc038fca509cd857943d4a3ad1621 100644 --- a/src/backend/utils/adt/chunk.c +++ b/src/backend/utils/adt/chunk.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.1.1.1 1996/07/09 06:22:03 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.2 1996/11/06 06:49:43 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -21,7 +21,6 @@ #include "utils/palloc.h" #include "fmgr.h" -#include "utils/elog.h" #include "utils/array.h" #include "optimizer/internal.h" diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index d9eaf1227e87dc8047d5fa97cf781488df592cd3..5ef0e723d8311ea39cf14911a42cf86ed4f6bf56 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.1.1.1 1996/07/09 06:22:03 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.2 1996/11/06 06:49:44 scrappy Exp $ * * NOTES * This code is actually (almost) unused. @@ -34,9 +34,7 @@ #include "miscadmin.h" #include "access/xact.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/elog.h" #include "utils/palloc.h" -#include "utils/nabstime.h" #define TM_YEAR_BASE 1900 /* compatible to UNIX time */ #define EPOCH_YEAR 1970 /* compatible to UNIX time */ diff --git a/src/backend/utils/adt/datetimes.c b/src/backend/utils/adt/datetimes.c index e4b9efa66372f411d92aa9e62431be7b11945539..06f2e373d72daf01f6d0bd64fe920f456824e55a 100644 --- a/src/backend/utils/adt/datetimes.c +++ b/src/backend/utils/adt/datetimes.c @@ -7,17 +7,15 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.4 1996/10/25 06:02:52 bryanh Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.5 1996/11/06 06:49:45 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> /* for sprintf() */ #include <string.h> -#include <config.h> #include <postgres.h> #include <utils/palloc.h> -#include <utils/elog.h> /* these things look like structs, but we pass them by value so be careful For example, passing an int -> DateADT is not portable! */ diff --git a/src/backend/utils/adt/datum.c b/src/backend/utils/adt/datum.c index e982fc7607f477610ccca25468b250b75989cc91..f833e58a467d2a72197ba2512f9b2969dd814857 100644 --- a/src/backend/utils/adt/datum.c +++ b/src/backend/utils/adt/datum.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.1.1.1 1996/07/09 06:22:03 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.2 1996/11/06 06:49:47 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -31,7 +31,6 @@ #include "postgres.h" #include "utils/datum.h" #include "catalog/pg_type.h" -#include "utils/elog.h" #include "utils/palloc.h" /*------------------------------------------------------------------------- diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 6affe0691e6d75770c3d62b79407e1c7618fed02..310c839fa281c8341e809e3ae9e66501c979be79 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.6 1996/10/31 10:23:17 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.7 1996/11/06 06:49:48 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -53,7 +53,6 @@ #include "postgres.h" #include "fmgr.h" #include "utils/builtins.h" /* for ftod() prototype */ -#include "utils/elog.h" #include "utils/palloc.h" diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c index cbf4a0cba10b3d0a7993c8e9734762f97d3bdb83..07cdce82e4b399ed38b7f66803a8611c11f8f065 100644 --- a/src/backend/utils/adt/int.c +++ b/src/backend/utils/adt/int.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.1.1.1 1996/07/09 06:22:04 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.2 1996/11/06 06:49:49 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,6 @@ #include "postgres.h" #include "fmgr.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/elog.h" #include "utils/palloc.h" /***************************************************************************** diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index 4560b6d80d3f65147257d540bcd3fef5a230b435..127d59a281299dc28e75a24f1a9a1061c0497808 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -19,7 +19,6 @@ */ #include <string.h> #include "postgres.h" /* postgres system include file */ -#include "utils/elog.h" /* for logging postgres errors */ #include "utils/palloc.h" #include "utils/builtins.h" /* where the function declarations go */ @@ -143,7 +142,7 @@ bool textnlike(struct varlena *s, struct varlena *p) } -/* $Revision: 1.2 $ +/* $Revision: 1.3 $ ** "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. diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index ea59ee2e7b326dd76ebf75d325b4785fece789b3..ecdfebd18c03ac6df27afa229156840ced19df05 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -7,18 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.5 1996/10/17 23:59:45 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.6 1996/11/06 06:49:51 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> #include <ctype.h> #include <string.h> -#include <time.h> #include <sys/types.h> #include "postgres.h" #include "access/xact.h" -#include "utils/nabstime.h" #include "utils/palloc.h" #define MAXDATEFIELDS 25 diff --git a/src/backend/utils/adt/not_in.c b/src/backend/utils/adt/not_in.c index 47c28c4eda2711a8508b936f16e17f8dce73ea0f..5222f3d298628e61ccbf76f9440f1a5bd603a60c 100644 --- a/src/backend/utils/adt/not_in.c +++ b/src/backend/utils/adt/not_in.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.2 1996/11/06 06:49:53 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -26,10 +26,7 @@ #include <string.h> #include "postgres.h" #include "access/heapam.h" -#include "access/htup.h" #include "access/relscan.h" -#include "utils/rel.h" -#include "utils/elog.h" #include "utils/builtins.h" /* where function decls go */ /* ---------------------------------------------------------------- diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c index b331d45426f443ade6b90d5fc841e652220bc78b..c654c63d372284dc9eac617ec4a80d31351ad50d 100644 --- a/src/backend/utils/adt/numutils.c +++ b/src/backend/utils/adt/numutils.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.4 1996/10/31 10:23:19 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.5 1996/11/06 06:49:54 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,6 @@ #include <math.h> #include "postgres.h" #include "utils/builtins.h" /* where the declarations go */ -#include "utils/elog.h" int32 pg_atoi(char *s, int size, int c) diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c index d049db8b7f1f6b00870b2e23093e09542dd815f2..d423853da15f10da6f4f1de8d499fcb3b2177cb2 100644 --- a/src/backend/utils/adt/oid.c +++ b/src/backend/utils/adt/oid.c @@ -7,14 +7,13 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.2 1996/11/06 06:49:55 scrappy Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "utils/palloc.h" #include "utils/builtins.h" /* where function declarations go */ -#include "utils/elog.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/oidname.c b/src/backend/utils/adt/oidname.c index c4f42674c5fe627c50894bb220856b97e6ff2f62..d4d1290aa8937593a079a7f222cb140081eb1162 100644 --- a/src/backend/utils/adt/oidname.c +++ b/src/backend/utils/adt/oidname.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.2 1996/11/06 06:49:56 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -18,7 +18,6 @@ #include "postgres.h" #include "utils/oidcompos.h" /* where function declarations go */ #include "utils/builtins.h" /* for pg_atoi() */ -#include "utils/elog.h" #include "utils/palloc.h" OidName diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 670ad48f6ca6ca509f382b316b8c92fbdfa8a217..80da6e0f4319f06f0925cd5e584115fd700b6cc7 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.2 1996/07/09 06:39:19 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.3 1996/11/06 06:49:58 scrappy Exp $ * * Alistair Crooks added the code for the regex caching * agc - cached the regular expressions used - there's a good chance @@ -29,7 +29,6 @@ */ #include <string.h> #include "postgres.h" /* postgres system include file */ -#include "utils/elog.h" /* for logging postgres errors */ #include "utils/palloc.h" #include "utils/builtins.h" /* where the function declarations go */ diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 071573fdccc65a1c262474f822f0004eb38292ea..63010c3cd7cd8cc2a6ea92f31adb56df61b1959b 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.2 1996/11/06 06:49:59 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,10 +15,7 @@ #include "postgres.h" #include "access/heapam.h" #include "access/relscan.h" -#include "access/skey.h" -#include "utils/tqual.h" /* for NowTimeQual */ #include "fmgr.h" -#include "utils/elog.h" #include "utils/palloc.h" #include "catalog/catname.h" diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c index 9ad8d4578206d022d5c80afe7cfba6060afc12fa..fea167340ec87b1fc523fd83dc513dcf547eac2d 100644 --- a/src/backend/utils/adt/sets.c +++ b/src/backend/utils/adt/sets.c @@ -9,15 +9,12 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.2 1996/11/06 06:50:01 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> /* for sprintf() */ #include "postgres.h" -#include "utils/elog.h" -#include "nodes/pg_list.h" /* for LispValue and List */ -#include "access/htup.h" /* for HeapTuple */ #include "access/heapam.h" #include "access/relscan.h" #include "access/xact.h" diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index 6690b74c02383cc66ca7db28fabbd9e0c0d8f897..6fb4e589ad815c465c0f71fc2cbd2c810dce4d26 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.1.1.1 1996/07/09 06:22:05 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.2 1996/11/06 06:50:05 scrappy Exp $ * * NOTES * input routine largely stolen from boxin(). @@ -17,9 +17,6 @@ #include <stdio.h> /* for sprintf() */ #include <string.h> #include "postgres.h" -#include "storage/block.h" -#include "storage/off.h" -#include "storage/itemptr.h" #include "storage/bufpage.h" #include "utils/palloc.h" diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index e687db4d08ffacabfe005f3cc08b0f72782d6986..5c5531882ed07ff03da09b5d08350b0d621244d4 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.4 1996/11/04 04:53:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.5 1996/11/06 06:50:06 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,6 @@ #include <string.h> #include "postgres.h" #include "utils/palloc.h" -#include "utils/elog.h" /* * CHAR() and VARCHAR() types are part of the ANSI SQL standard. CHAR() diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 5695f1c181065d228be2bdf9e8ff5e520cbd5de5..230f987f8c7877eec4afa8b593c1afcc4c7c9e03 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.6 1996/09/23 08:31:01 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.7 1996/11/06 06:50:07 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,6 @@ #include <string.h> #include "postgres.h" -#include "utils/elog.h" #include "utils/palloc.h" #include "utils/builtins.h" /* where function declarations go */ diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile index 39f52138a315479d0b2aed87fc03f85e525e7693..c12c8b765d4b84c78cb768880d224b564b8c97a7 100644 --- a/src/backend/utils/misc/Makefile +++ b/src/backend/utils/misc/Makefile @@ -4,16 +4,14 @@ # Makefile for utils/misc # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.1 1996/11/02 02:06:46 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.2 1996/11/06 06:52:23 scrappy Exp $ # #------------------------------------------------------------------------- SRCDIR = ../../.. include ../../../Makefile.global -INCLUDE_OPT = \ - -I../../port/$(PORTNAME) \ - -I../../include \ +INCLUDE_OPT = -I../../port/$(PORTNAME) \ -I../../../include CFLAGS += $(INCLUDE_OPT)