mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
pgindent run before 6.3 release, with Thomas' requested changes.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: clauseinfo.h,v 1.6 1998/01/24 22:49:34 momjian Exp $
|
||||
* $Id: clauseinfo.h,v 1.7 1998/02/26 04:42:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -18,9 +18,11 @@
|
||||
|
||||
extern bool valid_or_clause(CInfo *clauseinfo);
|
||||
extern List *get_actual_clauses(List *clauseinfo_list);
|
||||
extern void get_relattvals(List *clauseinfo_list, List **attnos,
|
||||
extern void
|
||||
get_relattvals(List *clauseinfo_list, List **attnos,
|
||||
List **values, List **flags);
|
||||
extern void get_joinvars(Oid relid, List *clauseinfo_list,
|
||||
extern void
|
||||
get_joinvars(Oid relid, List *clauseinfo_list,
|
||||
List **attnos, List **values, List **flags);
|
||||
extern List *get_opnos(List *clauseinfo_list);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: clauses.h,v 1.9 1998/02/13 03:46:54 vadim Exp $
|
||||
* $Id: clauses.h,v 1.10 1998/02/26 04:42:13 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -42,13 +42,15 @@ extern bool join_clause_p(Node *clause);
|
||||
extern bool qual_clause_p(Node *clause);
|
||||
extern void fix_opid(Node *clause);
|
||||
extern List *fix_opids(List *clauses);
|
||||
extern void get_relattval(Node *clause, int *relid,
|
||||
extern void
|
||||
get_relattval(Node *clause, int *relid,
|
||||
AttrNumber *attno, Datum *constval, int *flag);
|
||||
extern void get_rels_atts(Node *clause, int *relid1,
|
||||
extern void
|
||||
get_rels_atts(Node *clause, int *relid1,
|
||||
AttrNumber *attno1, int *relid2, AttrNumber *attno2);
|
||||
extern void CommuteClause(Node *clause);
|
||||
|
||||
#define is_subplan(clause) ((Node*) clause != NULL && \
|
||||
#define is_subplan(clause) ((Node*) clause != NULL && \
|
||||
nodeTag((Node*) clause) == T_Expr && \
|
||||
((Expr *) clause)->opType == SUBPLAN_EXPR)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: cost.h,v 1.7 1998/01/24 22:49:41 momjian Exp $
|
||||
* $Id: cost.h,v 1.8 1998/02/26 04:42:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -31,16 +31,20 @@ extern bool _enable_mergesort_;
|
||||
extern bool _enable_hashjoin_;
|
||||
|
||||
extern Cost cost_seqscan(int relid, int relpages, int reltuples);
|
||||
extern Cost cost_index(Oid indexid, int expected_indexpages, Cost selec,
|
||||
extern Cost
|
||||
cost_index(Oid indexid, int expected_indexpages, Cost selec,
|
||||
int relpages, int reltuples, int indexpages,
|
||||
int indextuples, bool is_injoin);
|
||||
extern Cost cost_sort(List *keys, int tuples, int width, bool noread);
|
||||
extern Cost cost_nestloop(Cost outercost, Cost innercost, int outertuples,
|
||||
extern Cost
|
||||
cost_nestloop(Cost outercost, Cost innercost, int outertuples,
|
||||
int innertuples, int outerpages, bool is_indexjoin);
|
||||
extern Cost cost_mergesort(Cost outercost, Cost innercost,
|
||||
extern Cost
|
||||
cost_mergesort(Cost outercost, Cost innercost,
|
||||
List *outersortkeys, List *innersortkeys,
|
||||
int outersize, int innersize, int outerwidth, int innerwidth);
|
||||
extern Cost cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
|
||||
extern Cost
|
||||
cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
|
||||
List *innerkeys, int outersize, int innersize,
|
||||
int outerwidth, int innerwidth);
|
||||
extern int compute_rel_size(Rel *rel);
|
||||
@@ -56,7 +60,8 @@ extern void set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity
|
||||
extern Cost product_selec(List *clauseinfo_list);
|
||||
extern void set_rest_relselec(Query *root, List *rel_list);
|
||||
extern void set_rest_selec(Query *root, List *clauseinfo_list);
|
||||
extern Cost compute_clause_selec(Query *root,
|
||||
extern Cost
|
||||
compute_clause_selec(Query *root,
|
||||
Node *clause, List *or_selectivities);
|
||||
|
||||
#endif /* COST_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: ordering.h,v 1.7 1998/01/24 22:49:43 momjian Exp $
|
||||
* $Id: ordering.h,v 1.8 1998/02/26 04:42:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -15,11 +15,14 @@
|
||||
|
||||
#include <nodes/relation.h>
|
||||
|
||||
extern bool equal_path_path_ordering(PathOrder *path_ordering1,
|
||||
extern bool
|
||||
equal_path_path_ordering(PathOrder *path_ordering1,
|
||||
PathOrder *path_ordering2);
|
||||
extern bool equal_path_merge_ordering(Oid *path_ordering,
|
||||
extern bool
|
||||
equal_path_merge_ordering(Oid *path_ordering,
|
||||
MergeOrder *merge_ordering);
|
||||
extern bool equal_merge_merge_ordering(MergeOrder *merge_ordering1,
|
||||
extern bool
|
||||
equal_merge_merge_ordering(MergeOrder *merge_ordering1,
|
||||
MergeOrder *merge_ordering2);
|
||||
|
||||
#endif /* ORDERING_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pathnode.h,v 1.6 1998/01/24 22:49:46 momjian Exp $
|
||||
* $Id: pathnode.h,v 1.7 1998/02/26 04:42:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,19 +22,24 @@
|
||||
*/
|
||||
extern bool path_is_cheaper(Path *path1, Path *path2);
|
||||
extern Path *set_cheapest(Rel *parent_rel, List *pathlist);
|
||||
extern List * add_pathlist(Rel *parent_rel, List *unique_paths,
|
||||
extern List *
|
||||
add_pathlist(Rel *parent_rel, List *unique_paths,
|
||||
List *new_paths);
|
||||
extern Path *create_seqscan_path(Rel *rel);
|
||||
extern IndexPath * create_index_path(Query *root, Rel *rel, Rel *index,
|
||||
extern IndexPath *
|
||||
create_index_path(Query *root, Rel *rel, Rel *index,
|
||||
List *restriction_clauses, bool is_join_scan);
|
||||
extern JoinPath * create_nestloop_path(Rel *joinrel, Rel *outer_rel,
|
||||
extern JoinPath *
|
||||
create_nestloop_path(Rel *joinrel, Rel *outer_rel,
|
||||
Path *outer_path, Path *inner_path, List *keys);
|
||||
extern MergePath * create_mergesort_path(Rel *joinrel, int outersize,
|
||||
extern MergePath *
|
||||
create_mergesort_path(Rel *joinrel, int outersize,
|
||||
int innersize, int outerwidth, int innerwidth, Path *outer_path,
|
||||
Path *inner_path, List *keys, MergeOrder *order,
|
||||
List *mergeclauses, List *outersortkeys, List *innersortkeys);
|
||||
|
||||
extern HashPath * create_hashjoin_path(Rel *joinrel, int outersize,
|
||||
extern HashPath *
|
||||
create_hashjoin_path(Rel *joinrel, int outersize,
|
||||
int innersize, int outerwidth, int innerwidth, Path *outer_path,
|
||||
Path *inner_path, List *keys, Oid operator, List *hashclauses,
|
||||
List *outerkeys, List *innerkeys);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: paths.h,v 1.7 1998/01/24 22:49:48 momjian Exp $
|
||||
* $Id: paths.h,v 1.8 1998/02/26 04:42:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -27,7 +27,8 @@ extern List *find_paths(Query *root, List *rels);
|
||||
* indxpath.h
|
||||
* routines to generate index paths
|
||||
*/
|
||||
extern List * find_index_paths(Query *root, Rel *rel, List *indices,
|
||||
extern List *
|
||||
find_index_paths(Query *root, Rel *rel, List *indices,
|
||||
List *clauseinfo_list,
|
||||
List *joininfo_list);
|
||||
|
||||
@@ -47,30 +48,37 @@ extern List *create_or_index_paths(Query *root, Rel *rel, List *clauses);
|
||||
* hashutils.h
|
||||
* routines to deal with hash keys and clauses
|
||||
*/
|
||||
extern List * group_clauses_by_hashop(List *clauseinfo_list,
|
||||
extern List *
|
||||
group_clauses_by_hashop(List *clauseinfo_list,
|
||||
int inner_relid);
|
||||
|
||||
/*
|
||||
* joinutils.h
|
||||
* generic join method key/clause routines
|
||||
*/
|
||||
extern List * match_pathkeys_joinkeys(List *pathkeys,
|
||||
extern List *
|
||||
match_pathkeys_joinkeys(List *pathkeys,
|
||||
List *joinkeys, List *joinclauses, int which_subkey,
|
||||
List **matchedJoinClausesPtr);
|
||||
extern List * extract_path_keys(List *joinkeys, List *tlist,
|
||||
extern List *
|
||||
extract_path_keys(List *joinkeys, List *tlist,
|
||||
int which_subkey);
|
||||
extern Path * match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
|
||||
extern Path *
|
||||
match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
|
||||
List *paths, int which_subkey);
|
||||
extern List * new_join_pathkeys(List *outer_pathkeys,
|
||||
extern List *
|
||||
new_join_pathkeys(List *outer_pathkeys,
|
||||
List *join_rel_tlist, List *joinclauses);
|
||||
|
||||
/*
|
||||
* mergeutils.h
|
||||
* routines to deal with merge keys and clauses
|
||||
*/
|
||||
extern List * group_clauses_by_order(List *clauseinfo_list,
|
||||
extern List *
|
||||
group_clauses_by_order(List *clauseinfo_list,
|
||||
int inner_relid);
|
||||
extern MInfo * match_order_mergeinfo(PathOrder *ordering,
|
||||
extern MInfo *
|
||||
match_order_mergeinfo(PathOrder *ordering,
|
||||
List *mergeinfo_list);
|
||||
|
||||
/*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: plancat.h,v 1.7 1998/01/24 22:49:50 momjian Exp $
|
||||
* $Id: plancat.h,v 1.8 1998/02/26 04:42:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -34,26 +34,31 @@ typedef struct IdxInfoRetval
|
||||
} IdxInfoRetval;
|
||||
|
||||
|
||||
extern void relation_info(Query *root,
|
||||
extern void
|
||||
relation_info(Query *root,
|
||||
Oid relid,
|
||||
bool *hashindex, int *pages,
|
||||
int *tuples);
|
||||
|
||||
extern bool index_info(Query *root,
|
||||
extern bool
|
||||
index_info(Query *root,
|
||||
bool first, int relid, IdxInfoRetval *info);
|
||||
|
||||
extern Cost restriction_selectivity(Oid functionObjectId,
|
||||
extern Cost
|
||||
restriction_selectivity(Oid functionObjectId,
|
||||
Oid operatorObjectId,
|
||||
Oid relationObjectId,
|
||||
AttrNumber attributeNumber,
|
||||
char *constValue,
|
||||
int32 constFlag);
|
||||
|
||||
extern void index_selectivity(Oid indid, Oid *classes, List *opnos,
|
||||
extern void
|
||||
index_selectivity(Oid indid, Oid *classes, List *opnos,
|
||||
Oid relid, List *attnos, List *values, List *flags,
|
||||
int32 nkeys, float *idxPages, float *idxSelec);
|
||||
|
||||
extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId,
|
||||
extern Cost
|
||||
join_selectivity(Oid functionObjectId, Oid operatorObjectId,
|
||||
Oid relationObjectId1, AttrNumber attributeNumber1,
|
||||
Oid relationObjectId2, AttrNumber attributeNumber2);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: planmain.h,v 1.10 1998/01/15 19:00:15 momjian Exp $
|
||||
* $Id: planmain.h,v 1.11 1998/02/26 04:42:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -21,7 +21,8 @@
|
||||
/*
|
||||
* prototypes for plan/planmain.c
|
||||
*/
|
||||
extern Plan *query_planner(Query *root,
|
||||
extern Plan *
|
||||
query_planner(Query *root,
|
||||
int command_type, List *tlist, List *qual);
|
||||
|
||||
|
||||
@@ -29,12 +30,15 @@ extern Plan *query_planner(Query *root,
|
||||
* prototypes for plan/createplan.c
|
||||
*/
|
||||
extern Plan *create_plan(Path *best_path);
|
||||
extern SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid,
|
||||
extern SeqScan *
|
||||
make_seqscan(List *qptlist, List *qpqual, Index scanrelid,
|
||||
Plan *lefttree);
|
||||
extern Sort *make_sort(List *tlist, Oid tempid, Plan *lefttree,
|
||||
extern Sort *
|
||||
make_sort(List *tlist, Oid tempid, Plan *lefttree,
|
||||
int keycount);
|
||||
extern Agg *make_agg(List *tlist, Plan *lefttree);
|
||||
extern Group *make_group(List *tlist, bool tuplePerGroup, int ngrp,
|
||||
extern Group *
|
||||
make_group(List *tlist, bool tuplePerGroup, int ngrp,
|
||||
AttrNumber *grpColIdx, Sort *lefttree);
|
||||
extern Unique *make_unique(List *tlist, Plan *lefttree, char *uniqueAttr);
|
||||
|
||||
@@ -50,9 +54,11 @@ extern void add_missing_vars_to_base_rels(Query *root, List *tlist);
|
||||
* prototypes for plan/setrefs.c
|
||||
*/
|
||||
extern void set_tlist_references(Plan *plan);
|
||||
extern List *join_references(List *clauses, List *outer_tlist,
|
||||
extern List *
|
||||
join_references(List *clauses, List *outer_tlist,
|
||||
List *inner_tlist);
|
||||
extern List *index_outerjoin_references(List *inner_indxqual,
|
||||
extern List *
|
||||
index_outerjoin_references(List *inner_indxqual,
|
||||
List *outer_tlist, Index inner_relid);
|
||||
extern void set_result_tlist_references(Result *resultNode);
|
||||
extern List *set_agg_tlist_references(Agg *aggNode);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: prep.h,v 1.11 1997/12/29 01:13:23 momjian Exp $
|
||||
* $Id: prep.h,v 1.12 1998/02/26 04:42:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -24,10 +24,12 @@ extern List *cnfify(Expr *qual, bool removeAndFlag);
|
||||
/*
|
||||
* prototypes for preptlist.h
|
||||
*/
|
||||
extern List *preprocess_targetlist(List *tlist, int command_type,
|
||||
extern List *
|
||||
preprocess_targetlist(List *tlist, int command_type,
|
||||
Index result_relation, List *range_table);
|
||||
|
||||
extern List *find_all_inheritors(List *unexamined_relids,
|
||||
extern List *
|
||||
find_all_inheritors(List *unexamined_relids,
|
||||
List *examined_relids);
|
||||
extern int first_inherit_rt_entry(List *rangetable);
|
||||
extern Append *plan_union_queries(Query *parse);
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
#ifndef SUBSELECT_H
|
||||
#define SUBSELECT_H
|
||||
|
||||
extern int PlannerQueryLevel; /* level of current query */
|
||||
extern List *PlannerVarParam; /* correlation Vars to Param mapper */
|
||||
extern List *PlannerParamVar; /* to get Var from Param->paramid */
|
||||
extern List *PlannerInitPlan; /* init subplans for current query */
|
||||
extern int PlannerPlanId; /* to assigne unique ID to subquery plans */
|
||||
extern int PlannerQueryLevel; /* level of current query */
|
||||
extern List *PlannerVarParam; /* correlation Vars to Param mapper */
|
||||
extern List *PlannerParamVar; /* to get Var from Param->paramid */
|
||||
extern List *PlannerInitPlan; /* init subplans for current query */
|
||||
extern int PlannerPlanId; /* to assigne unique ID to subquery plans */
|
||||
|
||||
extern List *SS_finalize_plan (Plan *plan);
|
||||
extern Node *SS_replace_correlation_vars (Node *expr);
|
||||
extern Node *SS_process_sublinks (Node *expr);
|
||||
extern List *SS_finalize_plan(Plan *plan);
|
||||
extern Node *SS_replace_correlation_vars(Node *expr);
|
||||
extern Node *SS_process_sublinks(Node *expr);
|
||||
|
||||
#endif /* SUBSELECT_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: tlist.h,v 1.7 1998/01/24 22:49:51 momjian Exp $
|
||||
* $Id: tlist.h,v 1.8 1998/02/26 04:42:31 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -33,7 +33,8 @@ extern TargetEntry *match_varid(Var *test_var, List *tlist);
|
||||
extern List *new_unsorted_tlist(List *targetlist);
|
||||
extern List *copy_vars(List *target, List *source);
|
||||
extern List *flatten_tlist(List *tlist);
|
||||
extern List * flatten_tlist_vars(List *full_tlist,
|
||||
extern List *
|
||||
flatten_tlist_vars(List *full_tlist,
|
||||
List *flat_tlist);
|
||||
|
||||
#endif /* TLIST_H */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: xfunc.h,v 1.6 1998/01/24 22:49:52 momjian Exp $
|
||||
* $Id: xfunc.h,v 1.7 1998/02/26 04:42:33 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -50,9 +50,11 @@ extern int XfuncMode; /* defined in tcop/postgres.c */
|
||||
|
||||
/* function prototypes from planner/path/xfunc.c */
|
||||
extern void xfunc_trypullup(Rel *rel);
|
||||
extern int xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
|
||||
extern int
|
||||
xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
|
||||
int whichchild, CInfo *maxcinfopt);
|
||||
extern CInfo * xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo,
|
||||
extern CInfo *
|
||||
xfunc_pullup(Path *childpath, JoinPath *parentpath, CInfo *cinfo,
|
||||
int whichchild, int clausetype);
|
||||
extern Cost xfunc_rank(Expr *clause);
|
||||
extern Cost xfunc_expense(Query *queryInfo, Expr *clause);
|
||||
|
||||
Reference in New Issue
Block a user