1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Used modified version of indent that understands over 100 typedefs.

This commit is contained in:
Bruce Momjian
1997-09-08 21:56:23 +00:00
parent 075cede748
commit 59f6a57e59
413 changed files with 4472 additions and 4460 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.12 1997/09/08 02:24:11 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.13 1997/09/08 21:44:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -43,8 +43,8 @@ bool _use_geqo_ = false;
int32 _use_geqo_rels_ = GEQO_RELS;
static void find_rel_paths(Query * root, List * rels);
static List *find_join_paths(Query * root, List * outer_rels, int levels_left);
static void find_rel_paths(Query *root, List *rels);
static List *find_join_paths(Query *root, List *outer_rels, int levels_left);
/*
* find-paths--
@ -54,7 +54,7 @@ static List *find_join_paths(Query * root, List * outer_rels, int levels_left);
* 'rels' is the list of single relation entries appearing in the query
*/
List *
find_paths(Query * root, List * rels)
find_paths(Query *root, List *rels)
{
int levels_left;
@ -102,7 +102,7 @@ find_paths(Query * root, List * rels)
* MODIFIES: rels
*/
static void
find_rel_paths(Query * root, List * rels)
find_rel_paths(Query *root, List *rels)
{
List *temp;
Rel *rel;
@ -172,7 +172,7 @@ find_rel_paths(Query * root, List * rels)
* the result of joining all the original relations togehter.
*/
static List *
find_join_paths(Query * root, List * outer_rels, int levels_left)
find_join_paths(Query *root, List *outer_rels, int levels_left)
{
List *x;
List *new_rels;
@ -281,10 +281,10 @@ find_join_paths(Query * root, List * outer_rels, int levels_left)
#ifdef OPTIMIZER_DEBUG
static void
print_joinclauses(Query * root, List * clauses)
print_joinclauses(Query *root, List *clauses)
{
List *l;
extern void print_expr(Node * expr, List * rtable); /* in print.c */
extern void print_expr(Node *expr, List *rtable); /* in print.c */
foreach(l, clauses)
{
@ -297,7 +297,7 @@ print_joinclauses(Query * root, List * clauses)
}
static void
print_path(Query * root, Path * path, int indent)
print_path(Query *root, Path *path, int indent)
{
char *ptype = NULL;
JoinPath *jp;
@ -404,7 +404,7 @@ print_path(Query * root, Path * path, int indent)
}
static void
debug_print_rel(Query * root, Rel * rel)
debug_print_rel(Query *root, Rel *rel)
{
List *l;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.3 1997/09/08 02:24:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.4 1997/09/08 21:44:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -31,7 +31,7 @@
#include "utils/elog.h"
#include "utils/lsyscache.h"
static Cost compute_selec(Query * root, List * clauses, List * or_selectivities);
static Cost compute_selec(Query *root, List *clauses, List *or_selectivities);
/****************************************************************************
* ROUTINES TO SET CLAUSE SELECTIVITIES
@ -47,7 +47,7 @@ static Cost compute_selec(Query * root, List * clauses, List * or_selectivities)
*
*/
void
set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity)
set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity)
{
List *temp;
CInfo *clausenode;
@ -71,7 +71,7 @@ set_clause_selectivities(List * clauseinfo_list, Cost new_selectivity)
* Returns a flonum corresponding to the selectivity of 'clauseinfo-list'.
*/
Cost
product_selec(List * clauseinfo_list)
product_selec(List *clauseinfo_list)
{
Cost result = 1.0;
@ -99,7 +99,7 @@ product_selec(List * clauseinfo_list)
* slots.
*/
void
set_rest_relselec(Query * root, List * rel_list)
set_rest_relselec(Query *root, List *rel_list)
{
Rel *rel;
List *x;
@ -120,7 +120,7 @@ set_rest_relselec(Query * root, List * rel_list)
*
*/
void
set_rest_selec(Query * root, List * clauseinfo_list)
set_rest_selec(Query *root, List *clauseinfo_list)
{
List *temp = NIL;
CInfo *clausenode = (CInfo *) NULL;
@ -163,7 +163,7 @@ set_rest_selec(Query * root, List * clauseinfo_list)
*
*/
Cost
compute_clause_selec(Query * root, Node * clause, List * or_selectivities)
compute_clause_selec(Query *root, Node *clause, List *or_selectivities)
{
if (!is_opclause(clause))
{
@ -223,7 +223,7 @@ compute_clause_selec(Query * root, Node * clause, List * or_selectivities)
*
*/
static Cost
compute_selec(Query * root, List * clauses, List * or_selectivities)
compute_selec(Query *root, List *clauses, List *or_selectivities)
{
Cost s1 = 0;
List *clause = lfirst(clauses);

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.18 1997/09/08 02:24:18 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.19 1997/09/08 21:44:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -39,9 +39,9 @@
extern int NBuffers;
static int compute_attribute_width(TargetEntry * tlistentry);
static int compute_attribute_width(TargetEntry *tlistentry);
static double base_log(double x, double b);
static int compute_targetlist_width(List * targetlist);
static int compute_targetlist_width(List *targetlist);
int _disable_cost_ = 30000000;
@ -177,7 +177,7 @@ cost_index(Oid indexid,
*
*/
Cost
cost_sort(List * keys, int tuples, int width, bool noread)
cost_sort(List *keys, int tuples, int width, bool noread)
{
Cost temp = 0;
int npages = page_size(tuples, width);
@ -278,8 +278,8 @@ cost_nestloop(Cost outercost,
Cost
cost_mergesort(Cost outercost,
Cost innercost,
List * outersortkeys,
List * innersortkeys,
List *outersortkeys,
List *innersortkeys,
int outersize,
int innersize,
int outerwidth,
@ -316,8 +316,8 @@ cost_mergesort(Cost outercost,
Cost
cost_hashjoin(Cost outercost,
Cost innercost,
List * outerkeys,
List * innerkeys,
List *outerkeys,
List *innerkeys,
int outersize,
int innersize,
int outerwidth,
@ -363,7 +363,7 @@ cost_hashjoin(Cost outercost,
* Returns the size.
*/
int
compute_rel_size(Rel * rel)
compute_rel_size(Rel *rel)
{
Cost temp;
int temp1;
@ -390,7 +390,7 @@ compute_rel_size(Rel * rel)
* Returns the width of the tuple as a fixnum.
*/
int
compute_rel_width(Rel * rel)
compute_rel_width(Rel *rel)
{
return (compute_targetlist_width(get_actual_tlist(rel->targetlist)));
}
@ -402,7 +402,7 @@ compute_rel_width(Rel * rel)
* Returns the width of the tuple as a fixnum.
*/
static int
compute_targetlist_width(List * targetlist)
compute_targetlist_width(List *targetlist)
{
List *temp_tl;
int tuple_width = 0;
@ -425,7 +425,7 @@ compute_targetlist_width(List * targetlist)
* Returns the width of the attribute as a fixnum.
*/
static int
compute_attribute_width(TargetEntry * tlistentry)
compute_attribute_width(TargetEntry *tlistentry)
{
int width = get_typlen(tlistentry->resdom->restype);
@ -442,7 +442,7 @@ compute_attribute_width(TargetEntry * tlistentry)
* Returns a fixnum.
*/
int
compute_joinrel_size(JoinPath * joinpath)
compute_joinrel_size(JoinPath *joinpath)
{
Cost temp = 1.0;
int temp1 = 0;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.3 1997/09/08 02:24:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.4 1997/09/08 21:44:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -20,7 +20,7 @@
#include "optimizer/clauses.h"
static HInfo *match_hashop_hashinfo(Oid hashop, List * hashinfo_list);
static HInfo *match_hashop_hashinfo(Oid hashop, List *hashinfo_list);
/*
* group-clauses-by-hashop--
@ -35,7 +35,7 @@ static HInfo *match_hashop_hashinfo(Oid hashop, List * hashinfo_list);
*
*/
List *
group_clauses_by_hashop(List * clauseinfo_list,
group_clauses_by_hashop(List *clauseinfo_list,
int inner_relid)
{
List *hashinfo_list = NIL;
@ -109,7 +109,7 @@ group_clauses_by_hashop(List * clauseinfo_list,
*
*/
static HInfo *
match_hashop_hashinfo(Oid hashop, List * hashinfo_list)
match_hashop_hashinfo(Oid hashop, List *hashinfo_list)
{
Oid key = 0;
HInfo *xhashinfo = (HInfo *) NULL;

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.10 1997/09/08 02:24:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.11 1997/09/08 21:44:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -47,42 +47,42 @@
static void
match_index_orclauses(Rel * rel, Rel * index, int indexkey,
int xclass, List * clauseinfo_list);
match_index_orclauses(Rel *rel, Rel *index, int indexkey,
int xclass, List *clauseinfo_list);
static bool
match_index_to_operand(int indexkey, Expr * operand,
Rel * rel, Rel * index);
match_index_to_operand(int indexkey, Expr *operand,
Rel *rel, Rel *index);
static List *
match_index_orclause(Rel * rel, Rel * index, int indexkey,
int xclass, List * or_clauses, List * other_matching_indices);
match_index_orclause(Rel *rel, Rel *index, int indexkey,
int xclass, List *or_clauses, List *other_matching_indices);
static List *
group_clauses_by_indexkey(Rel * rel, Rel * index,
int *indexkeys, Oid * classes, List * clauseinfo_list);
group_clauses_by_indexkey(Rel *rel, Rel *index,
int *indexkeys, Oid *classes, List *clauseinfo_list);
static List *
group_clauses_by_ikey_for_joins(Rel * rel, Rel * index,
int *indexkeys, Oid * classes, List * join_cinfo_list, List * restr_cinfo_list);
group_clauses_by_ikey_for_joins(Rel *rel, Rel *index,
int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list);
static CInfo *
match_clause_to_indexkey(Rel * rel, Rel * index, int indexkey,
int xclass, CInfo * clauseInfo, bool join);
match_clause_to_indexkey(Rel *rel, Rel *index, int indexkey,
int xclass, CInfo *clauseInfo, bool join);
static bool
pred_test(List * predicate_list, List * clauseinfo_list,
List * joininfo_list);
static bool one_pred_test(Expr * predicate, List * clauseinfo_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);
pred_test(List *predicate_list, List *clauseinfo_list,
List *joininfo_list);
static bool one_pred_test(Expr *predicate, List *clauseinfo_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(Rel * rel, Rel * index,
List * joininfo_list, List * clauseinfo_list);
indexable_joinclauses(Rel *rel, Rel *index,
List *joininfo_list, List *clauseinfo_list);
static List *
index_innerjoin(Query * root, Rel * rel,
List * clausegroup_list, Rel * index);
index_innerjoin(Query *root, Rel *rel,
List *clausegroup_list, Rel *index);
static List *
create_index_paths(Query * root, Rel * rel, Rel * index,
List * clausegroup_list, bool join);
static List *add_index_paths(List * indexpaths, List * new_indexpaths);
static bool function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index);
static bool SingleAttributeIndex(Rel * index);
create_index_paths(Query *root, Rel *rel, Rel *index,
List *clausegroup_list, bool join);
static List *add_index_paths(List *indexpaths, List *new_indexpaths);
static bool function_index_operand(Expr *funcOpnd, Rel *rel, Rel *index);
static bool SingleAttributeIndex(Rel *index);
/* If Spyros can use a constant PRS2_BOOL_TYPEID, I can use this */
#define BOOL_TYPEID ((Oid) 16)
@ -114,11 +114,11 @@ static bool SingleAttributeIndex(Rel * index);
*
*/
List *
find_index_paths(Query * root,
Rel * rel,
List * indices,
List * clauseinfo_list,
List * joininfo_list)
find_index_paths(Query *root,
Rel *rel,
List *indices,
List *clauseinfo_list,
List *joininfo_list)
{
List *scanclausegroups = NIL;
List *scanpaths = NIL;
@ -240,11 +240,11 @@ find_index_paths(Query * root,
*
*/
static void
match_index_orclauses(Rel * rel,
Rel * index,
match_index_orclauses(Rel *rel,
Rel *index,
int indexkey,
int xclass,
List * clauseinfo_list)
List *clauseinfo_list)
{
CInfo *clauseinfo = (CInfo *) NULL;
List *i = NIL;
@ -277,9 +277,9 @@ match_index_orclauses(Rel * rel,
*/
static bool
match_index_to_operand(int indexkey,
Expr * operand,
Rel * rel,
Rel * index)
Expr *operand,
Rel *rel,
Rel *index)
{
/*
@ -316,12 +316,12 @@ match_index_to_operand(int indexkey,
* match the third, g,h match the fourth, etc.
*/
static List *
match_index_orclause(Rel * rel,
Rel * index,
match_index_orclause(Rel *rel,
Rel *index,
int indexkey,
int xclass,
List * or_clauses,
List * other_matching_indices)
List *or_clauses,
List *other_matching_indices)
{
Node *clause = NULL;
List *matched_indices = other_matching_indices;
@ -398,11 +398,11 @@ match_index_orclause(Rel * rel,
*
*/
static List *
group_clauses_by_indexkey(Rel * rel,
Rel * index,
group_clauses_by_indexkey(Rel *rel,
Rel *index,
int *indexkeys,
Oid * classes,
List * clauseinfo_list)
Oid *classes,
List *clauseinfo_list)
{
List *curCinfo = NIL;
CInfo *matched_clause = (CInfo *) NULL;
@ -460,12 +460,12 @@ group_clauses_by_indexkey(Rel * rel,
*
*/
static List *
group_clauses_by_ikey_for_joins(Rel * rel,
Rel * index,
group_clauses_by_ikey_for_joins(Rel *rel,
Rel *index,
int *indexkeys,
Oid * classes,
List * join_cinfo_list,
List * restr_cinfo_list)
Oid *classes,
List *join_cinfo_list,
List *restr_cinfo_list)
{
List *curCinfo = NIL;
CInfo *matched_clause = (CInfo *) NULL;
@ -583,11 +583,11 @@ group_clauses_by_ikey_for_joins(Rel * rel,
*
*/
static CInfo *
match_clause_to_indexkey(Rel * rel,
Rel * index,
match_clause_to_indexkey(Rel *rel,
Rel *index,
int indexkey,
int xclass,
CInfo * clauseInfo,
CInfo *clauseInfo,
bool join)
{
Expr *clause = clauseInfo->clause;
@ -720,7 +720,7 @@ match_clause_to_indexkey(Rel * rel,
* successfully cnfify()-ed). --Nels, Jan '93
*/
static bool
pred_test(List * predicate_list, List * clauseinfo_list, List * joininfo_list)
pred_test(List *predicate_list, List *clauseinfo_list, List *joininfo_list)
{
List *pred,
*items,
@ -771,7 +771,7 @@ pred_test(List * predicate_list, List * clauseinfo_list, List * joininfo_list)
* expression.
*/
static bool
one_pred_test(Expr * predicate, List * clauseinfo_list)
one_pred_test(Expr *predicate, List *clauseinfo_list)
{
CInfo *clauseinfo;
List *item;
@ -794,7 +794,7 @@ one_pred_test(Expr * predicate, List * clauseinfo_list)
* expression.
*/
static bool
one_pred_clause_expr_test(Expr * predicate, Node * clause)
one_pred_clause_expr_test(Expr *predicate, Node *clause)
{
List *items,
*item;
@ -841,7 +841,7 @@ one_pred_clause_expr_test(Expr * predicate, Node * clause)
* expression for a simple restriction clause.
*/
static bool
one_pred_clause_test(Expr * predicate, Node * clause)
one_pred_clause_test(Expr *predicate, Node *clause)
{
List *items,
*item;
@ -923,7 +923,7 @@ StrategyNumber BT_implic_table[BTMaxStrategyNumber][BTMaxStrategyNumber] = {
* appropriate "RT_implic_table" array.
*/
static bool
clause_pred_clause_test(Expr * predicate, Node * clause)
clause_pred_clause_test(Expr *predicate, Node *clause)
{
Var *pred_var,
*clause_var;
@ -1121,8 +1121,8 @@ clause_pred_clause_test(Expr * predicate, Node * clause)
*
*/
static List *
indexable_joinclauses(Rel * rel, Rel * index,
List * joininfo_list, List * clauseinfo_list)
indexable_joinclauses(Rel *rel, Rel *index,
List *joininfo_list, List *clauseinfo_list)
{
JInfo *joininfo = (JInfo *) NULL;
List *cg_list = NIL;
@ -1166,7 +1166,7 @@ indexable_joinclauses(Rel * rel, Rel * index,
*/
#ifdef NOT_USED
static List *
extract_restrict_clauses(List * clausegroup)
extract_restrict_clauses(List *clausegroup)
{
List *restrict_cls = NIL;
List *l;
@ -1197,7 +1197,7 @@ extract_restrict_clauses(List * clausegroup)
*
*/
static List *
index_innerjoin(Query * root, Rel * rel, List * clausegroup_list, Rel * index)
index_innerjoin(Query *root, Rel *rel, List *clausegroup_list, Rel *index)
{
List *clausegroup = NIL;
List *cg_list = NIL;
@ -1282,10 +1282,10 @@ index_innerjoin(Query * root, Rel * rel, List * clausegroup_list, Rel * index)
*
*/
static List *
create_index_paths(Query * root,
Rel * rel,
Rel * index,
List * clausegroup_list,
create_index_paths(Query *root,
Rel *rel,
Rel *index,
List *clausegroup_list,
bool join)
{
List *clausegroup = NIL;
@ -1325,13 +1325,13 @@ create_index_paths(Query * root,
}
static List *
add_index_paths(List * indexpaths, List * new_indexpaths)
add_index_paths(List *indexpaths, List *new_indexpaths)
{
return append(indexpaths, new_indexpaths);
}
static bool
function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index)
function_index_operand(Expr *funcOpnd, Rel *rel, Rel *index)
{
Oid heapRelid = (Oid) lfirsti(rel->relids);
Func *function;
@ -1391,7 +1391,7 @@ function_index_operand(Expr * funcOpnd, Rel * rel, Rel * index)
}
static bool
SingleAttributeIndex(Rel * index)
SingleAttributeIndex(Rel *index)
{
/*

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.4 1997/09/08 02:24:22 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.5 1997/09/08 21:44:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -29,21 +29,21 @@
#include "optimizer/cost.h" /* for _enable_{hashjoin,
* _enable_mergesort} */
static Path *best_innerjoin(List * join_paths, List * outer_relid);
static Path *best_innerjoin(List *join_paths, List *outer_relid);
static List *
sort_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel,
List * mergeinfo_list);
sort_inner_and_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel,
List *mergeinfo_list);
static List *
match_unsorted_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel,
List * outerpath_list, Path * cheapest_inner, Path * best_innerjoin,
List * mergeinfo_list);
match_unsorted_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel,
List *outerpath_list, Path *cheapest_inner, Path *best_innerjoin,
List *mergeinfo_list);
static List *
match_unsorted_inner(Rel * joinrel, Rel * outerrel, Rel * innerrel,
List * innerpath_list, List * mergeinfo_list);
static bool EnoughMemoryForHashjoin(Rel * hashrel);
match_unsorted_inner(Rel *joinrel, Rel *outerrel, Rel *innerrel,
List *innerpath_list, List *mergeinfo_list);
static bool EnoughMemoryForHashjoin(Rel *hashrel);
static List *
hash_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel,
List * hashinfo_list);
hash_inner_and_outer(Rel *joinrel, Rel *outerrel, Rel *innerrel,
List *hashinfo_list);
/*
* find-all-join-paths--
@ -67,7 +67,7 @@ hash_inner_and_outer(Rel * joinrel, Rel * outerrel, Rel * innerrel,
* It does a destructive modification.
*/
void
find_all_join_paths(Query * root, List * joinrels)
find_all_join_paths(Query *root, List *joinrels)
{
List *mergeinfo_list = NIL;
List *hashinfo_list = NIL;
@ -206,7 +206,7 @@ find_all_join_paths(Query * root, List * joinrels)
* Returns the pathnode of the selected path.
*/
static Path *
best_innerjoin(List * join_paths, List * outer_relids)
best_innerjoin(List *join_paths, List *outer_relids)
{
Path *cheapest = (Path *) NULL;
List *join_path;
@ -240,10 +240,10 @@ best_innerjoin(List * join_paths, List * outer_relids)
* Returns a list of mergesort paths.
*/
static List *
sort_inner_and_outer(Rel * joinrel,
Rel * outerrel,
Rel * innerrel,
List * mergeinfo_list)
sort_inner_and_outer(Rel *joinrel,
Rel *outerrel,
Rel *innerrel,
List *mergeinfo_list)
{
List *ms_list = NIL;
MInfo *xmergeinfo = (MInfo *) NULL;
@ -318,13 +318,13 @@ sort_inner_and_outer(Rel * joinrel,
* Returns a list of possible join path nodes.
*/
static List *
match_unsorted_outer(Rel * joinrel,
Rel * outerrel,
Rel * innerrel,
List * outerpath_list,
Path * cheapest_inner,
Path * best_innerjoin,
List * mergeinfo_list)
match_unsorted_outer(Rel *joinrel,
Rel *outerrel,
Rel *innerrel,
List *outerpath_list,
Path *cheapest_inner,
Path *best_innerjoin,
List *mergeinfo_list)
{
Path *outerpath = (Path *) NULL;
List *jp_list = NIL;
@ -485,11 +485,11 @@ match_unsorted_outer(Rel * joinrel,
* Returns a list of possible merge paths.
*/
static List *
match_unsorted_inner(Rel * joinrel,
Rel * outerrel,
Rel * innerrel,
List * innerpath_list,
List * mergeinfo_list)
match_unsorted_inner(Rel *joinrel,
Rel *outerrel,
Rel *innerrel,
List *innerpath_list,
List *mergeinfo_list)
{
Path *innerpath = (Path *) NULL;
List *mp_list = NIL;
@ -583,7 +583,7 @@ match_unsorted_inner(Rel * joinrel,
}
static bool
EnoughMemoryForHashjoin(Rel * hashrel)
EnoughMemoryForHashjoin(Rel *hashrel)
{
int ntuples;
int tupsize;
@ -617,10 +617,10 @@ EnoughMemoryForHashjoin(Rel * hashrel)
* Returns a list of hashjoin paths.
*/
static List *
hash_inner_and_outer(Rel * joinrel,
Rel * outerrel,
Rel * innerrel,
List * hashinfo_list)
hash_inner_and_outer(Rel *joinrel,
Rel *outerrel,
Rel *innerrel,
List *hashinfo_list)
{
HInfo *xhashinfo = (HInfo *) NULL;
List *hjoin_list = NIL;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.6 1997/09/08 02:24:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.7 1997/09/08 21:45:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -31,19 +31,19 @@ bool _use_right_sided_plans_ = false;
#endif
static List *find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list);
static List *find_clauseless_joins(Rel * outer_rel, List * inner_rels);
static Rel *init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo);
static List *find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list);
static List *find_clauseless_joins(Rel *outer_rel, List *inner_rels);
static Rel *init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo);
static List *
new_join_tlist(List * tlist, List * other_relids,
new_join_tlist(List *tlist, List *other_relids,
int first_resdomno);
static List *new_joininfo_list(List * joininfo_list, List * join_relids);
static void add_superrels(Rel * rel, Rel * super_rel);
static bool nonoverlap_rels(Rel * rel1, Rel * rel2);
static bool nonoverlap_sets(List * s1, List * s2);
static List *new_joininfo_list(List *joininfo_list, List *join_relids);
static void add_superrels(Rel *rel, Rel *super_rel);
static bool nonoverlap_rels(Rel *rel1, Rel *rel2);
static bool nonoverlap_sets(List *s1, List *s2);
static void
set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel,
JInfo * jinfo);
set_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel,
JInfo *jinfo);
/*
* find-join-rels--
@ -59,7 +59,7 @@ set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel,
* Returns a list of rel nodes corresponding to the new join relations.
*/
List *
find_join_rels(Query * root, List * outer_rels)
find_join_rels(Query *root, List *outer_rels)
{
List *joins = NIL;
List *join_list = NIL;
@ -97,7 +97,7 @@ find_join_rels(Query * root, List * outer_rels)
* Returns a list of new join relations.
*/
static List *
find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list)
find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list)
{
List *join_list = NIL;
List *i = NIL;
@ -158,7 +158,7 @@ find_clause_joins(Query * root, Rel * outer_rel, List * joininfo_list)
* Returns a list of new join relations.
*/
static List *
find_clauseless_joins(Rel * outer_rel, List * inner_rels)
find_clauseless_joins(Rel *outer_rel, List *inner_rels)
{
Rel *inner_rel;
List *t_list = NIL;
@ -193,7 +193,7 @@ find_clauseless_joins(Rel * outer_rel, List * inner_rels)
* Returns the new join relation node.
*/
static Rel *
init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo)
init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo)
{
Rel *joinrel = makeNode(Rel);
List *joinrel_joininfo_list = NIL;
@ -273,8 +273,8 @@ init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo)
* Returns the new target list.
*/
static List *
new_join_tlist(List * tlist,
List * other_relids,
new_join_tlist(List *tlist,
List *other_relids,
int first_resdomno)
{
int resdomno = first_resdomno - 1;
@ -323,7 +323,7 @@ new_join_tlist(List * tlist,
* Returns a list of joininfo nodes, new and old.
*/
static List *
new_joininfo_list(List * joininfo_list, List * join_relids)
new_joininfo_list(List *joininfo_list, List *join_relids)
{
List *current_joininfo_list = NIL;
List *new_otherrels = NIL;
@ -387,7 +387,7 @@ new_joininfo_list(List * joininfo_list, List * join_relids)
* Modifies the joininfo field of appropriate rel nodes.
*/
void
add_new_joininfos(Query * root, List * joinrels, List * outerrels)
add_new_joininfos(Query *root, List *joinrels, List *outerrels)
{
List *xjoinrel = NIL;
List *xrelid = NIL;
@ -487,7 +487,7 @@ add_new_joininfos(Query * root, List * joinrels, List * outerrels)
* Returns the list of final join relations.
*/
List *
final_join_rels(List * join_rel_list)
final_join_rels(List *join_rel_list)
{
List *xrel = NIL;
List *temp = NIL;
@ -533,7 +533,7 @@ final_join_rels(List * join_rel_list)
* Modifies the superrels field of rel
*/
static void
add_superrels(Rel * rel, Rel * super_rel)
add_superrels(Rel *rel, Rel *super_rel)
{
rel->superrels = lappend(rel->superrels, super_rel);
}
@ -548,13 +548,13 @@ add_superrels(Rel * rel, Rel * super_rel)
* Returns non-nil if rel1 and rel2 do not overlap.
*/
static bool
nonoverlap_rels(Rel * rel1, Rel * rel2)
nonoverlap_rels(Rel *rel1, Rel *rel2)
{
return (nonoverlap_sets(rel1->relids, rel2->relids));
}
static bool
nonoverlap_sets(List * s1, List * s2)
nonoverlap_sets(List *s1, List *s2)
{
List *x = NIL;
@ -569,7 +569,7 @@ nonoverlap_sets(List * s1, List * s2)
}
static void
set_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel, JInfo * jinfo)
set_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel, JInfo *jinfo)
{
int ntuples;
float selec;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.3 1997/09/08 02:24:23 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.4 1997/09/08 21:45:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -27,18 +27,18 @@
static int
match_pathkey_joinkeys(List * pathkey, List * joinkeys,
match_pathkey_joinkeys(List *pathkey, List *joinkeys,
int which_subkey);
static bool
every_func(List * joinkeys, List * pathkey,
every_func(List *joinkeys, List *pathkey,
int which_subkey);
static List *
new_join_pathkey(List * subkeys,
List * considered_subkeys, List * join_rel_tlist,
List * joinclauses);
new_join_pathkey(List *subkeys,
List *considered_subkeys, List *join_rel_tlist,
List *joinclauses);
static List *
new_matching_subkeys(Var * subkey, List * considered_subkeys,
List * join_rel_tlist, List * joinclauses);
new_matching_subkeys(Var *subkey, List *considered_subkeys,
List *join_rel_tlist, List *joinclauses);
/****************************************************************************
* KEY COMPARISONS
@ -74,11 +74,11 @@ new_matching_subkeys(Var * subkey, List * considered_subkeys,
* in matchedJoinClausesPtr. - ay 11/94
*/
List *
match_pathkeys_joinkeys(List * pathkeys,
List * joinkeys,
List * joinclauses,
match_pathkeys_joinkeys(List *pathkeys,
List *joinkeys,
List *joinclauses,
int which_subkey,
List ** matchedJoinClausesPtr)
List **matchedJoinClausesPtr)
{
List *matched_joinkeys = NIL;
List *matched_joinclauses = NIL;
@ -127,8 +127,8 @@ match_pathkeys_joinkeys(List * pathkeys,
* outer or inner subkey matches any subkey of 'pathkey'.
*/
static int
match_pathkey_joinkeys(List * pathkey,
List * joinkeys,
match_pathkey_joinkeys(List *pathkey,
List *joinkeys,
int which_subkey)
{
Var *path_subkey;
@ -175,7 +175,7 @@ match_pathkey_joinkeys(List * pathkey,
* Returns the matching path node if one exists, nil otherwise.
*/
static bool
every_func(List * joinkeys, List * pathkey, int which_subkey)
every_func(List *joinkeys, List *pathkey, int which_subkey)
{
JoinKey *xjoinkey;
Var *temp;
@ -212,9 +212,9 @@ every_func(List * joinkeys, List * pathkey, int which_subkey)
* find the cheapest path that matches the join keys
*/
Path *
match_paths_joinkeys(List * joinkeys,
PathOrder * ordering,
List * paths,
match_paths_joinkeys(List *joinkeys,
PathOrder *ordering,
List *paths,
int which_subkey)
{
Path *matched_path = NULL;
@ -264,8 +264,8 @@ match_paths_joinkeys(List * joinkeys,
* [I've no idea why they have to be list of lists. Should be fixed. -ay 12/94]
*/
List *
extract_path_keys(List * joinkeys,
List * tlist,
extract_path_keys(List *joinkeys,
List *tlist,
int which_subkey)
{
List *pathkeys = NIL;
@ -326,9 +326,9 @@ extract_path_keys(List * joinkeys,
*
*/
List *
new_join_pathkeys(List * outer_pathkeys,
List * join_rel_tlist,
List * joinclauses)
new_join_pathkeys(List *outer_pathkeys,
List *join_rel_tlist,
List *joinclauses)
{
List *outer_pathkey = NIL;
List *t_list = NIL;
@ -366,10 +366,10 @@ new_join_pathkeys(List * outer_pathkeys,
*
*/
static List *
new_join_pathkey(List * subkeys,
List * considered_subkeys,
List * join_rel_tlist,
List * joinclauses)
new_join_pathkey(List *subkeys,
List *considered_subkeys,
List *join_rel_tlist,
List *joinclauses)
{
List *t_list = NIL;
Var *subkey;
@ -426,10 +426,10 @@ new_join_pathkey(List * subkeys,
*
*/
static List *
new_matching_subkeys(Var * subkey,
List * considered_subkeys,
List * join_rel_tlist,
List * joinclauses)
new_matching_subkeys(Var *subkey,
List *considered_subkeys,
List *join_rel_tlist,
List *joinclauses)
{
Expr *joinclause = NULL;
List *t_list = NIL;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.3 1997/09/08 02:24:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.4 1997/09/08 21:45:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -34,7 +34,7 @@
*
*/
List *
group_clauses_by_order(List * clauseinfo_list,
group_clauses_by_order(List *clauseinfo_list,
int inner_relid)
{
List *mergeinfo_list = NIL;
@ -106,7 +106,7 @@ group_clauses_by_order(List * clauseinfo_list,
*
*/
MInfo *
match_order_mergeinfo(PathOrder * ordering, List * mergeinfo_list)
match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list)
{
MergeOrder *xmergeorder;
List *xmergeinfo = NIL;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.3 1997/09/08 02:24:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.4 1997/09/08 21:45:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -32,12 +32,12 @@
static void
best_or_subclause_indices(Query * root, Rel * rel, List * subclauses,
List * indices, List * examined_indexids, Cost subcost, List * selectivities,
List ** indexids, Cost * cost, List ** selecs);
best_or_subclause_indices(Query *root, Rel *rel, List *subclauses,
List *indices, List *examined_indexids, Cost subcost, List *selectivities,
List **indexids, Cost *cost, List **selecs);
static void
best_or_subclause_index(Query * root, Rel * rel, Expr * subclause,
List * indices, int *indexid, Cost * cost, Cost * selec);
best_or_subclause_index(Query *root, Rel *rel, Expr *subclause,
List *indices, int *indexid, Cost *cost, Cost *selec);
/*
@ -51,8 +51,8 @@ best_or_subclause_index(Query * root, Rel * rel, Expr * subclause,
*
*/
List *
create_or_index_paths(Query * root,
Rel * rel, List * clauses)
create_or_index_paths(Query *root,
Rel *rel, List *clauses)
{
List *t_list = NIL;
@ -158,16 +158,16 @@ create_or_index_paths(Query * root,
* 'cost' is a flonum, and 's' is a flonum.
*/
static void
best_or_subclause_indices(Query * root,
Rel * rel,
List * subclauses,
List * indices,
List * examined_indexids,
best_or_subclause_indices(Query *root,
Rel *rel,
List *subclauses,
List *indices,
List *examined_indexids,
Cost subcost,
List * selectivities,
List ** indexids, /* return value */
Cost * cost, /* return value */
List ** selecs) /* return value */
List *selectivities,
List **indexids, /* return value */
Cost *cost, /* return value */
List **selecs) /* return value */
{
if (subclauses == NIL)
{
@ -213,13 +213,13 @@ best_or_subclause_indices(Query * root,
*
*/
static void
best_or_subclause_index(Query * root,
Rel * rel,
Expr * subclause,
List * indices,
best_or_subclause_index(Query *root,
Rel *rel,
Expr *subclause,
List *indices,
int *retIndexid, /* return value */
Cost * retCost, /* return value */
Cost * retSelec) /* return value */
Cost *retCost, /* return value */
Cost *retSelec) /* return value */
{
if (indices != NIL)
{

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.5 1997/09/08 20:56:03 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.6 1997/09/08 21:45:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -56,7 +56,7 @@
static void
xfunc_predmig(JoinPath pathnode, Stream streamroot,
Stream laststream, bool * progressp);
Stream laststream, bool *progressp);
static bool xfunc_series_llel(Stream stream);
static bool xfunc_llel_chains(Stream root, Stream bottom);
static Stream xfunc_complete_stream(Stream stream);
@ -78,7 +78,7 @@ static int xfunc_stream_compare(void *arg1, void *arg2);
static bool xfunc_check_stream(Stream node);
static bool xfunc_in_stream(Stream node, Stream stream);
/* ----------------- MAIN FUNCTIONS ------------------------ */
/* ----------------- MAIN FUNCTIONS ------------------------ */
/*
** xfunc_do_predmig
** wrapper for Predicate Migration. It calls xfunc_predmig until no
@ -120,7 +120,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */
Stream laststream,/* for recursive calls -- these are the
* root of the stream under construction,
* and the lowest node created so far */
bool * progressp)
bool *progressp)
{
Stream newstream;
@ -410,7 +410,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
** the same groupcost and groupsel (since they're in the same group!)
*/
static void
xfunc_form_groups(Query * queryInfo, Stream root, Stream bottom)
xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom)
{
Stream temp,
parent;
@ -495,7 +495,7 @@ xfunc_form_groups(Query * queryInfo, Stream root, Stream bottom)
}
/* ------------------- UTILITY FUNCTIONS ------------------------- */
/* ------------------- UTILITY FUNCTIONS ------------------------- */
/*
** xfunc_free_stream --
@ -765,7 +765,7 @@ xfunc_stream_compare(void *arg1, void *arg2)
}
}
/* ------------------ DEBUGGING ROUTINES ---------------------------- */
/* ------------------ DEBUGGING ROUTINES ---------------------------- */
/*
** Make sure all pointers in stream make sense. Make sure no joins are

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.5 1997/09/08 02:24:27 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.6 1997/09/08 21:45:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -24,7 +24,7 @@
#include "utils/elog.h"
static List *prune_joinrel(Rel * rel, List * other_rels);
static List *prune_joinrel(Rel *rel, List *other_rels);
/*
* prune-joinrels--
@ -35,7 +35,7 @@ static List *prune_joinrel(Rel * rel, List * other_rels);
*
*/
List *
prune_joinrels(List * rel_list)
prune_joinrels(List *rel_list)
{
List *temp_list = NIL;
@ -60,7 +60,7 @@ prune_joinrels(List * rel_list)
*
*/
static List *
prune_joinrel(Rel * rel, List * other_rels)
prune_joinrel(Rel *rel, List *other_rels)
{
List *i = NIL;
List *t_list = NIL;
@ -97,7 +97,7 @@ prune_joinrel(Rel * rel, List * other_rels)
*
*/
void
prune_rel_paths(List * rel_list)
prune_rel_paths(List *rel_list)
{
List *x = NIL;
List *y = NIL;
@ -140,7 +140,7 @@ prune_rel_paths(List * rel_list)
*
*/
Path *
prune_rel_path(Rel * rel, Path * unorderedpath)
prune_rel_path(Rel *rel, Path *unorderedpath)
{
Path *cheapest = set_cheapest(rel, rel->pathlist);
@ -171,7 +171,7 @@ prune_rel_path(Rel * rel, Path * unorderedpath)
* Returns one pruned rel node list
*/
List *
merge_joinrels(List * rel_list1, List * rel_list2)
merge_joinrels(List *rel_list1, List *rel_list2)
{
List *xrel = NIL;
@ -197,7 +197,7 @@ merge_joinrels(List * rel_list1, List * rel_list2)
* Returns a new list of rel nodes
*/
List *
prune_oldrels(List * old_rels)
prune_oldrels(List *old_rels)
{
Rel *rel;
List *joininfo_list,

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.5 1997/09/08 02:24:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.6 1997/09/08 21:45:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -47,8 +47,8 @@
/* local funcs */
static int
xfunc_card_unreferenced(Query * queryInfo,
Expr * clause, Relid referenced);
xfunc_card_unreferenced(Query *queryInfo,
Expr *clause, Relid referenced);
*/
@ -146,11 +146,11 @@ xfunc_trypullup(Rel rel)
** XFUNC_JOINPRD if a secondary join predicate is to be pulled up
*/
int
xfunc_shouldpull(Query * queryInfo,
xfunc_shouldpull(Query *queryInfo,
Path childpath,
JoinPath parentpath,
int whichchild,
CInfo * maxcinfopt) /* Out: pointer to clause to
CInfo *maxcinfopt) /* Out: pointer to clause to
* pullup */
{
LispValue clauselist,
@ -231,8 +231,8 @@ xfunc_shouldpull(Query * queryInfo,
|| (!is_join(childpath)
&& (whichchild == INNER)
&& IsA(parentpath, JoinPath)
&& !IsA(parentpath, HashPath)
&& !IsA(parentpath, MergePath)))))
&&!IsA(parentpath, HashPath)
&&!IsA(parentpath, MergePath)))))
{
*maxcinfopt = maxcinfo;
@ -267,7 +267,7 @@ xfunc_shouldpull(Query * queryInfo,
** Now returns a pointer to the new pulled-up CInfo. -- JMH, 11/18/92
*/
CInfo
xfunc_pullup(Query * queryInfo,
xfunc_pullup(Query *queryInfo,
Path childpath,
JoinPath parentpath,
CInfo cinfo, /* clause to pull up */
@ -360,7 +360,7 @@ xfunc_pullup(Query * queryInfo,
** calculate (selectivity-1)/cost.
*/
Cost
xfunc_rank(Query * queryInfo, LispValue clause)
xfunc_rank(Query *queryInfo, LispValue clause)
{
Cost selec = compute_clause_selec(queryInfo, clause, LispNil);
Cost cost = xfunc_expense(queryInfo, clause);
@ -379,7 +379,7 @@ xfunc_rank(Query * queryInfo, LispValue clause)
** referenced in the clause.
*/
Cost
xfunc_expense(Query * queryInfo, clause)
xfunc_expense(Query *queryInfo, clause)
LispValue clause;
{
Cost cost = xfunc_local_expense(clause);
@ -400,7 +400,7 @@ LispValue clause;
** Find global expense of a join clause
*/
Cost
xfunc_join_expense(Query * queryInfo, JoinPath path, int whichchild)
xfunc_join_expense(Query *queryInfo, JoinPath path, int whichchild)
{
LispValue primjoinclause = xfunc_primary_join(path);
@ -435,7 +435,7 @@ xfunc_local_expense(LispValue clause)
LispValue tmpclause;
/* First handle the base case */
if (IsA(clause, Const) || IsA(clause, Var) || IsA(clause, Param))
if (IsA(clause, Const) ||IsA(clause, Var) ||IsA(clause, Param))
return (0);
/* now other stuff */
else if (IsA(clause, Iter))
@ -519,7 +519,7 @@ xfunc_func_expense(LispValue node, LispValue args)
LispValue tmpplan;
List planlist;
if (IsA(node, Oper) || get_func_planlist((Func) node) == LispNil)
if (IsA(node, Oper) ||get_func_planlist((Func) node) == LispNil)
{
Oid *argOidVect; /* vector of argtypes */
char *pq_src; /* text of PQ function */
@ -735,7 +735,7 @@ exit:
** for joins).
*/
static Count
xfunc_card_unreferenced(Query * queryInfo,
xfunc_card_unreferenced(Query *queryInfo,
LispValue clause, Relid referenced)
{
Relid unreferenced,
@ -763,7 +763,7 @@ xfunc_card_unreferenced(Query * queryInfo,
** multiple together cardinalities of a list relations.
*/
Count
xfunc_card_product(Query * queryInfo, Relid relids)
xfunc_card_product(Query *queryInfo, Relid relids)
{
LispValue cinfonode;
LispValue temp;
@ -813,7 +813,7 @@ xfunc_find_references(LispValue clause)
/* Base cases */
if (IsA(clause, Var))
return (lispCons(lfirst(get_varid((Var) clause)), LispNil));
else if (IsA(clause, Const) || IsA(clause, Param))
else if (IsA(clause, Const) ||IsA(clause, Param))
return ((List) LispNil);
/* recursion */
@ -929,7 +929,7 @@ xfunc_primary_join(JoinPath pathnode)
** get the expensive function costs of the path
*/
Cost
xfunc_get_path_cost(Query * queryInfo, Path pathnode)
xfunc_get_path_cost(Query *queryInfo, Path pathnode)
{
Cost cost = 0;
LispValue tmplist;
@ -1048,7 +1048,7 @@ xfunc_total_path_cost(JoinPath pathnode)
}
else if (IsA(pathnode, HashPath))
{
HashPath hashnode = (HashPath) pathnode;
HashPath hashnode = (HashPath) pathnode;
cost += cost_hashjoin(get_path_cost((Path) get_outerjoinpath(hashnode)),
get_path_cost((Path) get_innerjoinpath(hashnode)),
@ -1153,7 +1153,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
TargetEntry *tle; /* tlist member corresponding to var */
if (IsA(clause, Const) || IsA(clause, Param))
if (IsA(clause, Const) ||IsA(clause, Param))
return;
else if (IsA(clause, Var))
{
@ -1261,7 +1261,7 @@ xfunc_disjunct_sort(LispValue clause_list)
** arg1 and arg2 are really pointers to disjuncts
*/
int
xfunc_disjunct_compare(Query * queryInfo, void *arg1, void *arg2)
xfunc_disjunct_compare(Query *queryInfo, void *arg1, void *arg2)
{
LispValue disjunct1 = *(LispValue *) arg1;
LispValue disjunct2 = *(LispValue *) arg2;
@ -1436,11 +1436,11 @@ xfunc_LispRemove(LispValue foo, List bar)
** Just like _copyRel, but doesn't copy the paths
*/
bool
xfunc_copyrel(Rel from, Rel * to)
xfunc_copyrel(Rel from, Rel *to)
{
Rel newnode;
Pointer(*alloc) () = palloc;
Pointer (*alloc) () = palloc;
/* COPY_CHECKARGS() */
if (to == NULL)