From 4029fb52c69d7695d6913cc649686898296cd856 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Sun, 3 Nov 1996 23:27:08 +0000 Subject: [PATCH] first pass at cleaning up include files --- src/backend/catalog/Makefile | 3 +-- src/backend/catalog/catalog.c | 11 +++++------ src/backend/catalog/heap.c | 18 +++++------------- src/backend/catalog/index.c | 19 ++++--------------- src/backend/catalog/indexing.c | 12 +++--------- src/backend/catalog/pg_aggregate.c | 7 +++---- src/backend/catalog/pg_operator.c | 9 +++------ src/backend/catalog/pg_proc.c | 15 +++++---------- src/backend/catalog/pg_type.c | 9 +++------ 9 files changed, 32 insertions(+), 71 deletions(-) diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index b596feead1..e7228199cf 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -4,7 +4,7 @@ # Makefile for catalog # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.1 1996/10/27 09:47:07 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.2 1996/11/03 23:26:58 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/catalog/catalog.c b/src/backend/catalog/catalog.c index 36bd935d5d..817227284c 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -7,24 +7,23 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.2 1996/10/18 05:50:04 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.3 1996/11/03 23:27:00 scrappy Exp $ * *------------------------------------------------------------------------- */ #include /* XXX */ + #include "postgres.h" #include "miscadmin.h" /* for DataDir */ -#include "access/htup.h" -#include "storage/buf.h" -#include "utils/elog.h" -#include "utils/palloc.h" #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 "storage/bufmgr.h" #include "access/transam.h" /* diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index a06163ae2f..678b752190 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.2 1996/10/24 07:54:45 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3 1996/11/03 23:27:01 scrappy Exp $ * * INTERFACE ROUTINES * heap_creatr() - Create an uncataloged heap relation @@ -30,44 +30,36 @@ #include "postgres.h" +#include "parser/catalog_utils.h" + #include "access/heapam.h" #include "access/genam.h" -#include "access/htup.h" #include "access/istrat.h" -#include "access/relscan.h" -#include "access/skey.h" -#include "utils/tqual.h" /* for NowTimeQual */ -#include "storage/buf.h" #include "storage/bufmgr.h" -#include "storage/itemptr.h" #include "lib/hasht.h" #include "miscadmin.h" #include "fmgr.h" #include "utils/builtins.h" -#include "utils/elog.h" /* XXX */ #include "utils/mcxt.h" #include "utils/palloc.h" -#include "utils/rel.h" #include "utils/relcache.h" #include "catalog/catname.h" -#include "catalog/pg_class.h" #include "catalog/pg_attribute.h" #include "catalog/pg_index.h" #include "catalog/pg_inherits.h" #include "catalog/pg_ipl.h" -#include "catalog/pg_proc.h" -#include "catalog/pg_type.h" #include "catalog/index.h" #include "catalog/indexing.h" #include "catalog/catalog.h" -#include "parser/catalog_utils.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); diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index b69963addd..51223accc4 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.4 1996/08/27 22:16:32 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.5 1996/11/03 23:27:02 scrappy Exp $ * * * INTERFACE ROUTINES @@ -25,25 +25,18 @@ */ #include "postgres.h" -#include "access/attnum.h" #include "access/genam.h" #include "access/heapam.h" -#include "access/itup.h" -#include "access/relscan.h" -#include "access/skey.h" #include "utils/builtins.h" -#include "utils/tqual.h" -#include "access/tupdesc.h" -#include "access/funcindex.h" #include "access/xact.h" +#include "parser/catalog_utils.h" #include "storage/smgr.h" +#include "storage/lmgr.h" #include "miscadmin.h" #include "utils/mcxt.h" #include "utils/palloc.h" -#include "utils/rel.h" #include "utils/relcache.h" -#include "utils/elog.h" #include "bootstrap/bootstrap.h" @@ -51,15 +44,11 @@ #include "catalog/catalog.h" #include "utils/syscache.h" #include "catalog/pg_attribute.h" -#include "catalog/pg_index.h" -#include "catalog/pg_proc.h" #include "catalog/pg_class.h" -#include "catalog/pg_type.h" #include "catalog/indexing.h" #include "catalog/heap.h" -#include "nodes/execnodes.h" #include "nodes/plannodes.h" #include "catalog/index.h" @@ -70,7 +59,7 @@ #include "optimizer/clauses.h" #include "optimizer/prep.h" -#include "parser/catalog_utils.h" +#include "access/istrat.h" /* * macros used in guessing how many tuples are on a page. diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index 52fb9a68c0..34edd192bc 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -8,36 +8,31 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.2 1996/08/26 06:29:38 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.3 1996/11/03 23:27:04 scrappy Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "utils/builtins.h" -#include "utils/rel.h" -#include "utils/elog.h" #include "utils/oidcompos.h" #include "utils/palloc.h" -#include "access/htup.h" #include "access/heapam.h" #include "access/genam.h" -#include "access/attnum.h" -#include "access/funcindex.h" #include "access/skey.h" -#include "storage/buf.h" #include "storage/bufmgr.h" #include "nodes/execnodes.h" #include "catalog/catalog.h" #include "catalog/catname.h" #include "catalog/pg_index.h" #include "catalog/pg_proc.h" -#include "catalog/pg_type.h" #include "catalog/pg_class.h" #include "catalog/pg_attribute.h" #include "utils/syscache.h" #include "catalog/indexing.h" #include "catalog/index.h" +#include "miscadmin.h" + /* * Names of indices on the following system catalogs: * @@ -141,7 +136,6 @@ CatalogIndexInsert(Relation *idescs, HeapTuple pgIndexTup; TupleDesc heapDescriptor; IndexTupleForm pgIndexP; - IndexTuple newIndxTup; Datum datum; int natts; AttrNumber *attnumP; diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 7fe895e0f0..8579fa1648 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.1.1.1 1996/07/09 06:21:16 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.2 1996/11/03 23:27:05 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -17,10 +17,7 @@ #include "access/heapam.h" #include "access/relscan.h" #include "access/skey.h" -#include "access/htup.h" #include "access/tupdesc.h" -#include "utils/rel.h" -#include "utils/elog.h" #include "utils/palloc.h" #include "utils/builtins.h" #include "fmgr.h" @@ -32,6 +29,8 @@ #include "catalog/pg_type.h" #include "catalog/pg_aggregate.h" +#include "miscadmin.h" + /* ---------------- * AggregateCreate * diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 5e24120212..4fadf3fd7f 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.2 1996/10/07 03:27:48 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.3 1996/11/03 23:27:06 scrappy Exp $ * * NOTES * these routines moved here from commands/define.c and somewhat cleaned up. @@ -18,22 +18,19 @@ #include "postgres.h" #include "access/heapam.h" -#include "access/relscan.h" #include "access/skey.h" #include "access/htup.h" -#include "utils/rel.h" -#include "utils/elog.h" #include "utils/palloc.h" #include "parser/catalog_utils.h" #include "catalog/catname.h" -#include "utils/syscache.h" #include "catalog/pg_operator.h" -#include "catalog/pg_proc.h" #include "storage/bufmgr.h" #include "fmgr.h" +#include "miscadmin.h" + static Oid OperatorGetWithOpenRelation(Relation pg_operator_desc, const char *operatorName, Oid leftObjectId, diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index d8273efcce..ddf12be6c0 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.1.1.1 1996/07/09 06:21:17 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.2 1996/11/03 23:27:07 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -17,27 +17,22 @@ #include "access/heapam.h" #include "access/relscan.h" #include "access/skey.h" -#include "utils/rel.h" #include "fmgr.h" -#include "utils/elog.h" #include "utils/builtins.h" #include "utils/sets.h" -#include "nodes/pg_list.h" - #include "catalog/catname.h" -#include "utils/syscache.h" -#include "catalog/pg_proc.h" #include "catalog/indexing.h" -#include "tcop/dest.h" #include "parser/parse_query.h" #include "tcop/tcopprot.h" -#include "catalog/pg_type.h" #include "parser/catalog_utils.h" -#include "utils/lsyscache.h" #include "optimizer/internal.h" #include "optimizer/planner.h" +#include "utils/lsyscache.h" + +#include "miscadmin.h" + /* ---------------------------------------------------------------- * ProcedureDefine * ---------------------------------------------------------------- diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index fe9baa05a4..c7e7ea8e5b 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.1.1.1 1996/07/09 06:21:18 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.2 1996/11/03 23:27:08 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -19,19 +19,16 @@ #include "access/skey.h" #include "access/tupdesc.h" #include "utils/builtins.h" -#include "utils/rel.h" #include "utils/palloc.h" #include "fmgr.h" -#include "utils/elog.h" #include "parser/catalog_utils.h" #include "catalog/catname.h" -#include "utils/syscache.h" -#include "catalog/pg_proc.h" -#include "catalog/pg_type.h" #include "catalog/indexing.h" #include "storage/lmgr.h" +#include "miscadmin.h" + /* ---------------------------------------------------------------- * TypeGetWithOpenRelation *