mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Another pgindent run. Sorry folks.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_eval.c,v 1.38 1999/05/25 16:09:15 momjian Exp $
|
||||
* $Id: geqo_eval.c,v 1.39 1999/05/25 22:41:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ geqo_eval(Query *root, Gene *tour, int num_gene)
|
||||
* Returns a new join relation incorporating all joins in a left-sided tree.
|
||||
*/
|
||||
RelOptInfo *
|
||||
gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo * old_rel)
|
||||
gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *old_rel)
|
||||
{
|
||||
RelOptInfo *inner_rel; /* current relation */
|
||||
int base_rel_index;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: geqo_misc.c,v 1.18 1999/05/25 16:09:17 momjian Exp $
|
||||
* $Id: geqo_misc.c,v 1.19 1999/05/25 22:41:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -261,7 +261,7 @@ geqo_print_path(Query *root, Path *path, int indent)
|
||||
}
|
||||
|
||||
void
|
||||
geqo_print_rel(Query *root, RelOptInfo * rel)
|
||||
geqo_print_rel(Query *root, RelOptInfo *rel)
|
||||
{
|
||||
List *l;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.11 1999/05/25 16:09:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.12 1999/05/25 22:41:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
void
|
||||
minspantree(Query *root, List *join_rels, RelOptInfo * garel)
|
||||
minspantree(Query *root, List *join_rels, RelOptInfo *garel)
|
||||
{
|
||||
int number_of_rels = length(root->base_rel_list);
|
||||
int number_of_joins = length(join_rels);
|
||||
@@ -111,9 +111,9 @@ minspantree(Query *root, List *join_rels, RelOptInfo * garel)
|
||||
|
||||
else if (number_of_joins == 3)
|
||||
{
|
||||
RelOptInfo *rel12 = (RelOptInfo *) & tmprel_array[1][2];
|
||||
RelOptInfo *rel13 = (RelOptInfo *) & tmprel_array[1][3];
|
||||
RelOptInfo *rel23 = (RelOptInfo *) & tmprel_array[2][3];
|
||||
RelOptInfo *rel12 = (RelOptInfo *) &tmprel_array[1][2];
|
||||
RelOptInfo *rel13 = (RelOptInfo *) &tmprel_array[1][3];
|
||||
RelOptInfo *rel23 = (RelOptInfo *) &tmprel_array[2][3];
|
||||
|
||||
if (rel12->cheapestpath->path_cost > rel13->cheapestpath->path_cost)
|
||||
{
|
||||
@@ -159,9 +159,9 @@ minspantree(Query *root, List *join_rels, RelOptInfo * garel)
|
||||
if (connectto[tempn] != 0)
|
||||
{
|
||||
if (n > tempn)
|
||||
joinrel = (RelOptInfo *) & tmprel_array[tempn][n];
|
||||
joinrel = (RelOptInfo *) &tmprel_array[tempn][n];
|
||||
else
|
||||
joinrel = (RelOptInfo *) & tmprel_array[n][tempn];
|
||||
joinrel = (RelOptInfo *) &tmprel_array[n][tempn];
|
||||
dist = joinrel->cheapestpath->path_cost;
|
||||
|
||||
if (dist < disttoconnect[tempn])
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/predmig.c,v 1.3 1999/05/25 22:04:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/predmig.c,v 1.4 1999/05/25 22:41:35 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -487,7 +487,7 @@ xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom)
|
||||
}
|
||||
|
||||
|
||||
/* ------------------- UTILITY FUNCTIONS ------------------------- */
|
||||
/* ------------------- UTILITY FUNCTIONS ------------------------- */
|
||||
|
||||
/*
|
||||
** xfunc_free_stream
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.3 1999/05/25 16:09:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.4 1999/05/25 22:41:36 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -144,7 +144,7 @@ xfunc_shouldpull(Query *queryInfo,
|
||||
Path childpath,
|
||||
JoinPath parentpath,
|
||||
int whichchild,
|
||||
RestrictInfo * maxcinfopt) /* Out: pointer to clause
|
||||
RestrictInfo *maxcinfopt) /* Out: pointer to clause
|
||||
* to pullup */
|
||||
{
|
||||
LispValue clauselist,
|
||||
@@ -225,7 +225,7 @@ xfunc_shouldpull(Query *queryInfo,
|
||||
|| (!is_join(childpath)
|
||||
&& (whichchild == INNER)
|
||||
&& IsA(parentpath, NestPath)
|
||||
&& !IsA(parentpath, HashPath)
|
||||
&&!IsA(parentpath, HashPath)
|
||||
&&!IsA(parentpath, MergePath)))))
|
||||
{
|
||||
|
||||
@@ -1423,7 +1423,7 @@ do { \
|
||||
** Just like _copyRel, but doesn't copy the paths
|
||||
*/
|
||||
bool
|
||||
xfunc_copyrel(RelOptInfo from, RelOptInfo * to)
|
||||
xfunc_copyrel(RelOptInfo from, RelOptInfo *to)
|
||||
{
|
||||
RelOptInfo newnode;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.45 1999/05/25 16:09:22 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.46 1999/05/25 22:41:25 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ static RelOptInfo *make_one_rel_by_joins(Query *root, List *rels,
|
||||
int levels_needed);
|
||||
|
||||
#ifdef OPTIMIZER_DEBUG
|
||||
static void debug_print_rel(Query *root, RelOptInfo * rel);
|
||||
static void debug_print_rel(Query *root, RelOptInfo *rel);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -355,7 +355,7 @@ print_path(Query *root, Path *path, int indent)
|
||||
}
|
||||
|
||||
static void
|
||||
debug_print_rel(Query *root, RelOptInfo * rel)
|
||||
debug_print_rel(Query *root, RelOptInfo *rel)
|
||||
{
|
||||
List *l;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.37 1999/05/25 16:09:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.38 1999/05/25 22:41:27 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -390,7 +390,7 @@ cost_hashjoin(Cost outercost,
|
||||
* Returns the size.
|
||||
*/
|
||||
int
|
||||
compute_rel_size(RelOptInfo * rel)
|
||||
compute_rel_size(RelOptInfo *rel)
|
||||
{
|
||||
Cost temp;
|
||||
int temp1;
|
||||
@@ -413,7 +413,7 @@ compute_rel_size(RelOptInfo * rel)
|
||||
* Returns the width of the tuple as a fixnum.
|
||||
*/
|
||||
int
|
||||
compute_rel_width(RelOptInfo * rel)
|
||||
compute_rel_width(RelOptInfo *rel)
|
||||
{
|
||||
return compute_targetlist_width(get_actual_tlist(rel->targetlist));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.55 1999/05/25 16:09:24 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.56 1999/05/25 22:41:28 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -45,32 +45,32 @@
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
|
||||
static void match_index_orclauses(RelOptInfo * rel, RelOptInfo * index, int indexkey,
|
||||
static void match_index_orclauses(RelOptInfo *rel, RelOptInfo *index, int indexkey,
|
||||
int xclass, List *restrictinfo_list);
|
||||
static bool match_index_to_operand(int indexkey, Expr *operand,
|
||||
RelOptInfo * rel, RelOptInfo * index);
|
||||
static List *match_index_orclause(RelOptInfo * rel, RelOptInfo * index, int indexkey,
|
||||
RelOptInfo *rel, RelOptInfo *index);
|
||||
static List *match_index_orclause(RelOptInfo *rel, RelOptInfo *index, int indexkey,
|
||||
int xclass, List *or_clauses, List *other_matching_indices);
|
||||
static List *group_clauses_by_indexkey(RelOptInfo * rel, RelOptInfo * index,
|
||||
static List *group_clauses_by_indexkey(RelOptInfo *rel, RelOptInfo *index,
|
||||
int *indexkeys, Oid *classes, List *restrictinfo_list);
|
||||
static List *group_clauses_by_ikey_for_joins(RelOptInfo * rel, RelOptInfo * index,
|
||||
static List *group_clauses_by_ikey_for_joins(RelOptInfo *rel, RelOptInfo *index,
|
||||
int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list);
|
||||
static RestrictInfo *match_clause_to_indexkey(RelOptInfo * rel, RelOptInfo * index, int indexkey,
|
||||
int xclass, RestrictInfo * restrictInfo, bool join);
|
||||
static RestrictInfo *match_clause_to_indexkey(RelOptInfo *rel, RelOptInfo *index, int indexkey,
|
||||
int xclass, RestrictInfo *restrictInfo, bool join);
|
||||
static bool pred_test(List *predicate_list, List *restrictinfo_list,
|
||||
List *joininfo_list);
|
||||
static bool one_pred_test(Expr *predicate, List *restrictinfo_list);
|
||||
static bool one_pred_clause_expr_test(Expr *predicate, Node *clause);
|
||||
static bool one_pred_clause_test(Expr *predicate, Node *clause);
|
||||
static bool clause_pred_clause_test(Expr *predicate, Node *clause);
|
||||
static List *indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
|
||||
static List *indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
|
||||
List *joininfo_list, List *restrictinfo_list);
|
||||
static List *index_innerjoin(Query *root, RelOptInfo * rel,
|
||||
List *clausegroup_list, RelOptInfo * index);
|
||||
static List *create_index_path_group(Query *root, RelOptInfo * rel, RelOptInfo * index,
|
||||
static List *index_innerjoin(Query *root, RelOptInfo *rel,
|
||||
List *clausegroup_list, RelOptInfo *index);
|
||||
static List *create_index_path_group(Query *root, RelOptInfo *rel, RelOptInfo *index,
|
||||
List *clausegroup_list, bool join);
|
||||
static List *add_index_paths(List *indexpaths, List *new_indexpaths);
|
||||
static bool function_index_operand(Expr *funcOpnd, RelOptInfo * rel, RelOptInfo * index);
|
||||
static bool function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *index);
|
||||
|
||||
|
||||
/* find_index_paths()
|
||||
@@ -100,7 +100,7 @@ static bool function_index_operand(Expr *funcOpnd, RelOptInfo * rel, RelOptInfo
|
||||
*/
|
||||
List *
|
||||
create_index_paths(Query *root,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo *rel,
|
||||
List *indices,
|
||||
List *restrictinfo_list,
|
||||
List *joininfo_list)
|
||||
@@ -217,8 +217,8 @@ create_index_paths(Query *root,
|
||||
*
|
||||
*/
|
||||
static void
|
||||
match_index_orclauses(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
match_index_orclauses(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int indexkey,
|
||||
int xclass,
|
||||
List *restrictinfo_list)
|
||||
@@ -253,8 +253,8 @@ match_index_orclauses(RelOptInfo * rel,
|
||||
static bool
|
||||
match_index_to_operand(int indexkey,
|
||||
Expr *operand,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo * index)
|
||||
RelOptInfo *rel,
|
||||
RelOptInfo *index)
|
||||
{
|
||||
bool result;
|
||||
|
||||
@@ -296,8 +296,8 @@ match_index_to_operand(int indexkey,
|
||||
* match the third, g,h match the fourth, etc.
|
||||
*/
|
||||
static List *
|
||||
match_index_orclause(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
match_index_orclause(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int indexkey,
|
||||
int xclass,
|
||||
List *or_clauses,
|
||||
@@ -387,8 +387,8 @@ match_index_orclause(RelOptInfo * rel,
|
||||
*
|
||||
*/
|
||||
static List *
|
||||
group_clauses_by_indexkey(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
group_clauses_by_indexkey(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int *indexkeys,
|
||||
Oid *classes,
|
||||
List *restrictinfo_list)
|
||||
@@ -449,8 +449,8 @@ group_clauses_by_indexkey(RelOptInfo * rel,
|
||||
*
|
||||
*/
|
||||
static List *
|
||||
group_clauses_by_ikey_for_joins(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
group_clauses_by_ikey_for_joins(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int *indexkeys,
|
||||
Oid *classes,
|
||||
List *join_cinfo_list,
|
||||
@@ -571,11 +571,11 @@ group_clauses_by_ikey_for_joins(RelOptInfo * rel,
|
||||
*
|
||||
*/
|
||||
static RestrictInfo *
|
||||
match_clause_to_indexkey(RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
match_clause_to_indexkey(RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
int indexkey,
|
||||
int xclass,
|
||||
RestrictInfo * restrictInfo,
|
||||
RestrictInfo *restrictInfo,
|
||||
bool join)
|
||||
{
|
||||
Expr *clause = restrictInfo->clause;
|
||||
@@ -1183,7 +1183,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
|
||||
*
|
||||
*/
|
||||
static List *
|
||||
indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
|
||||
indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
|
||||
List *joininfo_list, List *restrictinfo_list)
|
||||
{
|
||||
JoinInfo *joininfo = (JoinInfo *) NULL;
|
||||
@@ -1255,8 +1255,8 @@ extract_restrict_clauses(List *clausegroup)
|
||||
*
|
||||
*/
|
||||
static List *
|
||||
index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
|
||||
RelOptInfo * index)
|
||||
index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
|
||||
RelOptInfo *index)
|
||||
{
|
||||
List *clausegroup = NIL;
|
||||
List *cg_list = NIL;
|
||||
@@ -1343,8 +1343,8 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
|
||||
*/
|
||||
static List *
|
||||
create_index_path_group(Query *root,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
List *clausegroup_list,
|
||||
bool join)
|
||||
{
|
||||
@@ -1386,7 +1386,7 @@ add_index_paths(List *indexpaths, List *new_indexpaths)
|
||||
}
|
||||
|
||||
static bool
|
||||
function_index_operand(Expr *funcOpnd, RelOptInfo * rel, RelOptInfo * index)
|
||||
function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *index)
|
||||
{
|
||||
Oid heapRelid = (Oid) lfirsti(rel->relids);
|
||||
Func *function;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.37 1999/05/25 16:09:25 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.38 1999/05/25 22:41:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -30,14 +30,14 @@
|
||||
* _enable_mergejoin} */
|
||||
|
||||
static Path *best_innerjoin(List *join_paths, List *outer_relid);
|
||||
static List *sort_inner_and_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
|
||||
static List *sort_inner_and_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
|
||||
List *mergeinfo_list);
|
||||
static List *match_unsorted_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
|
||||
static List *match_unsorted_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
|
||||
List *outerpath_list, Path *cheapest_inner, Path *best_innerjoin,
|
||||
List *mergeinfo_list);
|
||||
static List *match_unsorted_inner(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
|
||||
static List *match_unsorted_inner(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
|
||||
List *innerpath_list, List *mergeinfo_list);
|
||||
static List *hash_inner_and_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
|
||||
static List *hash_inner_and_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
|
||||
List *hashinfo_list);
|
||||
|
||||
/*
|
||||
@@ -194,9 +194,9 @@ best_innerjoin(List *join_paths, Relids outer_relids)
|
||||
* Returns a list of mergejoin paths.
|
||||
*/
|
||||
static List *
|
||||
sort_inner_and_outer(RelOptInfo * joinrel,
|
||||
RelOptInfo * outerrel,
|
||||
RelOptInfo * innerrel,
|
||||
sort_inner_and_outer(RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
List *mergeinfo_list)
|
||||
{
|
||||
List *ms_list = NIL;
|
||||
@@ -268,9 +268,9 @@ sort_inner_and_outer(RelOptInfo * joinrel,
|
||||
* Returns a list of possible join path nodes.
|
||||
*/
|
||||
static List *
|
||||
match_unsorted_outer(RelOptInfo * joinrel,
|
||||
RelOptInfo * outerrel,
|
||||
RelOptInfo * innerrel,
|
||||
match_unsorted_outer(RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
List *outerpath_list,
|
||||
Path *cheapest_inner,
|
||||
Path *best_innerjoin,
|
||||
@@ -411,9 +411,9 @@ match_unsorted_outer(RelOptInfo * joinrel,
|
||||
* Returns a list of possible merge paths.
|
||||
*/
|
||||
static List *
|
||||
match_unsorted_inner(RelOptInfo * joinrel,
|
||||
RelOptInfo * outerrel,
|
||||
RelOptInfo * innerrel,
|
||||
match_unsorted_inner(RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
List *innerpath_list,
|
||||
List *mergeinfo_list)
|
||||
{
|
||||
@@ -503,9 +503,9 @@ match_unsorted_inner(RelOptInfo * joinrel,
|
||||
* Returns a list of hashjoin paths.
|
||||
*/
|
||||
static List *
|
||||
hash_inner_and_outer(RelOptInfo * joinrel,
|
||||
RelOptInfo * outerrel,
|
||||
RelOptInfo * innerrel,
|
||||
hash_inner_and_outer(RelOptInfo *joinrel,
|
||||
RelOptInfo *outerrel,
|
||||
RelOptInfo *innerrel,
|
||||
List *hashinfo_list)
|
||||
{
|
||||
List *hjoin_list = NIL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.33 1999/05/25 16:09:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.34 1999/05/25 22:41:31 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -26,8 +26,8 @@
|
||||
static List *new_joininfo_list(List *joininfo_list, Relids join_relids);
|
||||
static bool nonoverlap_sets(List *s1, List *s2);
|
||||
static bool is_subset(List *s1, List *s2);
|
||||
static void set_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel,
|
||||
RelOptInfo * inner_rel, JoinInfo * jinfo);
|
||||
static void set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel,
|
||||
RelOptInfo *inner_rel, JoinInfo *jinfo);
|
||||
|
||||
/*
|
||||
* make_rels_by_joins
|
||||
@@ -89,7 +89,7 @@ make_rels_by_joins(Query *root, List *old_rels)
|
||||
* Returns a list of new join relations.
|
||||
*/
|
||||
List *
|
||||
make_rels_by_clause_joins(Query *root, RelOptInfo * old_rel,
|
||||
make_rels_by_clause_joins(Query *root, RelOptInfo *old_rel,
|
||||
List *joininfo_list, Relids only_relids)
|
||||
{
|
||||
List *join_list = NIL;
|
||||
@@ -159,7 +159,7 @@ make_rels_by_clause_joins(Query *root, RelOptInfo * old_rel,
|
||||
* Returns a list of new join relations.
|
||||
*/
|
||||
List *
|
||||
make_rels_by_clauseless_joins(RelOptInfo * old_rel, List *inner_rels)
|
||||
make_rels_by_clauseless_joins(RelOptInfo *old_rel, List *inner_rels)
|
||||
{
|
||||
RelOptInfo *inner_rel;
|
||||
List *t_list = NIL;
|
||||
@@ -192,7 +192,7 @@ make_rels_by_clauseless_joins(RelOptInfo * old_rel, List *inner_rels)
|
||||
* Returns the new join relation node.
|
||||
*/
|
||||
RelOptInfo *
|
||||
make_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininfo)
|
||||
make_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
|
||||
{
|
||||
RelOptInfo *joinrel = makeNode(RelOptInfo);
|
||||
List *joinrel_joininfo_list = NIL;
|
||||
@@ -436,7 +436,7 @@ is_subset(List *s1, List *s2)
|
||||
}
|
||||
|
||||
static void
|
||||
set_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * jinfo)
|
||||
set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *jinfo)
|
||||
{
|
||||
int ntuples;
|
||||
float selec;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.24 1999/05/25 16:09:27 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.25 1999/05/25 22:41:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -31,9 +31,9 @@
|
||||
#include "parser/parsetree.h"
|
||||
|
||||
|
||||
static void best_or_subclause_indices(Query *root, RelOptInfo * rel, List *subclauses,
|
||||
static void best_or_subclause_indices(Query *root, RelOptInfo *rel, List *subclauses,
|
||||
List *indices, List **indexids, Cost *cost, Cost *selec);
|
||||
static void best_or_subclause_index(Query *root, RelOptInfo * rel, Expr *subclause,
|
||||
static void best_or_subclause_index(Query *root, RelOptInfo *rel, Expr *subclause,
|
||||
List *indices, int *indexid, Cost *cost, Cost *selec);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static void best_or_subclause_index(Query *root, RelOptInfo * rel, Expr *subclau
|
||||
*/
|
||||
List *
|
||||
create_or_index_paths(Query *root,
|
||||
RelOptInfo * rel, List *clauses)
|
||||
RelOptInfo *rel, List *clauses)
|
||||
{
|
||||
List *t_list = NIL;
|
||||
List *clist;
|
||||
@@ -156,7 +156,7 @@ create_or_index_paths(Query *root,
|
||||
*/
|
||||
static void
|
||||
best_or_subclause_indices(Query *root,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo *rel,
|
||||
List *subclauses,
|
||||
List *indices,
|
||||
List **indexids, /* return value */
|
||||
@@ -205,7 +205,7 @@ best_or_subclause_indices(Query *root,
|
||||
*/
|
||||
static void
|
||||
best_or_subclause_index(Query *root,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo *rel,
|
||||
Expr *subclause,
|
||||
List *indices,
|
||||
int *retIndexid, /* return value */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.38 1999/05/25 16:09:28 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.39 1999/05/25 22:41:33 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "utils/elog.h"
|
||||
|
||||
|
||||
static List *merge_rel_with_same_relids(RelOptInfo * rel, Relids unjoined_relids);
|
||||
static List *merge_rel_with_same_relids(RelOptInfo *rel, Relids unjoined_relids);
|
||||
|
||||
/*
|
||||
* merge_rels_with_same_relids
|
||||
@@ -59,7 +59,7 @@ merge_rels_with_same_relids(List *rel_list)
|
||||
*
|
||||
*/
|
||||
static List *
|
||||
merge_rel_with_same_relids(RelOptInfo * rel, Relids unjoined_relids)
|
||||
merge_rel_with_same_relids(RelOptInfo *rel, Relids unjoined_relids)
|
||||
{
|
||||
List *i = NIL;
|
||||
List *result = NIL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.56 1999/05/25 16:09:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.57 1999/05/25 22:41:38 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ static SeqScan *create_seqscan_node(Path *best_path, List *tlist,
|
||||
List *scan_clauses);
|
||||
static IndexScan *create_indexscan_node(IndexPath *best_path, List *tlist,
|
||||
List *scan_clauses);
|
||||
static NestLoop *create_nestloop_node(NestPath * best_path, List *tlist,
|
||||
static NestLoop *create_nestloop_node(NestPath *best_path, List *tlist,
|
||||
List *clauses, Plan *outer_node, List *outer_tlist,
|
||||
Plan *inner_node, List *inner_tlist);
|
||||
static MergeJoin *create_mergejoin_node(MergePath *best_path, List *tlist,
|
||||
@@ -418,7 +418,7 @@ create_indexscan_node(IndexPath *best_path,
|
||||
*****************************************************************************/
|
||||
|
||||
static NestLoop *
|
||||
create_nestloop_node(NestPath * best_path,
|
||||
create_nestloop_node(NestPath *best_path,
|
||||
List *tlist,
|
||||
List *clauses,
|
||||
Plan *outer_node,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.30 1999/05/25 16:09:36 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.31 1999/05/25 22:41:39 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -40,7 +40,7 @@
|
||||
extern int Quiet;
|
||||
|
||||
static void add_restrict_and_join_to_rel(Query *root, List *clause);
|
||||
static void add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo,
|
||||
static void add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo,
|
||||
Relids join_relids);
|
||||
static void add_vars_to_targetlist(Query *root, List *vars, Relids join_relids);
|
||||
|
||||
@@ -240,7 +240,7 @@ add_restrict_and_join_to_rel(Query *root, List *clause)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo,
|
||||
add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo,
|
||||
Relids join_relids)
|
||||
{
|
||||
List *join_relid;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.47 1999/05/25 16:09:39 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.48 1999/05/25 22:41:41 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
static void set_join_tlist_references(Join *join);
|
||||
static void set_nonamescan_tlist_references(SeqScan *nonamescan);
|
||||
static void set_noname_tlist_references(Noname * noname);
|
||||
static void set_noname_tlist_references(Noname *noname);
|
||||
static Node *replace_clause_joinvar_refs(Node *clause,
|
||||
List *outer_tlist,
|
||||
List *inner_tlist);
|
||||
@@ -161,7 +161,7 @@ set_nonamescan_tlist_references(SeqScan *nonamescan)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
set_noname_tlist_references(Noname * noname)
|
||||
set_noname_tlist_references(Noname *noname)
|
||||
{
|
||||
Plan *source = ((Plan *) noname)->lefttree;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.34 1999/05/25 16:09:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.35 1999/05/25 22:41:46 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -369,7 +369,7 @@ pull_constant_clauses(List *quals, List **constantQual)
|
||||
*
|
||||
*/
|
||||
void
|
||||
clause_get_relids_vars(Node *clause, Relids * relids, List **vars)
|
||||
clause_get_relids_vars(Node *clause, Relids *relids, List **vars)
|
||||
{
|
||||
List *clvars = pull_var_clause(clause);
|
||||
List *var_list = NIL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.15 1999/05/25 16:09:53 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.16 1999/05/25 22:41:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ static List *find_secondary_index(Query *root, Oid relid);
|
||||
*
|
||||
*/
|
||||
List *
|
||||
find_relation_indices(Query *root, RelOptInfo * rel)
|
||||
find_relation_indices(Query *root, RelOptInfo *rel)
|
||||
{
|
||||
if (rel->indexed)
|
||||
return find_secondary_index(root, lfirsti(rel->relids));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.20 1999/05/25 16:09:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.21 1999/05/25 22:41:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ joininfo_member(List *join_relids, List *joininfo_list)
|
||||
*
|
||||
*/
|
||||
JoinInfo *
|
||||
find_joininfo_node(RelOptInfo * this_rel, Relids join_relids)
|
||||
find_joininfo_node(RelOptInfo *this_rel, Relids join_relids)
|
||||
{
|
||||
JoinInfo *joininfo = joininfo_member(join_relids,
|
||||
this_rel->joininfo);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.20 1999/05/25 16:09:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.21 1999/05/25 22:41:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ static bool equal_indexkey_var(int index_key, Var *var);
|
||||
*
|
||||
*/
|
||||
bool
|
||||
match_indexkey_operand(int indexkey, Var *operand, RelOptInfo * rel)
|
||||
match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel)
|
||||
{
|
||||
if (IsA(operand, Var) &&
|
||||
(lfirsti(rel->relids) == operand->varno) &&
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.41 1999/05/25 16:09:58 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.42 1999/05/25 22:41:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ path_is_cheaper(Path *path1, Path *path2)
|
||||
*
|
||||
*/
|
||||
Path *
|
||||
set_cheapest(RelOptInfo * parent_rel, List *pathlist)
|
||||
set_cheapest(RelOptInfo *parent_rel, List *pathlist)
|
||||
{
|
||||
List *p;
|
||||
Path *cheapest_so_far;
|
||||
@@ -99,7 +99,7 @@ set_cheapest(RelOptInfo * parent_rel, List *pathlist)
|
||||
*
|
||||
*/
|
||||
List *
|
||||
add_pathlist(RelOptInfo * parent_rel, List *unique_paths, List *new_paths)
|
||||
add_pathlist(RelOptInfo *parent_rel, List *unique_paths, List *new_paths)
|
||||
{
|
||||
List *p1;
|
||||
|
||||
@@ -278,7 +278,7 @@ better_path(Path *new_path, List *unique_paths, bool *is_new)
|
||||
*
|
||||
*/
|
||||
Path *
|
||||
create_seqscan_path(RelOptInfo * rel)
|
||||
create_seqscan_path(RelOptInfo *rel)
|
||||
{
|
||||
int relid = 0;
|
||||
|
||||
@@ -326,8 +326,8 @@ create_seqscan_path(RelOptInfo * rel)
|
||||
*/
|
||||
IndexPath *
|
||||
create_index_path(Query *root,
|
||||
RelOptInfo * rel,
|
||||
RelOptInfo * index,
|
||||
RelOptInfo *rel,
|
||||
RelOptInfo *index,
|
||||
List *restriction_clauses,
|
||||
bool is_join_scan)
|
||||
{
|
||||
@@ -473,8 +473,8 @@ create_index_path(Query *root,
|
||||
*
|
||||
*/
|
||||
NestPath *
|
||||
create_nestloop_path(RelOptInfo * joinrel,
|
||||
RelOptInfo * outer_rel,
|
||||
create_nestloop_path(RelOptInfo *joinrel,
|
||||
RelOptInfo *outer_rel,
|
||||
Path *outer_path,
|
||||
Path *inner_path,
|
||||
List *pathkeys)
|
||||
@@ -541,7 +541,7 @@ create_nestloop_path(RelOptInfo * joinrel,
|
||||
*
|
||||
*/
|
||||
MergePath *
|
||||
create_mergejoin_path(RelOptInfo * joinrel,
|
||||
create_mergejoin_path(RelOptInfo *joinrel,
|
||||
int outersize,
|
||||
int innersize,
|
||||
int outerwidth,
|
||||
@@ -604,7 +604,7 @@ create_mergejoin_path(RelOptInfo * joinrel,
|
||||
*
|
||||
*/
|
||||
HashPath *
|
||||
create_hashjoin_path(RelOptInfo * joinrel,
|
||||
create_hashjoin_path(RelOptInfo *joinrel,
|
||||
int outersize,
|
||||
int innersize,
|
||||
int outerwidth,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.3 1999/05/25 16:10:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.4 1999/05/25 22:41:50 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -27,7 +27,7 @@
|
||||
*
|
||||
*/
|
||||
bool
|
||||
valid_or_clause(RestrictInfo * restrictinfo)
|
||||
valid_or_clause(RestrictInfo *restrictinfo)
|
||||
{
|
||||
if (restrictinfo != NULL &&
|
||||
!single_node((Node *) restrictinfo->clause) &&
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.32 1999/05/25 16:10:03 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.33 1999/05/25 22:41:51 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -93,7 +93,7 @@ matching_tlist_var(Var *var, List *targetlist)
|
||||
* CREATES: new var_node iff no matching var_node exists in targetlist
|
||||
*/
|
||||
void
|
||||
add_var_to_tlist(RelOptInfo * rel, Var *var)
|
||||
add_var_to_tlist(RelOptInfo *rel, Var *var)
|
||||
{
|
||||
Expr *oldvar;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user