diff options
Diffstat (limited to 'src/include')
59 files changed, 303 insertions, 230 deletions
diff --git a/src/include/access/rtscan.h b/src/include/access/rtscan.h index edcd56f75c1..f3b450023a3 100644 --- a/src/include/access/rtscan.h +++ b/src/include/access/rtscan.h @@ -6,11 +6,16 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rtscan.h,v 1.3 1997/09/08 02:34:24 momjian Exp $ + * $Id: rtscan.h,v 1.4 1997/11/26 01:12:06 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RTSCAN_H +#define RTSCAN_H + +#include <utils/rel.h> +#include <storage/block.h> +#include <storage/off.h> void rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum); diff --git a/src/include/access/rtstrat.h b/src/include/access/rtstrat.h index 2036ffd6ecd..72d4ceb8253 100644 --- a/src/include/access/rtstrat.h +++ b/src/include/access/rtstrat.h @@ -6,11 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rtstrat.h,v 1.4 1997/09/08 21:50:59 momjian Exp $ + * $Id: rtstrat.h,v 1.5 1997/11/26 01:12:08 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RTSTRAT_H +#define RTSTRAT_H + +#include <utils/rel.h> +#include <access/attnum.h> extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum, diff --git a/src/include/commands/creatinh.h b/src/include/commands/creatinh.h index 5ba47f8a03a..21208ad958d 100644 --- a/src/include/commands/creatinh.h +++ b/src/include/commands/creatinh.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: creatinh.h,v 1.5 1997/11/21 18:12:16 momjian Exp $ + * $Id: creatinh.h,v 1.6 1997/11/26 01:12:12 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef CREATINH_H #define CREATINH_H +#include "nodes/parsenodes.h" + extern void DefineRelation(CreateStmt *stmt); extern void RemoveRelation(char *name); diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index b2880868cd2..6b808582a0e 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -5,13 +5,16 @@ * * Copyright (c) 1994-5, Regents of the University of California * - * $Id: explain.h,v 1.5 1997/09/08 21:51:38 momjian Exp $ + * $Id: explain.h,v 1.6 1997/11/26 01:12:16 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef EXPLAIN_H #define EXPLAIN_H +#include "tcop/dest.h" +#include "nodes/parsenodes.h" + extern void ExplainQuery(Query *query, bool verbose, CommandDest dest); #endif /* EXPLAIN_H */ diff --git a/src/include/commands/recipe.h b/src/include/commands/recipe.h index 246cf4eaca8..c90d663295e 100644 --- a/src/include/commands/recipe.h +++ b/src/include/commands/recipe.h @@ -5,13 +5,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: recipe.h,v 1.4 1997/09/08 21:51:42 momjian Exp $ + * $Id: recipe.h,v 1.5 1997/11/26 01:12:24 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef RECIPE_H #define RECIPE_H +#include "nodes/parsenodes.h" + extern void beginRecipe(RecipeStmt *stmt); #endif /* RECIPE_H */ diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 92dbd14a8e0..2ffa42639b4 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -9,6 +9,8 @@ #ifndef SEQUENCE_H #define SEQUENCE_H +#include "nodes/parsenodes.h" + /* * Columns of a sequnece relation */ diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 6ba0394fdf7..28ae082d687 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -11,6 +11,7 @@ #include "access/tupdesc.h" #include "access/htup.h" +#include "nodes/parsenodes.h" #include "utils/rel.h" typedef uint32 TriggerEvent; diff --git a/src/include/commands/view.h b/src/include/commands/view.h index 2fc1bb3b8d3..da1276d9a73 100644 --- a/src/include/commands/view.h +++ b/src/include/commands/view.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: view.h,v 1.4 1997/09/08 21:51:47 momjian Exp $ + * $Id: view.h,v 1.5 1997/11/26 01:12:33 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef VIEW_H #define VIEW_H +#include "nodes/parsenodes.h" + extern char *MakeRetrieveViewRuleName(char *view_name); extern void DefineView(char *view_name, Query *view_parse); extern void RemoveView(char *view_name); diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h index 8dc8236e22e..3ecb90810b0 100644 --- a/src/include/executor/execFlatten.h +++ b/src/include/executor/execFlatten.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: execFlatten.h,v 1.5 1997/09/08 21:51:49 momjian Exp $ + * $Id: execFlatten.h,v 1.6 1997/11/26 01:12:36 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef EXECFLATTEN_H #define EXECFLATTEN_H +#include "nodes/relation.h" +#include "nodes/execnodes.h" +#include "nodes/parsenodes.h" + extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsNull, bool *iterIsDone); extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, bool *isNullVect, bool *fj_isDone); diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index a1bed2a7385..c6ca0829711 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -6,13 +6,18 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: functions.h,v 1.4 1997/09/08 21:51:59 momjian Exp $ + * $Id: functions.h,v 1.5 1997/11/26 01:12:38 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef FUNCTIONS_H #define FUNCTIONS_H +#include "access/tupdesc.h" +#include "nodes/parsenodes.h" +#include "nodes/primnodes.h" +#include "utils/syscache.h" + extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist, HeapTuple tup, bool *isnullP); diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h index c752c6ce176..69f791b9c9a 100644 --- a/src/include/executor/nodeAgg.h +++ b/src/include/executor/nodeAgg.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeAgg.h,v 1.5 1997/09/08 21:52:01 momjian Exp $ + * $Id: nodeAgg.h,v 1.6 1997/11/26 01:12:40 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEAGG_H #define NODEAGG_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecAgg(Agg *node); extern bool ExecInitAgg(Agg *node, EState *estate, Plan *parent); extern int ExecCountSlotsAgg(Agg *node); diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h index c0aa2d1c753..335cf4a33a8 100644 --- a/src/include/executor/nodeAppend.h +++ b/src/include/executor/nodeAppend.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeAppend.h,v 1.6 1997/09/08 21:52:02 momjian Exp $ + * $Id: nodeAppend.h,v 1.7 1997/11/26 01:12:44 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEAPPEND_H #define NODEAPPEND_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern bool ExecInitAppend(Append *node, EState *estate, Plan *parent); extern int ExecCountSlotsAppend(Append *node); extern TupleTableSlot *ExecProcAppend(Append *node); diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h index 294f59103b2..97ded95c947 100644 --- a/src/include/executor/nodeGroup.h +++ b/src/include/executor/nodeGroup.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeGroup.h,v 1.4 1997/09/08 21:52:02 momjian Exp $ + * $Id: nodeGroup.h,v 1.5 1997/11/26 01:12:46 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEGROUP_H #define NODEGROUP_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecGroup(Group *node); extern bool ExecInitGroup(Group *node, EState *estate, Plan *parent); extern int ExecCountSlotsGroup(Group *node); diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h index 96ed987718a..3a34a70973d 100644 --- a/src/include/executor/nodeHashjoin.h +++ b/src/include/executor/nodeHashjoin.h @@ -6,21 +6,21 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeHashjoin.h,v 1.5 1997/09/08 21:52:05 momjian Exp $ + * $Id: nodeHashjoin.h,v 1.6 1997/11/26 01:12:50 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEHASHJOIN_H #define NODEHASHJOIN_H -extern TupleTableSlot *ExecHashJoin(HashJoin *node); +#include "nodes/plannodes.h" +#include "nodes/execnodes.h" +#include "utils/syscache.h" +extern TupleTableSlot *ExecHashJoin(HashJoin *node); extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent); - extern int ExecCountSlotsHashJoin(HashJoin *node); - extern void ExecEndHashJoin(HashJoin *node); - extern char * ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer, File file, char *position); diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h index 5b149d8aed8..1e13cc9666b 100644 --- a/src/include/executor/nodeIndexscan.h +++ b/src/include/executor/nodeIndexscan.h @@ -6,29 +6,25 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeIndexscan.h,v 1.5 1997/09/08 21:52:06 momjian Exp $ + * $Id: nodeIndexscan.h,v 1.6 1997/11/26 01:12:52 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEINDEXSCAN_H #define NODEINDEXSCAN_H -extern TupleTableSlot *ExecIndexScan(IndexScan *node); +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" +extern TupleTableSlot *ExecIndexScan(IndexScan *node); extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent); - extern void ExecEndIndexScan(IndexScan *node); - extern void ExecIndexMarkPos(IndexScan *node); - extern void ExecIndexRestrPos(IndexScan *node); - extern void ExecUpdateIndexScanKeys(IndexScan *node, ExprContext *econtext); - extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent); - extern int ExecCountSlotsIndexScan(IndexScan *node); - extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent); #endif /* NODEINDEXSCAN_H */ diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h index 98daa35f319..de010d3ab21 100644 --- a/src/include/executor/nodeMaterial.h +++ b/src/include/executor/nodeMaterial.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeMaterial.h,v 1.4 1997/09/08 21:52:07 momjian Exp $ + * $Id: nodeMaterial.h,v 1.5 1997/11/26 01:12:53 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEMATERIAL_H #define NODEMATERIAL_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecMaterial(Material *node); extern bool ExecInitMaterial(Material *node, EState *estate, Plan *parent); extern int ExecCountSlotsMaterial(Material *node); diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h index 96a74e0fc9d..1f8e774c1c5 100644 --- a/src/include/executor/nodeMergejoin.h +++ b/src/include/executor/nodeMergejoin.h @@ -6,19 +6,20 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeMergejoin.h,v 1.6 1997/09/08 21:52:09 momjian Exp $ + * $Id: nodeMergejoin.h,v 1.7 1997/11/26 01:12:55 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEMERGEJOIN_H #define NODEMERGEJOIN_H -extern TupleTableSlot *ExecMergeJoin(MergeJoin *node); +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" +extern TupleTableSlot *ExecMergeJoin(MergeJoin *node); extern bool ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent); - extern int ExecCountSlotsMergeJoin(MergeJoin *node); - extern void ExecEndMergeJoin(MergeJoin *node); #endif /* NODEMERGEJOIN_H; */ diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h index 2c4fa13fe1b..ec08d3a9ed8 100644 --- a/src/include/executor/nodeNestloop.h +++ b/src/include/executor/nodeNestloop.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeNestloop.h,v 1.4 1997/09/08 21:52:10 momjian Exp $ + * $Id: nodeNestloop.h,v 1.5 1997/11/26 01:12:57 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODENESTLOOP_H #define NODENESTLOOP_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecNestLoop(NestLoop *node, Plan *parent); extern bool ExecInitNestLoop(NestLoop *node, EState *estate, Plan *parent); extern int ExecCountSlotsNestLoop(NestLoop *node); diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h index c66e069f468..e3ebe2241e6 100644 --- a/src/include/executor/nodeResult.h +++ b/src/include/executor/nodeResult.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeResult.h,v 1.4 1997/09/08 21:52:11 momjian Exp $ + * $Id: nodeResult.h,v 1.5 1997/11/26 01:12:58 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODERESULT_H #define NODERESULT_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecResult(Result *node); extern bool ExecInitResult(Result *node, EState *estate, Plan *parent); extern int ExecCountSlotsResult(Result *node); diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h index d6afe03ac93..2c980d8eaad 100644 --- a/src/include/executor/nodeSeqscan.h +++ b/src/include/executor/nodeSeqscan.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeSeqscan.h,v 1.5 1997/09/08 21:52:12 momjian Exp $ + * $Id: nodeSeqscan.h,v 1.6 1997/11/26 01:13:00 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODESEQSCAN_H #define NODESEQSCAN_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecSeqScan(SeqScan *node); extern bool ExecInitSeqScan(SeqScan *node, EState *estate, Plan *parent); extern int ExecCountSlotsSeqScan(SeqScan *node); diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h index 69b4dbe9a86..a69b15c6751 100644 --- a/src/include/executor/nodeSort.h +++ b/src/include/executor/nodeSort.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeSort.h,v 1.4 1997/09/08 21:52:12 momjian Exp $ + * $Id: nodeSort.h,v 1.5 1997/11/26 01:13:04 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODESORT_H #define NODESORT_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecSort(Sort *node); extern bool ExecInitSort(Sort *node, EState *estate, Plan *parent); extern int ExecCountSlotsSort(Sort *node); diff --git a/src/include/executor/nodeTee.h b/src/include/executor/nodeTee.h index c4a603aa3a9..d58b0b1cf6d 100644 --- a/src/include/executor/nodeTee.h +++ b/src/include/executor/nodeTee.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeTee.h,v 1.4 1997/09/08 21:52:13 momjian Exp $ + * $Id: nodeTee.h,v 1.5 1997/11/26 01:13:06 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -13,6 +13,10 @@ #ifndef NODETEE_H #define NODETEE_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecTee(Tee *node, Plan *parent); extern bool ExecInitTee(Tee *node, EState *estate, Plan *parent); extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent); diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h index 61ab85828cf..65b210c1d27 100644 --- a/src/include/executor/nodeUnique.h +++ b/src/include/executor/nodeUnique.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nodeUnique.h,v 1.4 1997/09/08 21:52:14 momjian Exp $ + * $Id: nodeUnique.h,v 1.5 1997/11/26 01:13:06 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef NODEUNIQUE_H #define NODEUNIQUE_H +#include "executor/tuptable.h" +#include "nodes/execnodes.h" +#include "nodes/plannodes.h" + extern TupleTableSlot *ExecUnique(Unique *node); extern bool ExecInitUnique(Unique *node, EState *estate, Plan *parent); extern int ExecCountSlotsUnique(Unique *node); diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h index 72007ec9132..f2b24e18ed3 100644 --- a/src/include/nodes/readfuncs.h +++ b/src/include/nodes/readfuncs.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: readfuncs.h,v 1.4 1997/09/08 02:37:28 momjian Exp $ + * $Id: readfuncs.h,v 1.5 1997/11/26 01:13:09 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef READFUNCS_H #define READFUNCS_H +#include "nodes/nodes.h" + /* * prototypes for functions in read.c (the lisp token parser) */ diff --git a/src/include/optimizer/clauseinfo.h b/src/include/optimizer/clauseinfo.h index 6d1b0b8fbff..a56359df715 100644 --- a/src/include/optimizer/clauseinfo.h +++ b/src/include/optimizer/clauseinfo.h @@ -6,13 +6,16 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: clauseinfo.h,v 1.4 1997/09/08 21:53:03 momjian Exp $ + * $Id: clauseinfo.h,v 1.5 1997/11/26 01:13:12 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef CLAUSEINFO_H #define CLAUSEINFO_H +#include "nodes/pg_list.h" +#include "nodes/relation.h" + extern bool valid_or_clause(CInfo *clauseinfo); extern List *get_actual_clauses(List *clauseinfo_list); extern void diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 8402e7a2651..cdb02534fc2 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -6,13 +6,18 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: cost.h,v 1.5 1997/09/08 21:53:09 momjian Exp $ + * $Id: cost.h,v 1.6 1997/11/26 01:13:16 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef COST_H #define COST_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" +#include "nodes/pg_list.h" +#include "nodes/relation.h" + /* * prototypes for costsize.c-- * routines to compute costs and sizes diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h index ef81545f2bf..a653b4d6325 100644 --- a/src/include/optimizer/geqo.h +++ b/src/include/optimizer/geqo.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo.h,v 1.6 1997/09/08 21:53:10 momjian Exp $ + * $Id: geqo.h,v 1.7 1997/11/26 01:13:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,10 @@ #ifndef GEQO_H #define GEQO_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" +#include "nodes/relation.h" +#include "optimizer/geqo_gene.h" /* GEQO debug flag */ /* diff --git a/src/include/optimizer/geqo_copy.h b/src/include/optimizer/geqo_copy.h index 27c9eaad47b..26730d0bc8b 100644 --- a/src/include/optimizer/geqo_copy.h +++ b/src/include/optimizer/geqo_copy.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_copy.h,v 1.4 1997/09/08 21:53:10 momjian Exp $ + * $Id: geqo_copy.h,v 1.5 1997/11/26 01:13:25 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #ifndef GEQO_COPY_H #define GEQO_COPY_H +#include "optimizer/geqo_gene.h" extern void geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length); diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h index ade40fa7405..d1f99cced85 100644 --- a/src/include/optimizer/geqo_gene.h +++ b/src/include/optimizer/geqo_gene.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_gene.h,v 1.4 1997/09/08 21:53:11 momjian Exp $ + * $Id: geqo_gene.h,v 1.5 1997/11/26 01:13:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,11 +22,13 @@ #ifndef GEQO_GENE_H #define GEQO_GENE_H +#include "nodes/nodes.h" +#include "nodes/relation.h" +#include "optimizer/geqo_gene.h" /* we presume that int instead of Relid is o.k. for Gene; so don't change it! */ -typedef -int Gene; +typedef int Gene; typedef struct Chromosome { diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h index 64b8ddf432f..2a7a801305b 100644 --- a/src/include/optimizer/geqo_misc.h +++ b/src/include/optimizer/geqo_misc.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_misc.h,v 1.4 1997/09/08 21:53:13 momjian Exp $ + * $Id: geqo_misc.h,v 1.5 1997/11/26 01:13:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,6 +23,10 @@ #include <stdio.h> +#include "nodes/parsenodes.h" +#include "optimizer/geqo_gene.h" +#include "optimizer/geqo_recombination.h" + extern void print_pool(FILE *fp, Pool *pool, int start, int stop); extern void print_gen(FILE *fp, Pool *pool, int generation); extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene); diff --git a/src/include/optimizer/geqo_mutation.h b/src/include/optimizer/geqo_mutation.h index 2a18c8cdfdc..94549a31649 100644 --- a/src/include/optimizer/geqo_mutation.h +++ b/src/include/optimizer/geqo_mutation.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_mutation.h,v 1.4 1997/09/08 21:53:13 momjian Exp $ + * $Id: geqo_mutation.h,v 1.5 1997/11/26 01:13:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #ifndef GEQO_MUTATION_H #define GEQO_MUTATION_H +#include "optimizer/geqo_gene.h" extern void geqo_mutation(Gene *tour, int num_gene); diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h index 3fe9c71bd24..ebc8a3914b0 100644 --- a/src/include/optimizer/geqo_pool.h +++ b/src/include/optimizer/geqo_pool.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_pool.h,v 1.4 1997/09/08 21:53:15 momjian Exp $ + * $Id: geqo_pool.h,v 1.5 1997/11/26 01:13:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,7 @@ #ifndef GEQO_POOL_H #define GEQO_POOL_H +#include "optimizer/geqo_gene.h" extern Pool *alloc_pool(int pool_size, int string_length); extern void free_pool(Pool *pool); diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h index eea3c58a9f8..615316f1978 100644 --- a/src/include/optimizer/geqo_recombination.h +++ b/src/include/optimizer/geqo_recombination.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_recombination.h,v 1.4 1997/09/08 21:53:16 momjian Exp $ + * $Id: geqo_recombination.h,v 1.5 1997/11/26 01:13:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,6 +23,7 @@ #ifndef GEQO_RECOMBINATION_H #define GEQO_RECOMBINATION_H +#include "optimizer/geqo_gene.h" extern void init_tour(Gene *tour, int num_gene); diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h index ea7b26492f8..6a8e0cccffa 100644 --- a/src/include/optimizer/geqo_selection.h +++ b/src/include/optimizer/geqo_selection.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_selection.h,v 1.4 1997/09/08 21:53:17 momjian Exp $ + * $Id: geqo_selection.h,v 1.5 1997/11/26 01:13:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,6 +22,7 @@ #ifndef GEQO_SELECTION_H #define GEQO_SELECTION_H +#include "optimizer/geqo_gene.h" extern void geqo_selection(Chromosome *momma, Chromosome *daddy, Pool *pool, double bias); diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h index b6c43fba8d1..9fdbe231234 100644 --- a/src/include/optimizer/joininfo.h +++ b/src/include/optimizer/joininfo.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: joininfo.h,v 1.4 1997/09/08 21:53:18 momjian Exp $ + * $Id: joininfo.h,v 1.5 1997/11/26 01:13:39 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef JOININFO_H #define JOININFO_H +#include "nodes/nodes.h" +#include "nodes/relation.h" +#include "nodes/primnodes.h" + extern JInfo *joininfo_member(List *join_relids, List *joininfo_list); extern JInfo *find_joininfo_node(Rel *this_rel, List *join_relids); extern Var *other_join_clause_var(Var *var, Expr *clause); diff --git a/src/include/optimizer/keys.h b/src/include/optimizer/keys.h index 85af02e873a..ea02f5f1307 100644 --- a/src/include/optimizer/keys.h +++ b/src/include/optimizer/keys.h @@ -6,13 +6,16 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: keys.h,v 1.5 1997/09/08 21:53:18 momjian Exp $ + * $Id: keys.h,v 1.6 1997/11/26 01:13:41 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef KEYS_H #define KEYS_H +#include "nodes/nodes.h" +#include "nodes/relation.h" + extern bool match_indexkey_operand(int indexkey, Var *operand, Rel *rel); extern Var *extract_subkey(JoinKey *jk, int which_subkey); extern bool samekeys(List *keys1, List *keys2); diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index ae6848abb57..70225748218 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pathnode.h,v 1.4 1997/09/08 21:53:23 momjian Exp $ + * $Id: pathnode.h,v 1.5 1997/11/26 01:13:46 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PATHNODE_H #define PATHNODE_H +#include "nodes/nodes.h" +#include "nodes/relation.h" +#include "nodes/parsenodes.h" + /* * prototypes for pathnode.c */ diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 61a9cea940f..b7a56ef6536 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -7,13 +7,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: paths.h,v 1.4 1997/09/08 21:53:25 momjian Exp $ + * $Id: paths.h,v 1.5 1997/11/26 01:13:47 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PATHS_H #define PATHS_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" +#include "nodes/relation.h" + /* * allpaths.h */ diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h index 8f2abff9326..6b297b6c1a5 100644 --- a/src/include/optimizer/planmain.h +++ b/src/include/optimizer/planmain.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: planmain.h,v 1.5 1997/09/08 21:53:28 momjian Exp $ + * $Id: planmain.h,v 1.6 1997/11/26 01:13:48 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef PLANMAIN_H #define PLANMAIN_H +#include "nodes/nodes.h" +#include "nodes/plannodes.h" +#include "nodes/parsenodes.h" +#include "nodes/relation.h" /* * prototypes for plan/planmain.c diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index 59bd8738d08..86b3023aa01 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: planner.h,v 1.6 1997/11/25 22:06:37 momjian Exp $ + * $Id: planner.h,v 1.7 1997/11/26 01:13:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,9 @@ /* */ -#include <parser/parse_node.h> +#include "nodes/parsenodes.h" +#include "nodes/plannodes.h" +#include "parser/parse_node.h" extern Plan *planner(Query *parse); extern void pg_checkretval(Oid rettype, QueryTreeList *querytree_list); diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h index 318ab74f98f..280e4a47c06 100644 --- a/src/include/optimizer/tlist.h +++ b/src/include/optimizer/tlist.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tlist.h,v 1.5 1997/09/08 21:53:31 momjian Exp $ + * $Id: tlist.h,v 1.6 1997/11/26 01:13:51 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef TLIST_H #define TLIST_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" +#include "nodes/relation.h" + extern int exec_tlist_length(List *targelist); extern TargetEntry *tlistentry_member(Var *var, List *targetlist); extern Expr *matching_tlvar(Var *var, List *targetlist); diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index ad0dfad36b7..2437b6de1af 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -6,13 +6,16 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: var.h,v 1.4 1997/09/08 21:53:31 momjian Exp $ + * $Id: var.h,v 1.5 1997/11/26 01:13:52 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef VAR_H #define VAR_H +#include "nodes/nodes.h" +#include "nodes/primnodes.h" + extern List *pull_varnos(Node *me); extern bool contain_var_clause(Node *clause); extern List *pull_var_clause(Node *clause); diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h index a85e2074bbe..b88d80f346f 100644 --- a/src/include/parser/analyze.h +++ b/src/include/parser/analyze.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: analyze.h,v 1.1 1997/11/25 22:06:47 momjian Exp $ + * $Id: analyze.h,v 1.2 1997/11/26 01:13:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,6 +14,6 @@ #include <parser/parse_node.h> -QueryTreeList *parse_analyze(List *pl); +extern QueryTreeList *parse_analyze(List *pl); #endif /* ANALYZE_H */ diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h index 21ef36248fd..fca928c9eea 100644 --- a/src/include/parser/parse_agg.h +++ b/src/include/parser/parse_agg.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_agg.h,v 1.1 1997/11/25 22:06:53 momjian Exp $ + * $Id: parse_agg.h,v 1.2 1997/11/26 01:13:58 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,21 +18,14 @@ #include <nodes/primnodes.h> #include <parser/parse_node.h> -void AddAggToParseState(ParseState *pstate, Aggreg *aggreg); - -void finalizeAggregates(ParseState *pstate, Query *qry); - -bool contain_agg_clause(Node *clause); - -bool exprIsAggOrGroupCol(Node *expr, List *groupClause); - -bool tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause); - -void parseCheckAggregates(ParseState *pstate, Query *qry); - -Aggreg *ParseAgg(char *aggname, Oid basetype, Node *target); - -void agg_error(char *caller, char *aggname, Oid basetypeID); +extern void AddAggToParseState(ParseState *pstate, Aggreg *aggreg); +extern void finalizeAggregates(ParseState *pstate, Query *qry); +extern bool contain_agg_clause(Node *clause); +extern bool exprIsAggOrGroupCol(Node *expr, List *groupClause); +extern bool tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause); +extern void parseCheckAggregates(ParseState *pstate, Query *qry); +extern Aggreg *ParseAgg(char *aggname, Oid basetype, Node *target); +extern void agg_error(char *caller, char *aggname, Oid basetypeID); #endif /* PARSE_AGG_H */ diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h index 2c0a5278f60..9c5fed19dd5 100644 --- a/src/include/parser/parse_clause.h +++ b/src/include/parser/parse_clause.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_clause.h,v 1.1 1997/11/25 22:06:54 momjian Exp $ + * $Id: parse_clause.h,v 1.2 1997/11/26 01:14:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,19 +19,14 @@ #include <nodes/primnodes.h> #include <parser/parse_node.h> -void parseFromClause(ParseState *pstate, List *frmList); - -void makeRangeTable(ParseState *pstate, char *relname, List *frmList); - -Node *transformWhereClause(ParseState *pstate, Node *a_expr); - -TargetEntry *find_targetlist_entry(ParseState *pstate, +extern void parseFromClause(ParseState *pstate, List *frmList); +extern void makeRangeTable(ParseState *pstate, char *relname, List *frmList); +extern Node *transformWhereClause(ParseState *pstate, Node *a_expr); +extern TargetEntry *find_targetlist_entry(ParseState *pstate, SortGroupBy *sortgroupby, List *tlist); - -List *transformGroupClause(ParseState *pstate, List *grouplist, +extern List *transformGroupClause(ParseState *pstate, List *grouplist, List *targetlist); - -List *transformSortClause(ParseState *pstate, +extern List *transformSortClause(ParseState *pstate, List *orderlist, List *targetlist, char *uniqueFlag); diff --git a/src/include/parser/parse_expr.h b/src/include/parser/parse_expr.h index e7c4a04b011..4bc1d77b3f6 100644 --- a/src/include/parser/parse_expr.h +++ b/src/include/parser/parse_expr.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_expr.h,v 1.1 1997/11/25 22:06:55 momjian Exp $ + * $Id: parse_expr.h,v 1.2 1997/11/26 01:14:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,17 +18,12 @@ #include <nodes/primnodes.h> #include <parser/parse_node.h> -Node *transformExpr(ParseState *pstate, Node *expr, int precedence); - -Node *transformIdent(ParseState *pstate, Node *expr, int precedence); - -Oid exprType(Node *expr); - -Node *handleNestedDots(ParseState *pstate, Attr *attr, int *curr_resno); - -Node *parser_typecast(Value *expr, TypeName *typename, int typlen); - -Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen); +extern Node *transformExpr(ParseState *pstate, Node *expr, int precedence); +extern Node *transformIdent(ParseState *pstate, Node *expr, int precedence); +extern Oid exprType(Node *expr); +extern Node *handleNestedDots(ParseState *pstate, Attr *attr, int *curr_resno); +extern Node *parser_typecast(Value *expr, TypeName *typename, int typlen); +extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen); #endif /* PARSE_EXPR_H */ diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index de8fc66d848..dbda5651a36 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_func.h,v 1.1 1997/11/25 22:06:56 momjian Exp $ + * $Id: parse_func.h,v 1.2 1997/11/26 01:14:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -42,56 +42,40 @@ typedef struct _CandidateList struct _CandidateList *next; } *CandidateList; -Node *ParseFunc(ParseState *pstate, char *funcname, List *fargs, +extern Node *ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno); - -Oid funcid_get_rettype(Oid funcid); - -CandidateList func_get_candidates(char *funcname, int nargs); - -bool can_coerce(int nargs, Oid *input_typeids, Oid *func_typeids); - -int match_argtypes(int nargs, +extern Oid funcid_get_rettype(Oid funcid); +extern CandidateList func_get_candidates(char *funcname, int nargs); +extern bool can_coerce(int nargs, Oid *input_typeids, Oid *func_typeids); +extern int match_argtypes(int nargs, Oid *input_typeids, CandidateList function_typeids, CandidateList *candidates); - -Oid * func_select_candidate(int nargs, +extern Oid * func_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates); - -bool func_get_detail(char *funcname, +extern bool func_get_detail(char *funcname, int nargs, Oid *oid_array, Oid *funcid, /* return value */ Oid *rettype, /* return value */ bool *retset, /* return value */ Oid **true_typeids); - -Oid ** argtype_inherit(int nargs, Oid *oid_array); - -int findsupers(Oid relid, Oid **supervec); - -Oid **genxprod(InhPaths *arginh, int nargs); - -void make_arguments(int nargs, +extern Oid ** argtype_inherit(int nargs, Oid *oid_array); +extern int findsupers(Oid relid, Oid **supervec); +extern Oid **genxprod(InhPaths *arginh, int nargs); +extern void make_arguments(int nargs, List *fargs, Oid *input_typeids, Oid *function_typeids); -List *setup_tlist(char *attname, Oid relid); - -List *setup_base_tlist(Oid typeid); - -Node *ParseComplexProjection(ParseState *pstate, +extern List *setup_tlist(char *attname, Oid relid); +extern List *setup_base_tlist(Oid typeid); +extern Node *ParseComplexProjection(ParseState *pstate, char *funcname, Node *first_arg, bool *attisset); - -void func_error(char *caller, char *funcname, int nargs, Oid *argtypes); - - - +extern void func_error(char *caller, char *funcname, int nargs, Oid *argtypes); #endif /* PARSE_FUNC_H */ diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index bac05cb1506..1eb063b8ee8 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_node.h,v 1.1 1997/11/25 22:06:57 momjian Exp $ + * $Id: parse_node.h,v 1.2 1997/11/26 01:14:05 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -41,27 +41,20 @@ typedef struct ParseState RangeTblEntry *p_target_rangetblentry; } ParseState; -ParseState *make_parsestate(void); - -Node *make_operand(char *opname, +extern ParseState *make_parsestate(void); +extern Node *make_operand(char *opname, Node *tree, Oid orig_typeId, Oid true_typeId); - -void disallow_setop(char *op, Type optype, Node *operand); - -Expr *make_op(char *opname, Node *ltree, Node *rtree); - -Var *make_var(ParseState *pstate, char *refname, char *attrname, Oid *type_id); - -ArrayRef *make_array_ref(Node *expr, +extern void disallow_setop(char *op, Type optype, Node *operand); +extern Expr *make_op(char *opname, Node *ltree, Node *rtree); +extern Var *make_var(ParseState *pstate, char *refname, char *attrname, Oid *type_id); +extern ArrayRef *make_array_ref(Node *expr, List *indirection); - -ArrayRef *make_array_set(Expr *target_expr, +extern ArrayRef *make_array_set(Expr *target_expr, List *upperIndexpr, List *lowerIndexpr, Expr *expr); - -Const *make_const(Value *value); +extern Const *make_const(Value *value); #endif /* PARSE_NODE_H */ diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index c013af628c3..dd32290ddeb 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_oper.h,v 1.1 1997/11/25 22:06:59 momjian Exp $ + * $Id: parse_oper.h,v 1.2 1997/11/26 01:14:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,33 +18,23 @@ typedef HeapTuple Operator; -Oid any_ordering_op(int restype); - -Oid oprid(Operator op); - -int binary_oper_get_candidates(char *opname, +extern Oid any_ordering_op(int restype); +extern Oid oprid(Operator op); +extern int binary_oper_get_candidates(char *opname, Oid leftTypeId, Oid rightTypeId, CandidateList *candidates); - -bool equivalentOpersAfterPromotion(CandidateList candidates); - -CandidateList binary_oper_select_candidate(Oid arg1, +extern bool equivalentOpersAfterPromotion(CandidateList candidates); +extern CandidateList binary_oper_select_candidate(Oid arg1, Oid arg2, CandidateList candidates); - -Operator oper(char *op, Oid arg1, Oid arg2, bool noWarnings); - -int -unary_oper_get_candidates(char *op, +extern Operator oper(char *op, Oid arg1, Oid arg2, bool noWarnings); +extern int unary_oper_get_candidates(char *op, Oid typeId, CandidateList *candidates, char rightleft); - -Operator right_oper(char *op, Oid arg); - -Operator left_oper(char *op, Oid arg); - -void op_error(char *op, Oid arg1, Oid arg2); +extern Operator right_oper(char *op, Oid arg); +extern Operator left_oper(char *op, Oid arg); +extern void op_error(char *op, Oid arg1, Oid arg2); #endif /* PARSE_OPER_H */ diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index ed470822ff5..4dc909e594e 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_relation.h,v 1.1 1997/11/25 22:07:02 momjian Exp $ + * $Id: parse_relation.h,v 1.2 1997/11/26 01:14:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -20,37 +20,25 @@ #include <parser/parse_node.h> #include <utils/rel.h> -RangeTblEntry *refnameRangeTableEntry(List *rtable, char *refname); - -int refnameRangeTablePosn(List *rtable, char *refname); - -RangeTblEntry *colnameRangeTableEntry(ParseState *pstate, char *colname); - -RangeTblEntry *addRangeTableEntry(ParseState *pstate, +extern RangeTblEntry *refnameRangeTableEntry(List *rtable, char *refname); +extern int refnameRangeTablePosn(List *rtable, char *refname); +extern RangeTblEntry *colnameRangeTableEntry(ParseState *pstate, char *colname); +extern RangeTblEntry *addRangeTableEntry(ParseState *pstate, char *relname, char *refname, bool inh, bool inFromCl); - -List *expandAll(ParseState *pstate, char *relname, char *refname, +extern List *expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno); - -int attnameAttNum(Relation rd, char *a); - -bool attnameIsSet(Relation rd, char *name); - -char *attnumAttName(Relation rd, int attrno); - -int attnumAttNelems(Relation rd, int attid); - -Oid attnameTypeId(Oid relid, char *attrname); - -Oid attnumTypeId(Relation rd, int attid); - -void handleTargetColname(ParseState *pstate, char **resname, +extern int attnameAttNum(Relation rd, char *a); +extern bool attnameIsSet(Relation rd, char *name); +extern char *attnumAttName(Relation rd, int attrno); +extern int attnumAttNelems(Relation rd, int attid); +extern Oid attnameTypeId(Oid relid, char *attrname); +extern Oid attnumTypeId(Relation rd, int attid); +extern void handleTargetColname(ParseState *pstate, char **resname, char *refname, char *colname); - -void checkTargetTypes(ParseState *pstate, char *target_colname, +extern void checkTargetTypes(ParseState *pstate, char *target_colname, char *refname, char *colname); #endif /* PARSE_RANGE_H */ diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index c7faa6b3db9..6b7451d565b 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_target.h,v 1.1 1997/11/25 22:07:06 momjian Exp $ + * $Id: parse_target.h,v 1.2 1997/11/26 01:14:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,18 +22,14 @@ #define EXPR_COLUMN_FIRST 1 #define EXPR_RELATION_FIRST 2 -List *transformTargetList(ParseState *pstate, List *targetlist); - -TargetEntry *make_targetlist_expr(ParseState *pstate, +extern List *transformTargetList(ParseState *pstate, List *targetlist); +extern TargetEntry *make_targetlist_expr(ParseState *pstate, char *colname, Node *expr, List *arrayRef); - -List *expandAllTables(ParseState *pstate); - -char *figureColname(Node *expr, Node *resval); - -List *makeTargetNames(ParseState *pstate, List *cols); +extern List *expandAllTables(ParseState *pstate); +extern char *figureColname(Node *expr, Node *resval); +extern List *makeTargetNames(ParseState *pstate, List *cols); #endif /* PARSE_TARGET_H */ diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h index 63c38ab98dc..fa2025994c7 100644 --- a/src/include/parser/parse_type.h +++ b/src/include/parser/parse_type.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_type.h,v 1.1 1997/11/25 22:07:07 momjian Exp $ + * $Id: parse_type.h,v 1.2 1997/11/26 01:14:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,21 +17,21 @@ typedef HeapTuple Type; -bool typeidIsValid(Oid id); -Type typeidType(Oid id); -Type typenameType(char *s); -char *typeidTypeName(Oid id); -Oid typeTypeId(Type tp); -int16 typeLen(Type t); -bool typeByVal(Type t); -char *typeTypeName(Type t); -char typeTypeFlag(Type t); -char *stringTypeString(Type tp, char *string, int typlen); -Oid typeidRetoutfunc(Oid type_id); -Oid typeidTypeRelid(Oid type_id); -Oid typeTypeRelid(Type typ); -Oid typeidTypElem(Oid type_id); -Oid GetArrayElementType(Oid typearray); -Oid typeidRetinfunc(Oid type_id); +extern bool typeidIsValid(Oid id); +extern Type typeidType(Oid id); +extern Type typenameType(char *s); +extern char *typeidTypeName(Oid id); +extern Oid typeTypeId(Type tp); +extern int16 typeLen(Type t); +extern bool typeByVal(Type t); +extern char *typeTypeName(Type t); +extern char typeTypeFlag(Type t); +extern char *stringTypeString(Type tp, char *string, int typlen); +extern Oid typeidRetoutfunc(Oid type_id); +extern Oid typeidTypeRelid(Oid type_id); +extern Oid typeTypeRelid(Type typ); +extern Oid typeidTypElem(Oid type_id); +extern Oid GetArrayElementType(Oid typearray); +extern Oid typeidRetinfunc(Oid type_id); #endif /* PARSE_TYPE_H */ diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index 4362ebb4803..820d7f960aa 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parser.h,v 1.1 1997/11/25 22:07:08 momjian Exp $ + * $Id: parser.h,v 1.2 1997/11/26 01:14:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ #include <parser/parse_node.h> -QueryTreeList *parser(char *str, Oid *typev, int nargs); +extern QueryTreeList *parser(char *str, Oid *typev, int nargs); #endif /* PARSER_H */ diff --git a/src/include/parser/scansup.h b/src/include/parser/scansup.h index 660a63db4ea..9a30962cce2 100644 --- a/src/include/parser/scansup.h +++ b/src/include/parser/scansup.h @@ -6,9 +6,14 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: scansup.h,v 1.3 1997/09/08 02:38:16 momjian Exp $ + * $Id: scansup.h,v 1.4 1997/11/26 01:14:18 momjian Exp $ * *------------------------------------------------------------------------- */ +#ifndef SCANSUP_H +#define SCANSUP_H + extern char *scanstr(char *s); + +#endif /* SCANSUP_H */ diff --git a/src/include/rewrite/rewriteDefine.h b/src/include/rewrite/rewriteDefine.h index ca72f191059..c002dd58f06 100644 --- a/src/include/rewrite/rewriteDefine.h +++ b/src/include/rewrite/rewriteDefine.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteDefine.h,v 1.4 1997/09/08 21:54:05 momjian Exp $ + * $Id: rewriteDefine.h,v 1.5 1997/11/26 01:14:22 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef REWRITEDEFINE_H #define REWRITEDEFINE_H +#include "nodes/parsenodes.h" + extern void DefineQueryRewrite(RuleStmt *args); #endif /* REWRITEDEFINE_H */ diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h index 344fd7ae512..e55e2086bcb 100644 --- a/src/include/rewrite/rewriteHandler.h +++ b/src/include/rewrite/rewriteHandler.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteHandler.h,v 1.4 1997/09/08 21:54:07 momjian Exp $ + * $Id: rewriteHandler.h,v 1.5 1997/11/26 01:14:23 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef REWRITEHANDLER_H #define REWRITEHANDLER_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" struct _rewrite_meta_knowledge { diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index fc8935f1c84..175cdd6ca88 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -6,13 +6,17 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteManip.h,v 1.4 1997/09/08 21:54:09 momjian Exp $ + * $Id: rewriteManip.h,v 1.5 1997/11/26 01:14:25 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef REWRITEMANIP_H #define REWRITEMANIP_H +#include "nodes/nodes.h" +#include "nodes/parsenodes.h" +#include "rewrite/rewriteHandler.h" + /* RewriteManip.c */ void OffsetVarNodes(Node *node, int offset); void ChangeVarNodes(Node *node, int old_varno, int new_varno); diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h index e7b910250be..8f89dfaa973 100644 --- a/src/include/rewrite/rewriteSupport.h +++ b/src/include/rewrite/rewriteSupport.h @@ -6,13 +6,15 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteSupport.h,v 1.5 1997/09/08 21:54:11 momjian Exp $ + * $Id: rewriteSupport.h,v 1.6 1997/11/26 01:14:27 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef REWRITESUPPORT_H #define REWRITESUPPORT_H +#include "access/attnum.h" +#include "nodes/pg_list.h" extern int IsDefinedRewriteRule(char *ruleName); diff --git a/src/include/utils/lselect.h b/src/include/utils/lselect.h index a820f2ddaf5..05dd1d10cc3 100644 --- a/src/include/utils/lselect.h +++ b/src/include/utils/lselect.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: lselect.h,v 1.7 1997/09/08 21:55:10 momjian Exp $ + * $Id: lselect.h,v 1.8 1997/11/26 01:14:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -14,7 +14,11 @@ #define LSELECT_H #include <stdio.h> + +#include "access/skey.h" +#include "access/tupdesc.h" #include "access/htup.h" +#include "utils/syscache.h" struct leftist { |
