aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/geqo/geqo_eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/geqo/geqo_eval.c')
-rw-r--r--src/backend/optimizer/geqo/geqo_eval.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c
index 731b1c4fcd0..7e721a34e89 100644
--- a/src/backend/optimizer/geqo/geqo_eval.c
+++ b/src/backend/optimizer/geqo/geqo_eval.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.14 1997/09/08 02:23:53 momjian Exp $
+ * $Id: geqo_eval.c,v 1.15 1997/09/08 21:44:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,13 +50,13 @@
#include "optimizer/geqo_paths.h"
-static List *gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel);
-static Rel *gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel);
-static Rel *init_join_rel(Rel * outer_rel, Rel * inner_rel, JInfo * joininfo);
-static List *new_join_tlist(List * tlist, List * other_relids, int first_resdomno);
-static List *new_joininfo_list(List * joininfo_list, List * join_relids);
-static void geqo_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel);
-static Rel *geqo_nth(int stop, List * rels);
+static List *gimme_clause_joins(Query *root, Rel *outer_rel, Rel *inner_rel);
+static Rel *gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel);
+static Rel *init_join_rel(Rel *outer_rel, Rel *inner_rel, JInfo *joininfo);
+static List *new_join_tlist(List *tlist, List *other_relids, int first_resdomno);
+static List *new_joininfo_list(List *joininfo_list, List *join_relids);
+static void geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel);
+static Rel *geqo_nth(int stop, List *rels);
/*
* geqo_eval--
@@ -64,7 +64,7 @@ static Rel *geqo_nth(int stop, List * rels);
* Returns cost of a query tree as an individual of the population.
*/
Cost
-geqo_eval(Query * root, Gene * tour, int num_gene)
+geqo_eval(Query *root, Gene *tour, int num_gene)
{
Rel *joinrel;
Cost fitness;
@@ -99,7 +99,7 @@ geqo_eval(Query * root, Gene * tour, int num_gene)
* Returns a new join relation incorporating all joins in a left-sided tree.
*/
Rel *
-gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_rel)
+gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel)
{
Rel *inner_rel; /* current relation */
int base_rel_index;
@@ -191,7 +191,7 @@ gimme_tree(Query * root, Gene * tour, int rel_count, int num_gene, Rel * outer_r
*/
static List *
-gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel)
+gimme_clause_joins(Query *root, Rel *outer_rel, Rel *inner_rel)
{
List *join_list = NIL;
List *i = NIL;
@@ -244,7 +244,7 @@ gimme_clause_joins(Query * root, Rel * outer_rel, Rel * inner_rel)
*/
static Rel *
-gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel)
+gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel)
{
return (init_join_rel(outer_rel, inner_rel, (JInfo *) NULL));
}
@@ -261,7 +261,7 @@ gimme_clauseless_join(Rel * outer_rel, Rel * inner_rel)
* 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;
@@ -339,8 +339,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;
@@ -389,7 +389,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;
@@ -454,7 +454,7 @@ new_joininfo_list(List * joininfo_list, List * join_relids)
* Modifies the joininfo field of appropriate rel nodes.
*/
static void
-geqo_add_new_joininfos(Query * root, List * joinrels, List * outerrels)
+geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
{
List *xjoinrel = NIL;
List *xrelid = NIL;
@@ -603,7 +603,7 @@ geqo_add_new_joininfos(Query * root, List * joinrels, List * outerrels)
* Returns the list of final join relations.
*/
static List *
-geqo_final_join_rels(List * join_rel_list)
+geqo_final_join_rels(List *join_rel_list)
{
List *xrel = NIL;
List *temp = NIL;
@@ -649,7 +649,7 @@ geqo_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);
}
@@ -664,13 +664,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;
@@ -692,7 +692,7 @@ nonoverlap_sets(List * s1, List * s2)
* long join queries; so get logarithm of size when MAXINT overflow;
*/
static void
-geqo_joinrel_size(Rel * joinrel, Rel * outer_rel, Rel * inner_rel)
+geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel)
{
Cost temp;
int ntuples;
@@ -726,7 +726,7 @@ geqo_log(double x, double b)
}
static Rel *
-geqo_nth(int stop, List * rels)
+geqo_nth(int stop, List *rels)
{
List *r;
int i = 1;