1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Another pgindent run with updated typedefs.

This commit is contained in:
Bruce Momjian
2003-08-08 21:42:59 +00:00
parent 0e2b12bd96
commit 46785776c4
109 changed files with 811 additions and 808 deletions

View File

@ -49,7 +49,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.113 2003/08/04 02:40:00 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.114 2003/08/08 21:41:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -103,7 +103,7 @@ bool enable_hashjoin = true;
static Selectivity estimate_hash_bucketsize(Query *root, Var *var,
int nbuckets);
static bool cost_qual_eval_walker(Node *node, QualCost * total);
static bool cost_qual_eval_walker(Node *node, QualCost *total);
static Selectivity approx_selectivity(Query *root, List *quals,
JoinType jointype);
static void set_rel_width(Query *root, RelOptInfo *rel);
@ -1449,7 +1449,7 @@ estimate_hash_bucketsize(Query *root, Var *var, int nbuckets)
* and a per-evaluation component.
*/
void
cost_qual_eval(QualCost * cost, List *quals)
cost_qual_eval(QualCost *cost, List *quals)
{
List *l;
@ -1491,7 +1491,7 @@ cost_qual_eval(QualCost * cost, List *quals)
}
static bool
cost_qual_eval_walker(Node *node, QualCost * total)
cost_qual_eval_walker(Node *node, QualCost *total)
{
if (node == NULL)
return false;

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.16 2003/08/04 02:40:00 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.17 2003/08/08 21:41:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -27,7 +27,7 @@
static List *TidqualFromRestrictinfo(Relids relids, List *restrictinfo);
static bool isEvaluable(int varno, Node *node);
static Node *TidequalClause(int varno, OpExpr * node);
static Node *TidequalClause(int varno, OpExpr *node);
static List *TidqualFromExpr(int varno, Expr *expr);
static bool
@ -66,7 +66,7 @@ isEvaluable(int varno, Node *node)
* or the left node if the opclause is ....=CTID
*/
static Node *
TidequalClause(int varno, OpExpr * node)
TidequalClause(int varno, OpExpr *node)
{
Node *rnode = NULL,
*arg1,

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.152 2003/08/07 19:20:22 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.153 2003/08/08 21:41:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -40,9 +40,9 @@ static bool use_physical_tlist(RelOptInfo *rel);
static void disuse_physical_tlist(Plan *plan, Path *path);
static Join *create_join_plan(Query *root, JoinPath *best_path);
static Append *create_append_plan(Query *root, AppendPath *best_path);
static Result *create_result_plan(Query *root, ResultPath * best_path);
static Material *create_material_plan(Query *root, MaterialPath * best_path);
static Plan *create_unique_plan(Query *root, UniquePath * best_path);
static Result *create_result_plan(Query *root, ResultPath *best_path);
static Material *create_material_plan(Query *root, MaterialPath *best_path);
static Plan *create_unique_plan(Query *root, UniquePath *best_path);
static SeqScan *create_seqscan_plan(Path *best_path, List *tlist,
List *scan_clauses);
static IndexScan *create_indexscan_plan(Query *root, IndexPath *best_path,
@ -443,7 +443,7 @@ create_append_plan(Query *root, AppendPath *best_path)
* Returns a Plan node.
*/
static Result *
create_result_plan(Query *root, ResultPath * best_path)
create_result_plan(Query *root, ResultPath *best_path)
{
Result *plan;
List *tlist;
@ -475,7 +475,7 @@ create_result_plan(Query *root, ResultPath * best_path)
* Returns a Plan node.
*/
static Material *
create_material_plan(Query *root, MaterialPath * best_path)
create_material_plan(Query *root, MaterialPath *best_path)
{
Material *plan;
Plan *subplan;
@ -500,7 +500,7 @@ create_material_plan(Query *root, MaterialPath * best_path)
* Returns a Plan node.
*/
static Plan *
create_unique_plan(Query *root, UniquePath * best_path)
create_unique_plan(Query *root, UniquePath *best_path)
{
Plan *plan;
Plan *subplan;
@ -522,17 +522,18 @@ create_unique_plan(Query *root, UniquePath * best_path)
* to unique-ify may be expressions in these variables. We have to
* add any such expressions to the subplan's tlist. We then build
* control information showing which subplan output columns are to be
* examined by the grouping step. (Since we do not remove any existing
* subplan outputs, not all the output columns may be used for grouping.)
* examined by the grouping step. (Since we do not remove any
* existing subplan outputs, not all the output columns may be used
* for grouping.)
*
* Note: the reason we don't remove any subplan outputs is that there
* are scenarios where a Var is needed at higher levels even though it
* is not one of the nominal outputs of an IN clause. Consider
* WHERE x IN (SELECT y FROM t1,t2 WHERE y = z)
* Implied equality deduction will generate an "x = z" clause, which may
* get used instead of "x = y" in the upper join step. Therefore the
* sub-select had better deliver both y and z in its targetlist. It is
* sufficient to unique-ify on y, however.
* Note: the reason we don't remove any subplan outputs is that there are
* scenarios where a Var is needed at higher levels even though it is
* not one of the nominal outputs of an IN clause. Consider WHERE x
* IN (SELECT y FROM t1,t2 WHERE y = z) Implied equality deduction
* will generate an "x = z" clause, which may get used instead of "x =
* y" in the upper join step. Therefore the sub-select had better
* deliver both y and z in its targetlist. It is sufficient to
* unique-ify on y, however.
*
* To find the correct list of values to unique-ify, we look in the
* information saved for IN expressions. If this code is ever used in
@ -1208,7 +1209,7 @@ fix_indxqual_sublist(List *indexqual,
Relids leftvarnos;
Oid opclass;
if (!IsA(clause, OpExpr) || length(clause->args) != 2)
if (!IsA(clause, OpExpr) ||length(clause->args) != 2)
elog(ERROR, "indexqual clause is not binary opclause");
/*

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.96 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.97 2003/08/08 21:41:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -60,7 +60,7 @@ static Node *replace_vars_with_subplan_refs(Node *node,
static Node *replace_vars_with_subplan_refs_mutator(Node *node,
replace_vars_with_subplan_refs_context *context);
static bool fix_opfuncids_walker(Node *node, void *context);
static void set_sa_opfuncid(ScalarArrayOpExpr * opexpr);
static void set_sa_opfuncid(ScalarArrayOpExpr *opexpr);
/*****************************************************************************
@ -759,7 +759,7 @@ fix_opfuncids_walker(Node *node, void *context)
* DistinctExpr and NullIfExpr nodes.
*/
void
set_opfuncid(OpExpr * opexpr)
set_opfuncid(OpExpr *opexpr)
{
if (opexpr->opfuncid == InvalidOid)
opexpr->opfuncid = get_opcode(opexpr->opno);
@ -770,7 +770,7 @@ set_opfuncid(OpExpr * opexpr)
* As above, for ScalarArrayOpExpr nodes.
*/
static void
set_sa_opfuncid(ScalarArrayOpExpr * opexpr)
set_sa_opfuncid(ScalarArrayOpExpr *opexpr)
{
if (opexpr->opfuncid == InvalidOid)
opexpr->opfuncid = get_opcode(opexpr->opno);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.81 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.82 2003/08/08 21:41:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -71,14 +71,14 @@ typedef struct PlannerParamItem
{
Node *item; /* the Var, Aggref, or Param */
Index abslevel; /* its absolute query level */
} PlannerParamItem;
} PlannerParamItem;
typedef struct finalize_primnode_context
{
Bitmapset *paramids; /* Set of PARAM_EXEC paramids found */
Bitmapset *outer_params; /* Set of accessible outer paramids */
} finalize_primnode_context;
} finalize_primnode_context;
static List *convert_sublink_opers(List *lefthand, List *operOids,
@ -88,9 +88,9 @@ static bool subplan_is_hashable(SubLink *slink, SubPlan *node);
static Node *replace_correlation_vars_mutator(Node *node, void *context);
static Node *process_sublinks_mutator(Node *node, bool *isTopQual);
static Bitmapset *finalize_plan(Plan *plan, List *rtable,
Bitmapset * outer_params,
Bitmapset * valid_params);
static bool finalize_primnode(Node *node, finalize_primnode_context * context);
Bitmapset *outer_params,
Bitmapset *valid_params);
static bool finalize_primnode(Node *node, finalize_primnode_context *context);
/*
@ -909,7 +909,7 @@ SS_finalize_plan(Plan *plan, List *rtable)
*/
static Bitmapset *
finalize_plan(Plan *plan, List *rtable,
Bitmapset * outer_params, Bitmapset * valid_params)
Bitmapset *outer_params, Bitmapset *valid_params)
{
finalize_primnode_context context;
List *lst;
@ -1073,7 +1073,7 @@ finalize_plan(Plan *plan, List *rtable,
* expression tree to the result set.
*/
static bool
finalize_primnode(Node *node, finalize_primnode_context * context)
finalize_primnode(Node *node, finalize_primnode_context *context)
{
if (node == NULL)
return false;

View File

@ -16,7 +16,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.10 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.11 2003/08/08 21:41:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -41,14 +41,14 @@ typedef struct reduce_outer_joins_state
Relids relids; /* base relids within this subtree */
bool contains_outer; /* does subtree contain outer join(s)? */
List *sub_states; /* List of states for subtree components */
} reduce_outer_joins_state;
} reduce_outer_joins_state;
static bool is_simple_subquery(Query *subquery);
static bool has_nullable_targetlist(Query *subquery);
static void resolvenew_in_jointree(Node *jtnode, int varno, List *subtlist);
static reduce_outer_joins_state *reduce_outer_joins_pass1(Node *jtnode);
static void reduce_outer_joins_pass2(Node *jtnode,
reduce_outer_joins_state * state,
reduce_outer_joins_state *state,
Query *parse,
Relids nonnullable_rels);
static Relids find_nonnullable_rels(Node *node, bool top_level);
@ -609,7 +609,7 @@ reduce_outer_joins_pass1(Node *jtnode)
*/
static void
reduce_outer_joins_pass2(Node *jtnode,
reduce_outer_joins_state * state,
reduce_outer_joins_state *state,
Query *parse,
Relids nonnullable_rels)
{

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.37 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.38 2003/08/08 21:41:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -21,12 +21,12 @@
#include "utils/lsyscache.h"
static Expr *flatten_andors(Expr *qual);
static void flatten_andors_and_walker(FastList * out_list, List *andlist);
static void flatten_andors_or_walker(FastList * out_list, List *orlist);
static void flatten_andors_and_walker(FastList *out_list, List *andlist);
static void flatten_andors_or_walker(FastList *out_list, List *orlist);
static List *pull_ands(List *andlist);
static void pull_ands_walker(FastList * out_list, List *andlist);
static void pull_ands_walker(FastList *out_list, List *andlist);
static List *pull_ors(List *orlist);
static void pull_ors_walker(FastList * out_list, List *orlist);
static void pull_ors_walker(FastList *out_list, List *orlist);
static Expr *find_nots(Expr *qual);
static Expr *push_nots(Expr *qual);
static Expr *find_ors(Expr *qual);
@ -328,7 +328,7 @@ flatten_andors(Expr *qual)
}
static void
flatten_andors_and_walker(FastList * out_list, List *andlist)
flatten_andors_and_walker(FastList *out_list, List *andlist)
{
List *arg;
@ -344,7 +344,7 @@ flatten_andors_and_walker(FastList * out_list, List *andlist)
}
static void
flatten_andors_or_walker(FastList * out_list, List *orlist)
flatten_andors_or_walker(FastList *out_list, List *orlist)
{
List *arg;
@ -377,7 +377,7 @@ pull_ands(List *andlist)
}
static void
pull_ands_walker(FastList * out_list, List *andlist)
pull_ands_walker(FastList *out_list, List *andlist)
{
List *arg;
@ -410,7 +410,7 @@ pull_ors(List *orlist)
}
static void
pull_ors_walker(FastList * out_list, List *orlist)
pull_ors_walker(FastList *out_list, List *orlist)
{
List *arg;

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.151 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.152 2003/08/08 21:41:55 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -50,7 +50,7 @@ typedef struct
int nargs;
List *args;
int *usecounts;
} substitute_actual_parameters_context;
} substitute_actual_parameters_context;
static bool contain_agg_clause_walker(Node *node, void *context);
static bool contain_distinct_agg_clause_walker(Node *node, void *context);
@ -70,7 +70,7 @@ static Expr *inline_function(Oid funcid, Oid result_type, List *args,
static Node *substitute_actual_parameters(Node *expr, int nargs, List *args,
int *usecounts);
static Node *substitute_actual_parameters_mutator(Node *node,
substitute_actual_parameters_context * context);
substitute_actual_parameters_context *context);
static void sql_inline_error_callback(void *arg);
static Expr *evaluate_expr(Expr *expr, Oid result_type);
@ -981,7 +981,7 @@ NumRelids(Node *clause)
* XXX the clause is destructively modified!
*/
void
CommuteClause(OpExpr * clause)
CommuteClause(OpExpr *clause)
{
Oid opoid;
Node *temp;
@ -2002,7 +2002,7 @@ substitute_actual_parameters(Node *expr, int nargs, List *args,
static Node *
substitute_actual_parameters_mutator(Node *node,
substitute_actual_parameters_context * context)
substitute_actual_parameters_context *context)
{
if (node == NULL)
return NULL;

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.53 2003/08/04 02:40:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.54 2003/08/08 21:41:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -39,7 +39,7 @@ typedef struct
{
int min_varlevel;
int sublevels_up;
} find_minimum_var_level_context;
} find_minimum_var_level_context;
typedef struct
{
@ -61,7 +61,7 @@ static bool contain_var_clause_walker(Node *node, void *context);
static bool contain_vars_of_level_walker(Node *node, int *sublevels_up);
static bool contain_vars_above_level_walker(Node *node, int *sublevels_up);
static bool find_minimum_var_level_walker(Node *node,
find_minimum_var_level_context * context);
find_minimum_var_level_context *context);
static bool pull_var_clause_walker(Node *node,
pull_var_clause_context *context);
static Node *flatten_join_alias_vars_mutator(Node *node,
@ -364,7 +364,7 @@ find_minimum_var_level(Node *node)
static bool
find_minimum_var_level_walker(Node *node,
find_minimum_var_level_context * context)
find_minimum_var_level_context *context)
{
if (node == NULL)
return false;