diff options
Diffstat (limited to 'src/backend/optimizer')
51 files changed, 533 insertions, 559 deletions
diff --git a/src/backend/optimizer/geqo/geqo_copy.c b/src/backend/optimizer/geqo/geqo_copy.c index 5453b012a44..8c9240b717a 100644 --- a/src/backend/optimizer/geqo/geqo_copy.c +++ b/src/backend/optimizer/geqo/geqo_copy.c @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------ * - * geqo_copy.c-- + * geqo_copy.c * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_copy.c,v 1.4 1997/09/08 21:44:13 momjian Exp $ + * $Id: geqo_copy.c,v 1.5 1999/02/13 23:16:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -50,7 +50,7 @@ #include "optimizer/geqo_gene.h" #include "optimizer/geqo_copy.h" -/* geqo_copy-- +/* geqo_copy * * copies one gene to another * diff --git a/src/backend/optimizer/geqo/geqo_cx.c b/src/backend/optimizer/geqo/geqo_cx.c index 976a6dd2704..92fca945e89 100644 --- a/src/backend/optimizer/geqo/geqo_cx.c +++ b/src/backend/optimizer/geqo/geqo_cx.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * -* geqo_cx.c-- +* geqo_cx.c * * cycle crossover [CX] routines; * CX operator according to Oliver et al * (Proc 2nd Int'l Conf on GA's) * -* $Id: geqo_cx.c,v 1.5 1998/09/01 03:23:04 momjian Exp $ +* $Id: geqo_cx.c,v 1.6 1999/02/13 23:16:05 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ #include "optimizer/geqo_random.h" -/* cx-- +/* cx * * cycle crossover */ diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c index adbaa02855b..f667b7208bf 100644 --- a/src/backend/optimizer/geqo/geqo_erx.c +++ b/src/backend/optimizer/geqo/geqo_erx.c @@ -1,9 +1,9 @@ /*------------------------------------------------------------------------ * -* geqo_erx.c-- +* geqo_erx.c * edge recombination crossover [ER] * -* $Id: geqo_erx.c,v 1.10 1998/09/01 03:23:06 momjian Exp $ +* $Id: geqo_erx.c,v 1.11 1999/02/13 23:16:06 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ static Gene gimme_gene(Edge edge, Edge *edge_table); static Gene edge_failure(Gene *gene, int index, Edge *edge_table, int num_gene); -/* alloc_edge_table-- +/* alloc_edge_table * * allocate memory for edge table * @@ -80,7 +80,7 @@ alloc_edge_table(int num_gene) return edge_table; } -/* free_edge_table-- +/* free_edge_table * * deallocate memory of edge table * @@ -91,7 +91,7 @@ free_edge_table(Edge *edge_table) pfree(edge_table); } -/* gimme_edge_table-- +/* gimme_edge_table * * fills a data structure which represents the set of explicit * edges between points in the (2) input genes @@ -150,7 +150,7 @@ gimme_edge_table(Gene *tour1, Gene *tour2, int num_gene, Edge *edge_table) return ((float) (edge_total * 2) / (float) num_gene); } -/* gimme_edge-- +/* gimme_edge * * registers edge from city1 to city2 in input edge table * @@ -198,7 +198,7 @@ gimme_edge(Gene gene1, Gene gene2, Edge *edge_table) return 1; } -/* gimme_tour-- +/* gimme_tour * * creates a new tour using edges from the edge table. * priority is given to "shared" edges (i.e. edges which @@ -246,7 +246,7 @@ gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene) } -/* remove_gene-- +/* remove_gene * * removes input gene from edge_table. * input edge is used @@ -289,7 +289,7 @@ remove_gene(Gene gene, Edge edge, Edge *edge_table) } } -/* gimme_gene-- +/* gimme_gene * * priority is given to "shared" edges * (i.e. edges which both genes possess) @@ -381,7 +381,7 @@ gimme_gene(Edge edge, Edge *edge_table) return 0; /* to keep the compiler quiet */ } -/* edge_failure-- +/* edge_failure * * routine for handling edge failure * diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index 574cdb9c234..925dbe93faf 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------ * - * geqo_eval.c-- + * geqo_eval.c * Routines to evaluate query trees * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_eval.c,v 1.28 1999/02/12 05:56:47 momjian Exp $ + * $Id: geqo_eval.c,v 1.29 1999/02/13 23:16:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ static void geqo_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOpt static RelOptInfo *geqo_nth(int stop, List *rels); /* - * geqo_eval-- + * geqo_eval * * Returns cost of a query tree as an individual of the population. */ @@ -91,7 +91,7 @@ geqo_eval(Query *root, Gene *tour, int num_gene) } /* - * gimme-tree -- + * gimme_tree * this program presumes that only LEFT-SIDED TREES are considered! * * 'outer_rel' is the preceeding join @@ -179,10 +179,10 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out } /* - * gimme-clause-joins-- + * gimme_clause_joins * - * 'outer-rel' is the relation entry for the outer relation - * 'inner-rel' is the relation entry for the inner relation + * 'outer_rel' is the relation entry for the outer relation + * 'inner_rel' is the relation entry for the inner relation * * Returns a list of new join relations. */ @@ -231,9 +231,9 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel) } /* - * gimme-clauseless-join-- - * Given an outer relation 'outer-rel' and an inner relation - * 'inner-rel', create a join relation between 'outer-rel' and 'inner-rel' + * gimme_clauseless_join + * Given an outer relation 'outer_rel' and an inner relation + * 'inner_rel', create a join relation between 'outer_rel' and 'inner_rel' * * Returns a new join relation. */ @@ -245,13 +245,13 @@ gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel) } /* - * init-join-rel-- + * init_join_rel * Creates and initializes a new join relation. * - * 'outer-rel' and 'inner-rel' are relation nodes for the relations to be + * 'outer_rel' and 'inner_rel' are relation nodes for the relations to be * joined * 'joininfo' is the joininfo node(join clause) containing both - * 'outer-rel' and 'inner-rel', if any exists + * 'outer_rel' and 'inner_rel', if any exists * * Returns the new join relation node. */ @@ -315,17 +315,17 @@ init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo * joininfo) } /* - * new-join-tlist-- + * new_join_tlist * Builds a join relations's target list by keeping those elements that * will be in the final target list and any other elements that are still * needed for future joins. For a target list entry to still be needed * for future joins, its 'joinlist' field must not be empty after removal - * of all relids in 'other-relids'. + * of all relids in 'other_relids'. * * 'tlist' is the target list of one of the join relations - * 'other-relids' is a list of relids contained within the other + * 'other_relids' is a list of relids contained within the other * join relation - * 'first-resdomno' is the resdom number to use for the first created + * 'first_resdomno' is the resdom number to use for the first created * target list entry * * Returns the new target list. @@ -362,19 +362,19 @@ new_join_tlist(List *tlist, } /* - * new-joininfo-list-- + * new_joininfo_list * Builds a join relation's joininfo list by checking for join clauses * which still need to used in future joins involving this relation. A * join clause is still needed if there are still relations in the clause * not contained in the list of relations comprising this join relation. * New joininfo nodes are only created and added to - * 'current-joininfo-list' if a node for a particular join hasn't already + * 'current_joininfo_list' if a node for a particular join hasn't already * been created. * - * 'current-joininfo-list' contains a list of those joininfo nodes that + * 'current_joininfo_list' contains a list of those joininfo nodes that * have already been built - * 'joininfo-list' is the list of join clauses involving this relation - * 'join-relids' is a list of relids corresponding to the relations + * 'joininfo_list' is the list of join clauses involving this relation + * 'join_relids' is a list of relids corresponding to the relations * currently being joined * * Returns a list of joininfo nodes, new and old. @@ -430,7 +430,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids) #ifdef NOTUSED /* - * add-new-joininfos-- + * add_new_joininfos * For each new join relation, create new joininfos that * use the join relation as inner relation, and add * the new joininfos to those rel nodes that still @@ -578,11 +578,11 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels) } /* - * final-join-rels-- + * final_join_rels * Find the join relation that includes all the original * relations, i.e. the final join result. * - * 'join-rel-list' is a list of join relations. + * 'join_rel_list' is a list of join relations. * * Returns the list of final join relations. */ @@ -624,11 +624,11 @@ geqo_final_join_rels(List *join_rel_list) } /* - * add_superrels-- + * add_superrels * add rel to the temporary property list superrels. * * 'rel' a rel node - * 'super-rel' rel node of a join relation that includes rel + * 'super_rel' rel node of a join relation that includes rel * * Modifies the superrels field of rel */ @@ -639,7 +639,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel) } /* - * nonoverlap-rels-- + * nonoverlap_rels * test if two join relations overlap, i.e., includes the same * relation. * @@ -671,7 +671,7 @@ nonoverlap_sets(List *s1, List *s2) #endif /* NOTUSED */ /* - * geqo_joinrel_size-- + * geqo_joinrel_size * compute estimate for join relation tuples, even for * long join queries; so get logarithm of size when MAXINT overflow; */ diff --git a/src/backend/optimizer/geqo/geqo_main.c b/src/backend/optimizer/geqo/geqo_main.c index 275ed26bff5..1e7b1449e7a 100644 --- a/src/backend/optimizer/geqo/geqo_main.c +++ b/src/backend/optimizer/geqo/geqo_main.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * - * geqo_main.c-- + * geqo_main.c * solution of the query optimization problem * by means of a Genetic Algorithm (GA) * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_main.c,v 1.12 1999/02/03 21:16:22 momjian Exp $ + * $Id: geqo_main.c,v 1.13 1999/02/13 23:16:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -58,7 +58,7 @@ /* - * geqo-- + * geqo * solution of the query optimization problem * similar to a constrained Traveling Salesman Problem (TSP) */ diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c index 14e26d7555c..adb4255c89c 100644 --- a/src/backend/optimizer/geqo/geqo_misc.c +++ b/src/backend/optimizer/geqo/geqo_misc.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------ * - * geqo_misc.c-- + * geqo_misc.c * misc. printout and debug stuff * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_misc.c,v 1.16 1999/02/12 17:24:47 momjian Exp $ + * $Id: geqo_misc.c,v 1.17 1999/02/13 23:16:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,7 +43,7 @@ static float avg_pool(Pool *pool); -/* avg_pool-- +/* avg_pool * */ static float @@ -61,7 +61,7 @@ avg_pool(Pool *pool) return (float) cumulative / pool->size; } -/* print_pool-- +/* print_pool */ void print_pool(FILE *fp, Pool *pool, int start, int stop) @@ -91,7 +91,7 @@ print_pool(FILE *fp, Pool *pool, int start, int stop) } } -/* print_gen-- +/* print_gen * * printout for chromosome: best, worst, mean, average * diff --git a/src/backend/optimizer/geqo/geqo_mutation.c b/src/backend/optimizer/geqo/geqo_mutation.c index c56075d50c4..a68b416bd43 100644 --- a/src/backend/optimizer/geqo/geqo_mutation.c +++ b/src/backend/optimizer/geqo/geqo_mutation.c @@ -1,10 +1,10 @@ /*------------------------------------------------------------------------ * -* geqo_mutation.c-- +* geqo_mutation.c * * TSP mutation routines * -* $Id: geqo_mutation.c,v 1.4 1997/09/08 21:44:27 momjian Exp $ +* $Id: geqo_mutation.c,v 1.5 1999/02/13 23:16:09 momjian Exp $ * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/geqo/geqo_ox1.c b/src/backend/optimizer/geqo/geqo_ox1.c index 40b2f536887..12b9b0d9b36 100644 --- a/src/backend/optimizer/geqo/geqo_ox1.c +++ b/src/backend/optimizer/geqo/geqo_ox1.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * -* geqo_ox1.c-- +* geqo_ox1.c * * order crossover [OX] routines; * OX1 operator according to Davis * (Proc Int'l Joint Conf on AI) * -* $Id: geqo_ox1.c,v 1.4 1997/09/08 21:44:28 momjian Exp $ +* $Id: geqo_ox1.c,v 1.5 1999/02/13 23:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ #include "optimizer/geqo_random.h" -/* ox1-- +/* ox1 * * position crossover */ diff --git a/src/backend/optimizer/geqo/geqo_ox2.c b/src/backend/optimizer/geqo/geqo_ox2.c index 69693a1d459..c98e5f8c232 100644 --- a/src/backend/optimizer/geqo/geqo_ox2.c +++ b/src/backend/optimizer/geqo/geqo_ox2.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * -* geqo_ox2.c-- +* geqo_ox2.c * * order crossover [OX] routines; * OX2 operator according to Syswerda * (The Genetic Algorithms Handbook, ed L Davis) * -* $Id: geqo_ox2.c,v 1.4 1997/09/08 21:44:29 momjian Exp $ +* $Id: geqo_ox2.c,v 1.5 1999/02/13 23:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ #include "optimizer/geqo_random.h" -/* ox2-- +/* ox2 * * position crossover */ diff --git a/src/backend/optimizer/geqo/geqo_params.c b/src/backend/optimizer/geqo/geqo_params.c index f6f608169bd..56fa631282b 100644 --- a/src/backend/optimizer/geqo/geqo_params.c +++ b/src/backend/optimizer/geqo/geqo_params.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------ * -* geqo_params.c-- +* geqo_params.c * routines for determining necessary genetic optimization parameters * * Copyright (c) 1994, Regents of the University of California * -* $Id: geqo_params.c,v 1.12 1999/02/03 21:16:23 momjian Exp $ +* $Id: geqo_params.c,v 1.13 1999/02/13 23:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ static int gimme_number_generations(int pool_size, int effort); static int next_token(FILE *, char *, int); /* - * geqo_param-- + * geqo_param * get ga parameters out of "$PGDATA/pg_geqo" file. */ void @@ -303,7 +303,7 @@ next_token(FILE *fp, char *buf, int bufsz) return c == '\n' ? '\n' : 0; } -/* gimme_pool_size-- +/* gimme_pool_size * compute good estimation for pool size * according to number of involved rels in a query */ @@ -325,7 +325,7 @@ gimme_pool_size(int string_length) return (int) ceil(size); } -/* gimme_number_generations-- +/* gimme_number_generations * compute good estimation for number of generations size * for convergence */ diff --git a/src/backend/optimizer/geqo/geqo_paths.c b/src/backend/optimizer/geqo/geqo_paths.c index af8e683b32e..a39aa217286 100644 --- a/src/backend/optimizer/geqo/geqo_paths.c +++ b/src/backend/optimizer/geqo/geqo_paths.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------- * - * geqo_paths.c-- + * geqo_paths.c * Routines to process redundant paths and relations * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_paths.c,v 1.19 1999/02/12 17:24:47 momjian Exp $ + * $Id: geqo_paths.c,v 1.20 1999/02/13 23:16:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,9 +31,9 @@ static List *geqo_prune_rel(RelOptInfo *rel, List *other_rels); /* - * geqo-prune-rels-- + * geqo_prune_rels * Removes any redundant relation entries from a list of rel nodes - * 'rel-list'. + * 'rel_list'. * * Returns the resulting list. * @@ -53,8 +53,8 @@ geqo_prune_rels(List *rel_list) } /* - * geqo-prune-rel-- - * Prunes those relations from 'other-rels' that are redundant with + * geqo_prune_rel + * Prunes those relations from 'other_rels' that are redundant with * 'rel'. A relation is redundant if it is built up of the same * relations as 'rel'. Paths for the redundant relation are merged into * the pathlist of 'rel'. @@ -91,7 +91,7 @@ geqo_prune_rel(RelOptInfo *rel, List *other_rels) } /* - * geqo-set-cheapest-- + * geqo_set_cheapest * For a relation 'rel' (which corresponds to a join * relation), set pointers to the cheapest path */ diff --git a/src/backend/optimizer/geqo/geqo_pmx.c b/src/backend/optimizer/geqo/geqo_pmx.c index 428fa28a4db..d8e32f49ce7 100644 --- a/src/backend/optimizer/geqo/geqo_pmx.c +++ b/src/backend/optimizer/geqo/geqo_pmx.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * -* geqo_pmx.c-- +* geqo_pmx.c * * partially matched crossover [PMX] routines; * PMX operator according to Goldberg & Lingle * (Proc Int'l Conf on GA's) * -* $Id: geqo_pmx.c,v 1.4 1997/09/08 21:44:33 momjian Exp $ +* $Id: geqo_pmx.c,v 1.5 1999/02/13 23:16:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ #include "optimizer/geqo_random.h" -/* pmx-- +/* pmx * * partially matched crossover */ diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c index 9f1a24f4be3..f8530ef4ef0 100644 --- a/src/backend/optimizer/geqo/geqo_pool.c +++ b/src/backend/optimizer/geqo/geqo_pool.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------ * - * geqo_pool.c-- + * geqo_pool.c * Genetic Algorithm (GA) pool stuff * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_pool.c,v 1.10 1999/02/03 21:16:23 momjian Exp $ + * $Id: geqo_pool.c,v 1.11 1999/02/13 23:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -45,7 +45,7 @@ static int compare(const void *arg1, const void *arg2); /* - * alloc-pool-- + * alloc_pool * allocates memory for GA pool */ Pool * @@ -72,7 +72,7 @@ alloc_pool(int pool_size, int string_length) } /* - * free-pool-- + * free_pool * deallocates memory for GA pool */ void @@ -94,7 +94,7 @@ free_pool(Pool *pool) } /* - * random-init-pool-- + * random_init_pool * initialize genetic pool */ void @@ -114,7 +114,7 @@ random_init_pool(Query *root, Pool *pool, int strt, int stp) } /* - * sort-pool-- + * sort_pool * sorts input pool according to worth, from smallest to largest * * maybe you have to change compare() for different ordering ... @@ -126,7 +126,7 @@ sort_pool(Pool *pool) } /* - * compare-- + * compare * static input function for pg_sort * * return values for sort from smallest to largest are prooved! @@ -146,7 +146,7 @@ compare(const void *arg1, const void *arg2) return -1; } -/* alloc_chromo-- +/* alloc_chromo * allocates a chromosome and string space */ Chromosome * @@ -160,7 +160,7 @@ alloc_chromo(int string_length) return chromo; } -/* free_chromo-- +/* free_chromo * deallocates a chromosome and string space */ void @@ -170,7 +170,7 @@ free_chromo(Chromosome *chromo) pfree(chromo); } -/* spread_chromo-- +/* spread_chromo * inserts a new chromosome into the pool, displacing worst gene in pool * assumes best->worst = smallest->largest */ diff --git a/src/backend/optimizer/geqo/geqo_px.c b/src/backend/optimizer/geqo/geqo_px.c index 7731710a0db..beaa2cfb576 100644 --- a/src/backend/optimizer/geqo/geqo_px.c +++ b/src/backend/optimizer/geqo/geqo_px.c @@ -1,12 +1,12 @@ /*------------------------------------------------------------------------ * -* geqo_px.c-- +* geqo_px.c * * position crossover [PX] routines; * PX operator according to Syswerda * (The Genetic Algorithms Handbook, L Davis, ed) * -* $Id: geqo_px.c,v 1.5 1998/06/15 19:28:37 momjian Exp $ +* $Id: geqo_px.c,v 1.6 1999/02/13 23:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ #include "optimizer/geqo_random.h" -/* px-- +/* px * * position crossover */ diff --git a/src/backend/optimizer/geqo/geqo_recombination.c b/src/backend/optimizer/geqo/geqo_recombination.c index a2c52ff3473..1ee5029d551 100644 --- a/src/backend/optimizer/geqo/geqo_recombination.c +++ b/src/backend/optimizer/geqo/geqo_recombination.c @@ -1,9 +1,9 @@ /*------------------------------------------------------------------------ * -* geqo_recombination.c-- +* geqo_recombination.c * misc recombination procedures * -* $Id: geqo_recombination.c,v 1.6 1998/09/01 03:23:15 momjian Exp $ +* $Id: geqo_recombination.c,v 1.7 1999/02/13 23:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,7 +40,7 @@ /* - * init_tour-- + * init_tour * * Randomly generates a legal "traveling salesman" tour * (i.e. where each point is visited only once.) @@ -79,7 +79,7 @@ init_tour(Gene *tour, int num_gene) pfree(tmp); } -/* alloc_city_table-- +/* alloc_city_table * * allocate memory for city table * @@ -99,7 +99,7 @@ alloc_city_table(int num_gene) return city_table; } -/* free_city_table-- +/* free_city_table * * deallocate memory of city table * diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c index 37d620ea201..b42e4450f28 100644 --- a/src/backend/optimizer/geqo/geqo_selection.c +++ b/src/backend/optimizer/geqo/geqo_selection.c @@ -1,11 +1,11 @@ /*------------------------------------------------------------------------- * - * geqo_selection.c-- + * geqo_selection.c * linear selection scheme for the genetic query optimizer * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_selection.c,v 1.6 1999/02/03 21:16:23 momjian Exp $ + * $Id: geqo_selection.c,v 1.7 1999/02/13 23:16:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -57,7 +57,7 @@ static int linear(int max, double bias); -/* geqo_selection-- +/* geqo_selection * * according to bias described by input parameters, * second genes are selected from the pool @@ -81,7 +81,7 @@ geqo_selection(Chromosome *momma, Chromosome *daddy, Pool *pool, double bias) geqo_copy(daddy, &pool->data[second], pool->string_length); } -/* linear-- +/* linear * generates random integer between 0 and input max number * using input linear bias * diff --git a/src/backend/optimizer/geqo/minspantree.c b/src/backend/optimizer/geqo/minspantree.c index 5f1ac0cb055..daf8a459e3a 100644 --- a/src/backend/optimizer/geqo/minspantree.c +++ b/src/backend/optimizer/geqo/minspantree.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------ * -* minspantree.c-- +* minspantree.c * routine to sort a join graph which is including cycles * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION -* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.9 1999/02/10 21:02:35 momjian Exp $ +* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.10 1999/02/13 23:16:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ #include "optimizer/geqo/geqo.h" /* - * minspantree-- + * minspantree * The function minspantree computes the minimum spanning tree * for a given number of nodes and a given distance function. * For each pair of nodes found to be connected, a given diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 17ebbec5471..892ed5b3412 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * allpaths.c-- + * allpaths.c * Routines to find possible search paths for processing a query * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.30 1999/02/12 17:24:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.31 1999/02/13 23:16:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -52,7 +52,7 @@ static void debug_print_rel(Query *root, RelOptInfo *rel); #endif /* - * find-paths-- + * find_paths * Finds all possible access paths for executing a query, returning the * top level list of relation entries. * @@ -96,7 +96,7 @@ find_paths(Query *root, List *rels) } /* - * find-rel-paths-- + * find_rel_paths * Finds all paths available for scanning each relation entry in * 'rels'. Sequential scan and any available indices are considered * if possible(indices are not considered for lower nesting levels). @@ -108,7 +108,6 @@ static void find_rel_paths(Query *root, List *rels) { List *temp; - List *lastpath; foreach(temp, rels) { @@ -132,13 +131,6 @@ find_rel_paths(Query *root, List *rels) append(rel_index_scan_list, or_index_scan_list)); - /* - * The unordered path is always the last in the list. If it is not - * the cheapest path, prune it. - */ - lastpath = rel->pathlist; - while (lnext(lastpath) != NIL) - lastpath = lnext(lastpath); set_cheapest(rel, rel->pathlist); /* @@ -153,7 +145,7 @@ find_rel_paths(Query *root, List *rels) } /* - * find-join-paths-- + * find_join_paths * Find all possible joinpaths for a query by successively finding ways * to join single relations into join relations. * @@ -161,10 +153,10 @@ find_rel_paths(Query *root, List *rels) * Find all possible joinpaths(bushy trees) for a query by systematically * finding ways to join relations(both original and derived) together. * - * 'outer-rels' is the current list of relations for which join paths + * 'outer_rels' is the current list of relations for which join paths * are to be found, i.e., he current list of relations that * have already been derived. - * 'levels-needed' is the number of iterations needed + * 'levels_needed' is the number of iterations needed * * Returns the final level of join relations, i.e., the relation that is * the result of joining all the original relations together. @@ -204,7 +196,7 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed) /* * Determine all possible pairs of relations to be joined at this * level. Determine paths for joining these relation pairs and - * modify 'new-rels' accordingly, then eliminate redundant join + * modify 'new_rels' accordingly, then eliminate redundant join * relations. */ new_rels = find_join_rels(root, outer_rels); diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index f09e0f21e1c..e4afad6545e 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * clausesel.c-- + * clausesel.c * Routines to compute and set clause selectivities * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.16 1999/02/03 21:16:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.17 1999/02/13 23:16:15 momjian Exp $ * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 8328ce8b2d1..facadef913b 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * costsize.c-- + * costsize.c * Routines to compute (and set) relation sizes and path costs * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.31 1999/02/12 17:24:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.32 1999/02/13 23:16:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ Cost _cpu_page_wight_ = _CPU_PAGE_WEIGHT_; Cost _cpu_index_page_wight_ = _CPU_INDEX_PAGE_WEIGHT_; /* - * cost_seqscan-- + * cost_seqscan * Determines and returns the cost of scanning a relation sequentially. * If the relation is a temporary to be materialized from a query * embedded within a data field (determined by 'relid' containing an @@ -100,7 +100,7 @@ cost_seqscan(int relid, int relpages, int reltuples) /* - * cost_index-- + * cost_index * Determines and returns the cost of scanning a relation using an index. * * disk = expected-index-pages + expected-data-pages @@ -156,7 +156,7 @@ cost_index(Oid indexid, } /* - * cost_sort-- + * cost_sort * Determines and returns the cost of sorting a relation by considering * 1. the cost of doing an external sort: XXX this is probably too low * disk = (p lg p) @@ -206,7 +206,7 @@ cost_sort(List *pathkeys, int tuples, int width, bool noread) /* - * cost_result-- + * cost_result * Determines and returns the cost of writing a relation of 'tuples' * tuples of 'width' bytes out to a result relation. * @@ -228,7 +228,7 @@ cost_result(int tuples, int width) #endif /* - * cost_nestloop-- + * cost_nestloop * Determines and returns the cost of joining two relations using the * nested loop algorithm. * @@ -259,7 +259,7 @@ cost_nestloop(Cost outercost, } /* - * cost_mergejoin-- + * cost_mergejoin * 'outercost' and 'innercost' are the (disk+cpu) costs of scanning the * outer and inner relations * 'outersortkeys' and 'innersortkeys' are lists of the keys to be used @@ -350,8 +350,8 @@ cost_hashjoin(Cost outercost, } /* - * compute-rel-size-- - * Computes the size of each relation in 'rel-list' (after applying + * compute_rel_size + * Computes the size of each relation in 'rel_list' (after applying * restrictions), by multiplying the selectivity of each restriction * by the original size of the relation. * @@ -377,7 +377,7 @@ compute_rel_size(RelOptInfo *rel) } /* - * compute-rel-width-- + * compute_rel_width * Computes the width in bytes of a tuple from 'rel'. * * Returns the width of the tuple as a fixnum. @@ -389,7 +389,7 @@ compute_rel_width(RelOptInfo *rel) } /* - * compute-targetlist-width-- + * compute_targetlist_width * Computes the width in bytes of a tuple made from 'targetlist'. * * Returns the width of the tuple as a fixnum. @@ -409,7 +409,7 @@ compute_targetlist_width(List *targetlist) } /* - * compute-attribute-width-- + * compute_attribute_width * Given a target list entry, find the size in bytes of the attribute. * * If a field is variable-length, it is assumed to be at least the size @@ -429,7 +429,7 @@ compute_attribute_width(TargetEntry *tlistentry) } /* - * compute-joinrel-size-- + * compute_joinrel_size * Computes the size of the join relation 'joinrel'. * * Returns a fixnum. @@ -461,7 +461,7 @@ compute_joinrel_size(JoinPath *joinpath) } /* - * page-size-- + * page_size * Returns an estimate of the number of pages covered by a given * number of tuples of a given width (size in bytes). */ diff --git a/src/backend/optimizer/path/hashutils.c b/src/backend/optimizer/path/hashutils.c index 4354f881a67..53201e0621d 100644 --- a/src/backend/optimizer/path/hashutils.c +++ b/src/backend/optimizer/path/hashutils.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * hashutils.c-- + * hashutils.c * Utilities for finding applicable merge clauses and pathkeys * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.12 1999/02/10 03:52:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.13 1999/02/13 23:16:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,13 +23,13 @@ static HashInfo *match_hashop_hashinfo(Oid hashop, List *hashinfo_list); /* - * group-clauses-by-hashop-- - * If a join clause node in 'restrictinfo-list' is hashjoinable, store + * group_clauses_by_hashop + * If a join clause node in 'restrictinfo_list' is hashjoinable, store * it within a hashinfo node containing other clause nodes with the same * hash operator. * - * 'restrictinfo-list' is the list of restrictinfo nodes - * 'inner-relid' is the relid of the inner join relation + * 'restrictinfo_list' is the list of restrictinfo nodes + * 'inner_relid' is the relid of the inner join relation * * Returns the new list of hashinfo nodes. * @@ -49,7 +49,7 @@ group_clauses_by_hashop(List *restrictinfo_list, hashjoinop = restrictinfo->hashjoinoperator; /* - * Create a new hashinfo node and add it to 'hashinfo-list' if one + * Create a new hashinfo node and add it to 'hashinfo_list' if one * does not yet exist for this hash operator. */ if (hashjoinop) @@ -98,8 +98,8 @@ group_clauses_by_hashop(List *restrictinfo_list, /* - * match-hashop-hashinfo-- - * Searches the list 'hashinfo-list' for a hashinfo node whose hash op + * match_hashop_hashinfo + * Searches the list 'hashinfo_list' for a hashinfo node whose hash op * field equals 'hashop'. * * Returns the node if it exists. diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 1e030537d59..8b54b664024 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * indxpath.c-- + * indxpath.c * Routines to determine which indices are usable for scanning a * given relation * @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.43 1999/02/11 14:58:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.44 1999/02/13 23:16:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -56,7 +56,7 @@ static List *group_clauses_by_indexkey(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); + 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); @@ -90,8 +90,8 @@ static bool function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo * * * 'rel' is the relation entry to which these index paths correspond * 'indices' is a list of possible index paths - * 'restrictinfo-list' is a list of restriction restrictinfo nodes for 'rel' - * 'joininfo-list' is a list of joininfo nodes for 'rel' + * 'restrictinfo_list' is a list of restriction restrictinfo nodes for 'rel' + * 'joininfo_list' is a list of joininfo nodes for 'rel' * 'sortkeys' is a node describing the result sort order (from * (find_sortkeys)) * @@ -200,7 +200,7 @@ find_index_paths(Query *root, /* - * match-index-orclauses-- + * match_index_orclauses * Attempt to match an index against subclauses within 'or' clauses. * If the index does match, then the clause is marked with information * about the index. @@ -212,7 +212,7 @@ find_index_paths(Query *root, * 'index' is the index node. * 'indexkey' is the (single) key of the index * 'class' is the class of the operator corresponding to 'indexkey'. - * 'restrictinfo-list' is the list of available restriction clauses. + * 'restrictinfo_list' is the list of available restriction clauses. * * Returns nothing. * @@ -276,7 +276,7 @@ match_index_to_operand(int indexkey, } /* - * match-index-orclause-- + * match_index_orclause * Attempts to match an index against the subclauses of an 'or' clause. * * A match means that: @@ -285,8 +285,8 @@ match_index_to_operand(int indexkey, * (2) there is a usable key that matches the variable within a * searchable clause. * - * 'or-clauses' are the remaining subclauses within the 'or' clause - * 'other-matching-indices' is the list of information on other indices + * 'or_clauses' are the remaining subclauses within the 'or' clause + * 'other_matching_indices' is the list of information on other indices * that have already been matched to subclauses within this * particular 'or' clause (i.e., a list previously generated by * this routine) @@ -364,7 +364,7 @@ match_index_orclause(RelOptInfo *rel, (index->indproc != InvalidOid)) /* - * group-clauses-by-indexkey-- + * group_clauses_by_indexkey * Determines whether there are clauses which will match each and every * one of the remaining keys of an index. * @@ -442,8 +442,8 @@ group_clauses_by_indexkey(RelOptInfo *rel, } /* - * group-clauses-by-ikey-for-joins-- - * special edition of group-clauses-by-indexkey - will + * group_clauses_by_ikey_for_joins + * special edition of group_clauses_by_indexkey - will * match join & restriction clauses. See comment in indexable_joinclauses. * - vadim 03/18/97 * @@ -771,7 +771,7 @@ match_clause_to_indexkey(RelOptInfo *rel, ****************************************************************************/ /* - * pred_test-- + * pred_test * Does the "predicate inclusion test" for partial indexes. * * Recursively checks whether the clauses in restrictinfo_list imply @@ -831,7 +831,7 @@ pred_test(List *predicate_list, List *restrictinfo_list, List *joininfo_list) /* - * one_pred_test-- + * one_pred_test * Does the "predicate inclusion test" for one conjunct of a predicate * expression. */ @@ -854,7 +854,7 @@ one_pred_test(Expr *predicate, List *restrictinfo_list) /* - * one_pred_clause_expr_test-- + * one_pred_clause_expr_test * Does the "predicate inclusion test" for a general restriction-clause * expression. */ @@ -901,7 +901,7 @@ one_pred_clause_expr_test(Expr *predicate, Node *clause) /* - * one_pred_clause_test-- + * one_pred_clause_test * Does the "predicate inclusion test" for one conjunct of a predicate * expression for a simple restriction clause. */ @@ -978,7 +978,7 @@ StrategyNumber BT_implic_table[BTMaxStrategyNumber][BTMaxStrategyNumber] = { /* - * clause_pred_clause_test-- + * clause_pred_clause_test * Use operator class info to check whether clause implies predicate. * * Does the "predicate inclusion test" for a "simple clause" predicate @@ -1168,8 +1168,8 @@ clause_pred_clause_test(Expr *predicate, Node *clause) ****************************************************************************/ /* - * indexable-joinclauses-- - * Finds all groups of join clauses from among 'joininfo-list' that can + * indexable_joinclauses + * Finds all groups of join clauses from among 'joininfo_list' that can * be used in conjunction with 'index'. * * The first clause in the group is marked as having the other relation @@ -1244,7 +1244,7 @@ extract_restrict_clauses(List *clausegroup) #endif /* - * index-innerjoin-- + * index_innerjoin * Creates index path nodes corresponding to paths to be used as inner * relations in nestloop joins. * @@ -1330,7 +1330,7 @@ index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list, } /* - * create-index-paths-- + * create_index_paths * Creates a list of index path nodes for each group of clauses * (restriction or join) that can be used in conjunction with an index. * diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index e2e492922ca..aa197671a58 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * joinpath.c-- + * joinpath.c * Routines to find all possible paths for processing a set of joins * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.22 1999/02/12 17:24:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.23 1999/02/13 23:16:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ static List *hash_inner_and_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, Rel List *hashinfo_list); /* - * find-all-join-paths-- + * find_all_join_paths * Creates all possible ways to process joins for each of the join * relations in the list 'joinrels.' Each unique path will be included * in the join relation's 'pathlist' field. @@ -131,7 +131,7 @@ find_all_join_paths(Query *root, List *joinrels) * 3. Consider paths where the inner relation need not be * explicitly sorted. This may include nestloops and mergejoins * the actual nestloop nodes were constructed in - * (match-unsorted-outer). + * (match_unsorted_outer). */ pathlist = add_pathlist(joinrel, pathlist, match_unsorted_inner(joinrel, outerrel, @@ -152,8 +152,8 @@ find_all_join_paths(Query *root, List *joinrels) /* * 'OuterJoinCost is only valid when calling - * (match-unsorted-inner) with the same arguments as the previous - * invokation of (match-unsorted-outer), so clear the field before + * (match_unsorted_inner) with the same arguments as the previous + * invokation of (match_unsorted_outer), so clear the field before * going on. */ temp_list = innerrel->pathlist; @@ -180,13 +180,13 @@ find_all_join_paths(Query *root, List *joinrels) } /* - * best-innerjoin-- + * best_innerjoin * Find the cheapest index path that has already been identified by * (indexable_joinclauses) as being a possible inner path for the given * outer relation in a nestloop join. * - * 'join-paths' is a list of join nodes - * 'outer-relid' is the relid of the outer join relation + * 'join_paths' is a list of join nodes + * 'outer_relid' is the relid of the outer join relation * * Returns the pathnode of the selected path. */ @@ -212,14 +212,14 @@ best_innerjoin(List *join_paths, List *outer_relids) } /* - * sort-inner-and-outer-- + * sort_inner_and_outer * Create mergejoin join paths by explicitly sorting both the outer and * inner join relations on each available merge ordering. * * 'joinrel' is the join relation * 'outerrel' is the outer join relation * 'innerrel' is the inner join relation - * 'mergeinfo-list' is a list of nodes containing info on(mergejoinable) + * 'mergeinfo_list' is a list of nodes containing info on(mergejoinable) * clauses for joining the relations * * Returns a list of mergejoin paths. @@ -272,7 +272,7 @@ sort_inner_and_outer(RelOptInfo *joinrel, } /* - * match-unsorted-outer-- + * match_unsorted_outer * Creates possible join paths for processing a single join relation * 'joinrel' by employing either iterative substitution or * mergejoining on each of its possible outer paths(assuming that the @@ -290,10 +290,10 @@ sort_inner_and_outer(RelOptInfo *joinrel, * 'joinrel' is the join relation * 'outerrel' is the outer join relation * 'innerrel' is the inner join relation - * 'outerpath-list' is the list of possible outer paths - * 'cheapest-inner' is the cheapest inner path - * 'best-innerjoin' is the best inner index path(if any) - * 'mergeinfo-list' is a list of nodes containing info on mergejoinable + * 'outerpath_list' is the list of possible outer paths + * 'cheapest_inner' is the cheapest inner path + * 'best_innerjoin' is the best inner index path(if any) + * 'mergeinfo_list' is a list of nodes containing info on mergejoinable * clauses * * Returns a list of possible join path nodes. @@ -391,7 +391,7 @@ match_unsorted_outer(RelOptInfo *joinrel, /* * Keep track of the cost of the outer path used with this * ordered inner path for later processing in - * (match-unsorted-inner), since it isn't a sort and thus + * (match_unsorted_inner), since it isn't a sort and thus * wouldn't otherwise be considered. */ if (path_is_cheaper_than_sort) @@ -421,23 +421,23 @@ match_unsorted_outer(RelOptInfo *joinrel, } /* - * match-unsorted-inner -- + * match_unsorted_inner * Find the cheapest ordered join path for a given(ordered, unsorted) * inner join path. * * Scans through each path available on an inner join relation and tries * matching its ordering keys against those of mergejoin clauses. - * If 1. an appropriately-ordered inner path and matching mergeclause are + * If 1. an appropriately_ordered inner path and matching mergeclause are * found, and * 2. sorting the cheapest outer path is cheaper than using an ordered * but unsorted outer path(as was considered in - * (match-unsorted-outer)), then this merge path is considered. + * (match_unsorted_outer)), then this merge path is considered. * * 'joinrel' is the join result relation * 'outerrel' is the outer join relation * 'innerrel' is the inner join relation - * 'innerpath-list' is the list of possible inner join paths - * 'mergeinfo-list' is a list of nodes containing info on mergejoinable + * 'innerpath_list' is the list of possible inner join paths + * 'mergeinfo_list' is a list of nodes containing info on mergejoinable * clauses * * Returns a list of possible merge paths. @@ -490,7 +490,7 @@ match_unsorted_inner(RelOptInfo *joinrel, } /* - * (match-unsorted-outer) if it is applicable. 'OuterJoinCost was + * (match_unsorted_outer) if it is applicable. 'OuterJoinCost was * set above in */ if (clauses && matchedJoinKeys) @@ -555,14 +555,14 @@ EnoughMemoryForHashjoin(RelOptInfo *hashrel) } /* - * hash-inner-and-outer-- XXX HASH + * hash_inner_and_outer-- XXX HASH * Create hashjoin join paths by explicitly hashing both the outer and * inner join relations on each available hash op. * * 'joinrel' is the join relation * 'outerrel' is the outer join relation * 'innerrel' is the inner join relation - * 'hashinfo-list' is a list of nodes containing info on(hashjoinable) + * 'hashinfo_list' is a list of nodes containing info on(hashjoinable) * clauses for joining the relations * * Returns a list of hashjoin paths. diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index a9f473c88a2..e9dc2dcbb1c 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * joinrels.c-- + * joinrels.c * Routines to determine which relations should be joined * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.19 1999/02/12 05:56:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.20 1999/02/13 23:16:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -44,15 +44,15 @@ static void set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptI JoinInfo * jinfo); /* - * find-join-rels-- + * find_join_rels * Find all possible joins for each of the outer join relations in - * 'outer-rels'. A rel node is created for each possible join relation, + * 'outer_rels'. A rel node is created for each possible join relation, * and the resulting list of nodes is returned. If at all possible, only * those relations for which join clauses exist are considered. If none * of these exist for a given relation, all remaining possibilities are * considered. * - * 'outer-rels' is the list of rel nodes + * 'outer_rels' is the list of rel nodes * * Returns a list of rel nodes corresponding to the new join relations. */ @@ -82,16 +82,16 @@ find_join_rels(Query *root, List *outer_rels) } /* - * find-clause-joins-- + * find_clause_joins * Determines whether joins can be performed between an outer relation - * 'outer-rel' and those relations within 'outer-rel's joininfo nodes - * (i.e., relations that participate in join clauses that 'outer-rel' + * 'outer_rel' and those relations within 'outer_rel's joininfo nodes + * (i.e., relations that participate in join clauses that 'outer_rel' * participates in). This is possible if all but one of the relations * contained within the join clauses of the joininfo node are already - * contained within 'outer-rel'. + * contained within 'outer_rel'. * - * 'outer-rel' is the relation entry for the outer relation - * 'joininfo-list' is a list of join clauses which 'outer-rel' + * 'outer_rel' is the relation entry for the outer relation + * 'joininfo_list' is a list of join clauses which 'outer_rel' * participates in * * Returns a list of new join relations. @@ -148,10 +148,10 @@ find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list) } /* - * find-clauseless-joins-- - * Given an outer relation 'outer-rel' and a list of inner relations - * 'inner-rels', create a join relation between 'outer-rel' and each - * member of 'inner-rels' that isn't already included in 'outer-rel'. + * find_clauseless_joins + * Given an outer relation 'outer_rel' and a list of inner relations + * 'inner_rels', create a join relation between 'outer_rel' and each + * member of 'inner_rels' that isn't already included in 'outer_rel'. * * Returns a list of new join relations. */ @@ -180,13 +180,13 @@ find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels) } /* - * init-join-rel-- + * init_join_rel * Creates and initializes a new join relation. * - * 'outer-rel' and 'inner-rel' are relation nodes for the relations to be + * 'outer_rel' and 'inner_rel' are relation nodes for the relations to be * joined * 'joininfo' is the joininfo node(join clause) containing both - * 'outer-rel' and 'inner-rel', if any exists + * 'outer_rel' and 'inner_rel', if any exists * * Returns the new join relation node. */ @@ -251,17 +251,17 @@ init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo * joininfo) } /* - * new-join-tlist-- + * new_join_tlist * Builds a join relations's target list by keeping those elements that * will be in the final target list and any other elements that are still * needed for future joins. For a target list entry to still be needed * for future joins, its 'joinlist' field must not be empty after removal - * of all relids in 'other-relids'. + * of all relids in 'other_relids'. * * 'tlist' is the target list of one of the join relations - * 'other-relids' is a list of relids contained within the other + * 'other_relids' is a list of relids contained within the other * join relation - * 'first-resdomno' is the resdom number to use for the first created + * 'first_resdomno' is the resdom number to use for the first created * target list entry * * Returns the new target list. @@ -298,19 +298,19 @@ new_join_tlist(List *tlist, } /* - * new-joininfo-list-- + * new_joininfo_list * Builds a join relation's joininfo list by checking for join clauses * which still need to used in future joins involving this relation. A * join clause is still needed if there are still relations in the clause * not contained in the list of relations comprising this join relation. * New joininfo nodes are only created and added to - * 'current-joininfo-list' if a node for a particular join hasn't already + * 'current_joininfo_list' if a node for a particular join hasn't already * been created. * - * 'current-joininfo-list' contains a list of those joininfo nodes that + * 'current_joininfo_list' contains a list of those joininfo nodes that * have already been built - * 'joininfo-list' is the list of join clauses involving this relation - * 'join-relids' is a list of relids corresponding to the relations + * 'joininfo_list' is the list of join clauses involving this relation + * 'join_relids' is a list of relids corresponding to the relations * currently being joined * * Returns a list of joininfo nodes, new and old. @@ -364,7 +364,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids) } /* - * add-new-joininfos-- + * add_new_joininfos * For each new join relation, create new joininfos that * use the join relation as inner relation, and add * the new joininfos to those rel nodes that still @@ -462,11 +462,11 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels) } /* - * final-join-rels-- + * final_join_rels * Find the join relation that includes all the original * relations, i.e. the final join result. * - * 'join-rel-list' is a list of join relations. + * 'join_rel_list' is a list of join relations. * * Returns the list of final join relations. */ @@ -508,11 +508,11 @@ final_join_rels(List *join_rel_list) } /* - * add_superrels-- + * add_superrels * add rel to the temporary property list superrels. * * 'rel' a rel node - * 'super-rel' rel node of a join relation that includes rel + * 'super_rel' rel node of a join relation that includes rel * * Modifies the superrels field of rel */ @@ -523,7 +523,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel) } /* - * nonoverlap-rels-- + * nonoverlap_rels * test if two join relations overlap, i.e., includes the same * relation. * diff --git a/src/backend/optimizer/path/joinutils.c b/src/backend/optimizer/path/joinutils.c index b9b277d69f5..2a0f334317f 100644 --- a/src/backend/optimizer/path/joinutils.c +++ b/src/backend/optimizer/path/joinutils.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * joinutils.c-- + * joinutils.c * Utilities for matching and building join and path keys * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.19 1999/02/11 17:00:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.20 1999/02/13 23:16:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,7 +40,7 @@ static List *new_matching_subkeys(Var *subkey, List *considered_subkeys, ****************************************************************************/ /* - * match-pathkeys-joinkeys-- + * match_pathkeys_joinkeys * Attempts to match the keys of a path against the keys of join clauses. * This is done by looking for a matching join key in 'joinkeys' for * every path key in the list 'path.keys'. If there is a matching join key @@ -54,7 +54,7 @@ static List *new_matching_subkeys(Var *subkey, List *considered_subkeys, * ( (outer inner) (outer inner) ... ) * 'joinclauses' is a list of clauses corresponding to the join keys in * 'joinkeys' - * 'which-subkey' is a flag that selects the desired subkey of a join key + * 'which_subkey' is a flag that selects the desired subkey of a join key * in 'joinkeys' * * Returns the join keys and corresponding join clauses in a list if all @@ -112,7 +112,7 @@ match_pathkeys_joinkeys(List *pathkeys, } /* - * match-pathkey-joinkeys-- + * match_pathkey_joinkeys * Returns the 0-based index into 'joinkeys' of the first joinkey whose * outer or inner subkey matches any subkey of 'pathkey'. */ @@ -144,7 +144,7 @@ match_pathkey_joinkeys(List *pathkey, } /* - * match-paths-joinkeys-- + * match_paths_joinkeys * Attempts to find a path in 'paths' whose keys match a set of join * keys 'joinkeys'. To match, * 1. the path node ordering must equal 'ordering'. @@ -159,7 +159,7 @@ match_pathkey_joinkeys(List *pathkey, * must correspond * 'paths' is a list of(inner) paths which are to be matched against * each join key in 'joinkeys' - * 'which-subkey' is a flag that selects the desired subkey of a join key + * 'which_subkey' is a flag that selects the desired subkey of a join key * in 'joinkeys' * * Returns the matching path node if one exists, nil otherwise. @@ -238,14 +238,14 @@ match_paths_joinkeys(List *joinkeys, /* - * extract-path-keys-- + * extract_path_keys * Builds a subkey list for a path by pulling one of the subkeys from * a list of join keys 'joinkeys' and then finding the var node in the * target list 'tlist' that corresponds to that subkey. * * 'joinkeys' is a list of join key pairs * 'tlist' is a relation target list - * 'which-subkey' is a flag that selects the desired subkey of a join key + * 'which_subkey' is a flag that selects the desired subkey of a join key * in 'joinkeys' * * Returns a list of pathkeys: ((tlvar1)(tlvar2)...(tlvarN)). @@ -296,7 +296,7 @@ extract_path_keys(List *joinkeys, ****************************************************************************/ /* - * new-join-pathkeys-- + * new_join_pathkeys * Find the path keys for a join relation by finding all vars in the list * of join clauses 'joinclauses' such that: * (1) the var corresponding to the outer join relation is a @@ -305,8 +305,8 @@ extract_path_keys(List *joinkeys, * In other words, add to each outer path key the inner path keys that * are required for qualification. * - * 'outer-pathkeys' is the list of the outer path's path keys - * 'join-rel-tlist' is the target list of the join relation + * 'outer_pathkeys' is the list of the outer path's path keys + * 'join_rel_tlist' is the target list of the join relation * 'joinclauses' is the list of restricting join clauses * * Returns the list of new path keys. @@ -333,17 +333,17 @@ new_join_pathkeys(List *outer_pathkeys, } /* - * new-join-pathkey-- + * new_join_pathkey * Finds new vars that become subkeys due to qualification clauses that * contain any previously considered subkeys. These new subkeys plus the * subkeys from 'subkeys' form a new pathkey for the join relation. * * Note that each returned subkey is the var node found in - * 'join-rel-tlist' rather than the joinclause var node. + * 'join_rel_tlist' rather than the joinclause var node. * * 'subkeys' is a list of subkeys for which matching subkeys are to be * found - * 'considered-subkeys' is the current list of all subkeys corresponding + * 'considered_subkeys' is the current list of all subkeys corresponding * to a given pathkey * * Returns a new pathkey(list of subkeys). @@ -388,15 +388,15 @@ new_join_pathkey(List *subkeys, } /* - * new-matching-subkeys-- + * new_matching_subkeys * Returns a list of new subkeys: - * (1) which are not listed in 'considered-subkeys' + * (1) which are not listed in 'considered_subkeys' * (2) for which the "other" variable in some clause in 'joinclauses' is * 'subkey' - * (3) which are mentioned in 'join-rel-tlist' + * (3) which are mentioned in 'join_rel_tlist' * * Note that each returned subkey is the var node found in - * 'join-rel-tlist' rather than the joinclause var node. + * 'join_rel_tlist' rather than the joinclause var node. * * 'subkey' is the var node for which we are trying to find matching * clauses diff --git a/src/backend/optimizer/path/mergeutils.c b/src/backend/optimizer/path/mergeutils.c index 8caef0e6611..d6af886f1ef 100644 --- a/src/backend/optimizer/path/mergeutils.c +++ b/src/backend/optimizer/path/mergeutils.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * mergeutils.c-- + * mergeutils.c * Utilities for finding applicable merge clauses and pathkeys * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.17 1999/02/11 14:58:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.18 1999/02/13 23:16:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,13 +22,13 @@ #include "optimizer/ordering.h" /* - * group-clauses-by-order-- - * If a join clause node in 'restrictinfo-list' is mergejoinable, store + * group_clauses_by_order + * If a join clause node in 'restrictinfo_list' is mergejoinable, store * it within a mergeinfo node containing other clause nodes with the same * mergejoin ordering. * - * 'restrictinfo-list' is the list of restrictinfo nodes - * 'inner-relid' is the relid of the inner join relation + * 'restrictinfo_list' is the list of restrictinfo nodes + * 'inner_relid' is the relid of the inner join relation * * Returns the new list of mergeinfo nodes. * @@ -49,7 +49,7 @@ group_clauses_by_order(List *restrictinfo_list, { /* - * Create a new mergeinfo node and add it to 'mergeinfo-list' + * Create a new mergeinfo node and add it to 'mergeinfo_list' * if one does not yet exist for this merge ordering. */ PathOrder *pathorder; @@ -96,8 +96,8 @@ group_clauses_by_order(List *restrictinfo_list, /* - * match-order-mergeinfo-- - * Searches the list 'mergeinfo-list' for a mergeinfo node whose order + * match_order_mergeinfo + * Searches the list 'mergeinfo_list' for a mergeinfo node whose order * field equals 'ordering'. * * Returns the node if it exists. diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index 70dc789111c..cc14716dc98 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * orindxpath.c-- + * orindxpath.c * Routines to find index paths that match a set of 'or' clauses * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.19 1999/02/11 14:58:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.20 1999/02/13 23:16:21 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,7 +40,7 @@ static void best_or_subclause_index(Query *root, RelOptInfo *rel, Expr *subclaus /* - * create-or-index-paths-- + * create_or_index_paths * Creates index paths for indices that match 'or' clauses. * * 'rel' is the relation entry for which the paths are to be defined on @@ -142,7 +142,7 @@ create_or_index_paths(Query *root, } /* - * best-or-subclause-indices-- + * best_or_subclause_indices * Determines the best index to be used in conjunction with each subclause * of an 'or' clause and the cost of scanning a relation using these * indices. The cost is the sum of the individual index costs. @@ -151,9 +151,9 @@ create_or_index_paths(Query *root, * 'subclauses' are the subclauses of the 'or' clause * 'indices' are those index nodes that matched subclauses of the 'or' * clause - * 'examined-indexids' is a list of those index ids to be used with + * 'examined_indexids' is a list of those index ids to be used with * subclauses that have already been examined - * 'subcost' is the cost of using the indices in 'examined-indexids' + * 'subcost' is the cost of using the indices in 'examined_indexids' * 'selectivities' is a list of the selectivities of subclauses that * have already been examined * @@ -199,7 +199,7 @@ best_or_subclause_indices(Query *root, } /* - * best-or-subclause-index-- + * best_or_subclause_index * Determines which is the best index to be used with a subclause of * an 'or' clause by estimating the cost of using each index and selecting * the least expensive. @@ -208,7 +208,7 @@ best_or_subclause_indices(Query *root, * 'subclause' is the subclause * 'indices' is a list of index nodes that match the subclause * - * Returns a list (index-id index-subcost index-selectivity) + * Returns a list (index_id index_subcost index_selectivity) * (a fixnum, a fixnum, and a flonum respectively). * */ diff --git a/src/backend/optimizer/path/predmig.c b/src/backend/optimizer/path/predmig.c index 807331ef1e1..e4761f620f7 100644 --- a/src/backend/optimizer/path/predmig.c +++ b/src/backend/optimizer/path/predmig.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * predmig.c-- + * predmig.c * * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.17 1999/02/12 17:24:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.18 1999/02/13 23:16:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -269,7 +269,7 @@ xfunc_llel_chains(Stream root, Stream bottom) } /* - ** xfunc_complete_stream -- + ** xfunc_complete_stream ** Given a stream composed of join nodes only, make a copy containing the ** join nodes along with the associated restriction nodes. */ @@ -390,7 +390,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath) } /* - ** xfunc_form_groups -- + ** xfunc_form_groups ** A group is a pair of stream nodes a,b such that a is constrained to ** precede b (for instance if a and b are both joins), but rank(a) > rank(b). ** In such a situation, Monma and Sidney prove that no clauses should end @@ -490,7 +490,7 @@ xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom) /* ------------------- UTILITY FUNCTIONS ------------------------- */ /* - ** xfunc_free_stream -- + ** xfunc_free_stream ** walk down a stream and pfree it */ static void @@ -623,7 +623,7 @@ xfunc_num_relids(Stream node) } /* - ** xfunc_get_downjoin -- + ** xfunc_get_downjoin ** Given a stream node, find the next lowest node which points to a ** join predicate or a scan node. */ @@ -642,7 +642,7 @@ xfunc_get_downjoin(Stream node) } /* - ** xfunc_get_upjoin -- + ** xfunc_get_upjoin ** same as above, but upwards. */ static StreamPtr @@ -660,7 +660,7 @@ xfunc_get_upjoin(Stream node) } /* - ** xfunc_stream_qsort -- + ** xfunc_stream_qsort ** Given a stream, sort by group rank the elements in the stream from the ** node "bottom" up. DESTRUCTIVELY MODIFIES STREAM! Returns new root. */ diff --git a/src/backend/optimizer/path/prune.c b/src/backend/optimizer/path/prune.c index af3b01bed0c..ce6b22d98e6 100644 --- a/src/backend/optimizer/path/prune.c +++ b/src/backend/optimizer/path/prune.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * prune.c-- + * prune.c * Routines to prune redundant paths and relations * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.30 1999/02/12 17:24:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.31 1999/02/13 23:16:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,9 +27,9 @@ static List *prune_joinrel(RelOptInfo *rel, List *other_rels); /* - * prune-joinrels-- + * prune_joinrels * Removes any redundant relation entries from a list of rel nodes - * 'rel-list'. Obviously, the first relation can't be a duplicate. + * 'rel_list'. Obviously, the first relation can't be a duplicate. * * Returns the resulting list. * @@ -48,8 +48,8 @@ prune_joinrels(List *rel_list) } /* - * prune-joinrel-- - * Prunes those relations from 'other-rels' that are redundant with + * prune_joinrel + * Prunes those relations from 'other_rels' that are redundant with * 'rel'. A relation is redundant if it is built up of the same * relations as 'rel'. Paths for the redundant relation are merged into * the pathlist of 'rel'. @@ -83,8 +83,8 @@ prune_joinrel(RelOptInfo *rel, List *other_rels) } /* - * rels-set-cheapest - * For each relation entry in 'rel-list' (which corresponds to a join + * rels_set_cheapest + * For each relation entry in 'rel_list' (which corresponds to a join * relation), set pointers to the cheapest path */ void @@ -108,12 +108,12 @@ rels_set_cheapest(List *rel_list) /* - * merge-joinrels-- + * merge_joinrels * Given two lists of rel nodes that are already * pruned, merge them into one pruned rel node list * - * 'rel-list1' and - * 'rel-list2' are the rel node lists + * 'rel_list1' and + * 'rel_list2' are the rel node lists * * Returns one pruned rel node list */ @@ -132,7 +132,7 @@ merge_joinrels(List *rel_list1, List *rel_list2) } /* - * prune_oldrels-- + * prune_oldrels * If all the joininfo's in a rel node are inactive, * that means that this node has been joined into * other nodes in all possible ways, therefore diff --git a/src/backend/optimizer/path/xfunc.c b/src/backend/optimizer/path/xfunc.c index 048fce5ad2e..e722840f30e 100644 --- a/src/backend/optimizer/path/xfunc.c +++ b/src/backend/optimizer/path/xfunc.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * xfunc.c-- + * xfunc.c * Utility routines to handle expensive function optimization. * Includes xfunc_trypullup(), which attempts early pullup of predicates * to allow for maximal pruning. @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.27 1999/02/12 17:24:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.28 1999/02/13 23:16:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -49,7 +49,7 @@ static int xfunc_card_unreferenced(Query *queryInfo, */ /* -** xfunc_trypullup -- +** xfunc_trypullup ** Preliminary pullup of predicates, to allow for maximal pruning. ** Given a relation, check each of its paths and see if you can ** pullup clauses from its inner and outer. @@ -127,7 +127,7 @@ xfunc_trypullup(RelOptInfo rel) } /* - ** xfunc_shouldpull -- + ** xfunc_shouldpull ** find clause with highest rank, and decide whether to pull it up ** from child to parent. Currently we only pullup secondary join clauses ** that are in the pathrestrictinfo. Secondary hash and sort clauses are @@ -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, @@ -250,7 +250,7 @@ xfunc_shouldpull(Query *queryInfo, /* - ** xfunc_pullup -- + ** xfunc_pullup ** move clause from child pathnode to parent pathnode. This operation ** makes the child pathnode produce a larger relation than it used to. ** This means that we must construct a new RelOptInfo just for the childpath, @@ -386,7 +386,7 @@ LispValue clause; } /* - ** xfunc_join_expense -- + ** xfunc_join_expense ** Find global expense of a join clause */ Cost @@ -457,7 +457,7 @@ xfunc_local_expense(LispValue clause) } /* - ** xfunc_func_expense -- + ** xfunc_func_expense ** given a Func or Oper and its args, find its expense. ** Note: in Stonebraker's SIGMOD '91 paper, he uses a more complicated metric ** than the one here. We can ignore the expected number of tuples for @@ -581,7 +581,7 @@ xfunc_func_expense(LispValue node, LispValue args) } /* - ** xfunc_width -- + ** xfunc_width ** recursively find the width of a expression */ @@ -1071,7 +1071,7 @@ xfunc_total_path_cost(JoinPath pathnode) /* - ** xfunc_expense_per_tuple -- + ** xfunc_expense_per_tuple ** return the expense of the join *per-tuple* of the input relation. ** The cost model here is that a join costs ** k*card(outer)*card(inner) + l*card(outer) + m*card(inner) + n @@ -1124,7 +1124,7 @@ xfunc_expense_per_tuple(JoinPath joinnode, int whichchild) } /* - ** xfunc_fixvars -- + ** xfunc_fixvars ** After pulling up a clause, we must walk its expression tree, fixing Var ** nodes to point to the correct varno (either INNER or OUTER, depending ** on which child the clause was pulled from), and the right varattno in the @@ -1154,7 +1154,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */ * have to add it. * * */ - add_tl_element(rel, (Var) clause); + add_var_to_tlist(rel, (Var) clause); tle = tlistentry_member((Var) clause, get_targetlist(rel)); } set_varno(((Var) clause), varno); @@ -1223,7 +1223,7 @@ xfunc_clause_compare(void *arg1, void *arg2) } /* - ** xfunc_disjunct_sort -- + ** xfunc_disjunct_sort ** given a list of clauses, for each clause sort the disjuncts by cost ** (this assumes the predicates have been converted to Conjunctive NF) ** Modifies the clause list! @@ -1287,7 +1287,7 @@ xfunc_disjunct_compare(Query *queryInfo, void *arg1, void *arg2) /* ------------------------ UTILITY FUNCTIONS ------------------------------- */ /* - ** xfunc_func_width -- + ** xfunc_func_width ** Given a function OID and operands, find the width of the return value. */ int @@ -1349,7 +1349,7 @@ exit: } /* - ** xfunc_tuple_width -- + ** xfunc_tuple_width ** Return the sum of the lengths of all the attributes of a given relation */ int @@ -1371,7 +1371,7 @@ xfunc_tuple_width(Relation rd) } /* - ** xfunc_num_join_clauses -- + ** xfunc_num_join_clauses ** Find the number of join clauses associated with this join path */ int @@ -1388,7 +1388,7 @@ xfunc_num_join_clauses(JoinPath path) } /* - ** xfunc_LispRemove -- + ** xfunc_LispRemove ** Just like LispRemove, but it whines if the item to be removed ain't there */ LispValue @@ -1419,7 +1419,7 @@ do { \ } while(0) /* - ** xfunc_copyrel -- + ** xfunc_copyrel ** Just like _copyRel, but doesn't copy the paths */ bool diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 508ddcbe86d..c589b52c15b 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * createplan.c-- + * createplan.c * Routines to create the desired plan for processing a query * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.45 1999/02/12 17:24:51 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.46 1999/02/13 23:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -76,9 +76,9 @@ static Material *make_material(List *tlist, Oid nonameid, Plan *lefttree, int keycount); /* - * create_plan-- + * create_plan * Creates the access plan for a query by tracing backwards through the - * desired chain of pathnodes, starting at the node 'best-path'. For + * desired chain of pathnodes, starting at the node 'best_path'. For * every pathnode found: * (1) Create a corresponding plan node containing appropriate id, * target list, and qualification information. @@ -86,7 +86,7 @@ static Material *make_material(List *tlist, Oid nonameid, Plan *lefttree, * relative values. * (3) Target lists are not modified, but will be in another routine. * - * best-path is the best access path + * best_path is the best access path * * Returns the optimal(?) access plan. */ @@ -147,10 +147,10 @@ create_plan(Path *best_path) } /* - * create_scan_node-- - * Create a scan path for the parent relation of 'best-path'. + * create_scan_node + * Create a scan path for the parent relation of 'best_path'. * - * tlist is the targetlist for the base relation scanned by 'best-path' + * tlist is the targetlist for the base relation scanned by 'best_path' * * Returns the scan node. */ @@ -194,12 +194,12 @@ create_scan_node(Path *best_path, List *tlist) } /* - * create_join_node -- - * Create a join path for 'best-path' and(recursively) paths for its + * create_join_node + * Create a join path for 'best_path' and(recursively) paths for its * inner and outer paths. * * 'tlist' is the targetlist for the join relation corresponding to - * 'best-path' + * 'best_path' * * Returns the join node. */ @@ -260,7 +260,7 @@ create_join_node(JoinPath *best_path, List *tlist) /* * * Expensive function pullups may have pulled local predicates * - * into this path node. Put them in the qpqual of the plan node. * -- + * into this path node. Put them in the qpqual of the plan node. * * JMH, 6/15/92 */ if (get_loc_restrictinfo(best_path) != NIL) @@ -281,9 +281,9 @@ create_join_node(JoinPath *best_path, List *tlist) /* - * create_seqscan_node-- - * Returns a seqscan node for the base relation scanned by 'best-path' - * with restriction clauses 'scan-clauses' and targetlist 'tlist'. + * create_seqscan_node + * Returns a seqscan node for the base relation scanned by 'best_path' + * with restriction clauses 'scan_clauses' and targetlist 'tlist'. */ static SeqScan * create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses) @@ -309,9 +309,9 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses) } /* - * create_indexscan_node-- - * Returns a indexscan node for the base relation scanned by 'best-path' - * with restriction clauses 'scan-clauses' and targetlist 'tlist'. + * create_indexscan_node + * Returns a indexscan node for the base relation scanned by 'best_path' + * with restriction clauses 'scan_clauses' and targetlist 'tlist'. */ static IndexScan * create_indexscan_node(IndexPath *best_path, @@ -758,7 +758,7 @@ fix_indxqual_references(Node *clause, Path *index_path) /* - * switch_outer-- + * switch_outer * Given a list of merge clauses, rearranges the elements within the * clauses so the outer join variable is on the left and the inner is on * the right. @@ -798,7 +798,7 @@ switch_outer(List *clauses) } /* - * set-noname-tlist-operators-- + * set_noname_tlist_operators * Sets the key and keyop fields of resdom nodes in a target list. * * 'tlist' is the target list @@ -846,16 +846,16 @@ set_noname_tlist_operators(List *tlist, List *pathkeys, Oid *operators) *****************************************************************************/ /* - * make_noname-- + * make_noname * Create plan nodes to sort or materialize relations into noname. The - * result returned for a sort will look like (SEQSCAN(SORT(plan-node))) - * or (SEQSCAN(MATERIAL(plan-node))) + * result returned for a sort will look like (SEQSCAN(SORT(plan_node))) + * or (SEQSCAN(MATERIAL(plan_node))) * * 'tlist' is the target list of the scan to be sorted or hashed * 'pathkeys' is the list of keys which the sort or hash will be done on * 'operators' is the operators with which the sort or hash is to be done * (a list of operator OIDs) - * 'plan-node' is the node which yields tuples for the sort + * 'plan_node' is the node which yields tuples for the sort * 'nonametype' indicates which operation(sort or hash) to perform */ static Noname * diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 881accd2aaa..40ab228721d 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * initsplan.c-- + * initsplan.c * Target list, qualification, joininfo initialization routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.22 1999/02/03 21:16:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.23 1999/02/13 23:16:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,8 +39,8 @@ extern int Quiet; -static void add_clause_to_rels(Query *root, List *clause); -static void add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo, +static void add_restrict_and_join_to_rel(Query *root, List *clause); +static void add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo, List *join_relids); static void add_vars_to_targetlist(Query *root, List *vars, List *join_relids); @@ -55,16 +55,14 @@ static Oid hashjoinop(Expr *clause); *****************************************************************************/ /* - * init-base-rel-tlist-- + * make_var_only_tlist * Creates rel nodes for every relation mentioned in the target list * 'tlist' (if a node hasn't already been created) and adds them to - * *query-relation-list*. Creates targetlist entries for each member of + * *query_relation_list*. Creates targetlist entries for each member of * 'tlist' and adds them to the tlist field of the appropriate rel node. - * - * Returns nothing. */ void -init_base_rels_tlist(Query *root, List *tlist) +make_var_only_tlist(Query *root, List *tlist) { List *tlist_vars = NIL; List *l = NIL; @@ -80,20 +78,19 @@ init_base_rels_tlist(Query *root, List *tlist) /* now, the target list only contains Var nodes */ foreach(tvar, tlist_vars) { - Var *var; + Var *var = (Var *) lfirst(tvar); Index varno; RelOptInfo *result; - var = (Var *) lfirst(tvar); varno = var->varno; result = get_base_rel(root, varno); - add_tl_element(result, var); + add_var_to_tlist(result, var); } } /* - * add_missing-vars-to-tlist-- + * add_missing_vars_to_tlist * If we have range variable(s) in the FROM clause that does not appear * in the target list nor qualifications, we add it to the base relation * list. For instance, "select f.x from foo f, foo f2" is a join of f and @@ -121,7 +118,7 @@ add_missing_vars_to_tlist(Query *root, List *tlist) OIDOID, -1, 0, varno, ObjectIdAttributeNumber); /* add it to base_rel_list */ result = get_base_rel(root, varno); - add_tl_element(result, var); + add_var_to_tlist(result, var); } pfree(relids); varno++; @@ -139,25 +136,25 @@ add_missing_vars_to_tlist(Query *root, List *tlist) /* - * init-base-rels-qual-- + * add_restrict_and_join_to_rels- * Initializes RestrictInfo and JoinInfo fields of relation entries for all * relations appearing within clauses. Creates new relation entries if - * necessary, adding them to *query-relation-list*. + * necessary, adding them to *query_relation_list*. * * Returns nothing of interest. */ void -init_base_rels_qual(Query *root, List *clauses) +add_restrict_and_join_to_rels(Query *root, List *clauses) { List *clause; foreach(clause, clauses) - add_clause_to_rels(root, lfirst(clause)); + add_restrict_and_join_to_rel(root, lfirst(clause)); return; } /* - * add-clause-to-rels-- + * add_restrict_and_join_to_rel- * Add clause information to either the 'RestrictInfo' or 'JoinInfo' field * of a relation entry(depending on whether or not the clause is a join) * by creating a new RestrictInfo node and setting appropriate fields @@ -166,7 +163,7 @@ init_base_rels_qual(Query *root, List *clauses) * Returns nothing of interest. */ static void -add_clause_to_rels(Query *root, List *clause) +add_restrict_and_join_to_rel(Query *root, List *clause) { List *relids; List *vars; @@ -186,53 +183,43 @@ add_clause_to_rels(Query *root, List *clause) if (length(relids) == 1) { - RelOptInfo *rel = get_base_rel(root, lfirsti(relids)); - /* * There is only one relation participating in 'clause', so * 'clause' must be a restriction clause. */ + RelOptInfo *rel = get_base_rel(root, lfirsti(relids)); /* - * the selectivity of the clause must be computed regardless of + * The selectivity of the clause must be computed regardless of * whether it's a restriction or a join clause */ if (is_funcclause((Node *) clause)) - { /* * XXX If we have a func clause set selectivity to 1/3, really * need a true selectivity function. */ restrictinfo->selectivity = (Cost) 0.3333333; - } else - { restrictinfo->selectivity = compute_clause_selec(root, (Node *) clause, NIL); - } + rel->restrictinfo = lcons(restrictinfo, rel->restrictinfo); } else { - /* * 'clause' is a join clause, since there is more than one atom in * the relid list. */ - if (is_funcclause((Node *) clause)) - { - /* * XXX If we have a func clause set selectivity to 1/3, really * need a true selectivity function. */ restrictinfo->selectivity = (Cost) 0.3333333; - } else - { restrictinfo->selectivity = compute_clause_selec(root, (Node *) clause, NIL); - } + add_join_info_to_rels(root, restrictinfo, relids); /* we are going to be doing a join, so add var to targetlist */ add_vars_to_targetlist(root, vars, relids); @@ -240,19 +227,19 @@ add_clause_to_rels(Query *root, List *clause) } /* - * add-join-info-to-rels-- + * add_join_info_to_rels * For every relation participating in a join clause, add 'restrictinfo' to * the appropriate joininfo node(creating a new one and adding it to the * appropriate rel node if necessary). * * 'restrictinfo' describes the join clause - * 'join-relids' is the list of relations participating in the join clause + * 'join_relids' is the list of relations participating in the join clause * * Returns nothing. * */ static void -add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo, List *join_relids) +add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo, List *join_relids) { List *join_relid; @@ -276,7 +263,7 @@ add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo, List *join_relid } /* - * add-vars-to-targetlist-- + * add_vars_to_targetlist * For each variable appearing in a clause, * (1) If a targetlist entry for the variable is not already present in * the appropriate relation's target list, add one. @@ -285,7 +272,7 @@ add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo, List *join_relid * entry of the targetlist entry. * * 'vars' is the list of var nodes - * 'join-relids' is the list of relids appearing in the join clause + * 'join_relids' is the list of relids appearing in the join clause * (if this is a join clause) * * Returns nothing. @@ -305,7 +292,7 @@ add_vars_to_targetlist(Query *root, List *vars, List *join_relids) tlistentry = tlistentry_member(var, rel->targetlist); if (tlistentry == NULL) /* add a new entry */ - add_tl_element(rel, var); + add_var_to_tlist(rel, var); } } @@ -316,7 +303,7 @@ add_vars_to_targetlist(Query *root, List *vars, List *join_relids) *****************************************************************************/ /* - * init-join-info-- + * init_join_info * Set the MergeJoinable or HashJoinable field for every joininfo node * (within a rel node) and the MergeJoinOrder or HashJoinOp field for * each restrictinfo node(within a joininfo node) for all relations in a @@ -372,7 +359,7 @@ init_join_info(List *rel_list) } /* - * mergejoinop-- + * mergejoinop * Returns the mergejoin operator of an operator iff 'clause' is * mergejoinable, i.e., both operands are single vars and the operator is * a mergejoinable operator. @@ -406,7 +393,7 @@ mergejoinop(Expr *clause) } /* - * hashjoinop-- + * hashjoinop * Returns the hashjoin operator of an operator iff 'clause' is * hashjoinable, i.e., both operands are single vars and the operator is * a hashjoinable operator. diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index f724f39325b..8e56f228c56 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * planmain.c-- + * planmain.c * Routines to plan a single query * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.30 1999/02/09 17:03:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.31 1999/02/13 23:16:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -48,7 +48,7 @@ extern Plan *make_groupPlan(List **tlist, bool tuplePerGroup, List *groupClause, Plan *subplan); /* - * query_planner-- + * query_planner * Routine to create a query plan. It does so by first creating a * subplan for the topmost level of attributes in the query. Then, * it modifies all target list and qualifications to consider the next @@ -58,7 +58,7 @@ extern Plan *make_groupPlan(List **tlist, bool tuplePerGroup, * be placed where and any relation level qualifications to be * satisfied. * - * command-type is the query command, e.g., retrieve, delete, etc. + * command-type is the query command, e.g., select, delete, etc. * tlist is the target list of the query * qual is the qualification of the query * @@ -134,7 +134,6 @@ query_planner(Query *root, */ if (var_only_tlist == NULL && qual == NULL) { - switch (command_type) { case CMD_SELECT: @@ -143,7 +142,6 @@ query_planner(Query *root, (Node *) constant_qual, (Plan *) NULL)); break; - case CMD_DELETE: case CMD_UPDATE: { @@ -153,16 +151,13 @@ query_planner(Query *root, (Plan *) NULL); if (constant_qual != NULL) - { return ((Plan *) make_result(tlist, (Node *) constant_qual, (Plan *) scan)); - } else return (Plan *) scan; } break; - default: return (Plan *) NULL; } @@ -236,7 +231,7 @@ query_planner(Query *root, * Subplanner creates an entire plan consisting of joins and scans * for processing a single level of attributes. * - * flat-tlist is the flattened target list + * flat_tlist is the flattened target list * qual is the qualification to be satisfied * * Returns a subplan. @@ -258,8 +253,8 @@ subplanner(Query *root, root->base_rel_list = NIL; root->join_rel_list = NIL; - init_base_rels_tlist(root, flat_tlist); - init_base_rels_qual(root, qual); + make_var_only_tlist(root, flat_tlist); + add_restrict_and_join_to_rels(root, qual); add_missing_vars_to_tlist(root, flat_tlist); /* diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index c460bbdb971..5884391b0b8 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * planner.c-- + * planner.c * The query optimizer external interface. * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.43 1999/02/09 17:03:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.44 1999/02/13 23:16:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -91,7 +91,7 @@ planner(Query *parse) } /* - * union_planner-- + * union_planner * * Invokes the planner on union queries if there are any left, * recursing if necessary to get them all, then processes normal plans. @@ -357,7 +357,7 @@ union_planner(Query *parse) } /* - * make_sortplan-- + * make_sortplan * Returns a sortplan which is basically a SORT node attached to the * top of the plan returned from the planner. It also adds the * cost of sorting into the plan. diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index d8b1046fa07..78d76960f80 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * setrefs.c-- + * setrefs.c * Routines to change varno/attno entries to contain references * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.38 1999/02/09 17:03:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.39 1999/02/13 23:16:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,7 @@ static void set_result_tlist_references(Result *resultNode); *****************************************************************************/ /* - * set-tlist-references-- + * set_tlist_references * Modifies the target list of nodes in a plan to reference target lists * at lower levels. * @@ -85,7 +85,7 @@ set_tlist_references(Plan *plan) } /* - * set-join-tlist-references-- + * set_join_tlist_references * Modifies the target list of a join node by setting the varnos and * varattnos to reference the target list of the outer and inner join * relations. @@ -136,7 +136,7 @@ set_join_tlist_references(Join *join) } /* - * set-nonamescan-tlist-references-- + * set_nonamescan_tlist_references * Modifies the target list of a node that scans a noname relation (i.e., a * sort or hash node) so that the varnos refer to the child noname. * @@ -156,7 +156,7 @@ set_nonamescan_tlist_references(SeqScan *nonamescan) } /* - * set-noname-tlist-references-- + * set_noname_tlist_references * The noname's vars are made consistent with (actually, identical to) the * modified version of the target list of the node from which noname node * receives its tuples. @@ -182,14 +182,14 @@ set_noname_tlist_references(Noname *noname) } /* - * join-references-- + * join_references * Creates a new set of join clauses by replacing the varno/varattno * values of variables in the clauses to reference target list values * from the outer and inner join relation target lists. * * 'clauses' is the list of join clauses - * 'outer-tlist' is the target list of the outer join relation - * 'inner-tlist' is the target list of the inner join relation + * 'outer_tlist' is the target list of the outer join relation + * 'inner_tlist' is the target list of the inner join relation * * Returns the new join clauses. * @@ -205,16 +205,16 @@ join_references(List *clauses, } /* - * index-outerjoin-references-- + * index_outerjoin_references * Given a list of join clauses, replace the operand corresponding to the * outer relation in the join with references to the corresponding target - * list element in 'outer-tlist' (the outer is rather obscurely + * list element in 'outer_tlist' (the outer is rather obscurely * identified as the side that doesn't contain a var whose varno equals - * 'inner-relid'). + * 'inner_relid'). * * As a side effect, the operator is replaced by the regproc id. * - * 'inner-indxqual' is the list of join clauses (so-called because they + * 'inner_indxqual' is the list of join clauses (so-called because they * are used as qualifications for the inner (inbex) scan of a nestloop) * * Returns the new list of clauses. @@ -268,17 +268,17 @@ index_outerjoin_references(List *inner_indxqual, } /* - * replace-clause-joinvar-refs - * replace-subclause-joinvar-refs - * replace-joinvar-refs + * replace_clause_joinvar_refs + * replace_subclause_joinvar_refs + * replace_joinvar_refs * * Replaces all variables within a join clause with a new var node * whose varno/varattno fields contain a reference to a target list * element from either the outer or inner join relation. * * 'clause' is the join clause - * 'outer-tlist' is the target list of the outer join relation - * 'inner-tlist' is the target list of the inner join relation + * 'outer_tlist' is the target list of the outer join relation + * 'inner_tlist' is the target list of the inner join relation * * Returns the new join clause. * @@ -475,7 +475,7 @@ replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist) } /* - * tlist-noname-references-- + * tlist_noname_references * Creates a new target list for a node that scans a noname relation, * setting the varnos to the id of the noname relation and setting varids * if necessary (varids are only needed if this is a targetlist internal @@ -937,7 +937,7 @@ check_having_qual_for_vars(Node *clause, List *targetlist_so_far) /* Check if the VAR is already contained in the targetlist */ if (tlist_member((Var *) clause, (List *) targetlist_so_far) == NULL) - add_tl_element(&tmp_rel, (Var *) clause); + add_var_to_tlist(&tmp_rel, (Var *) clause); return tmp_rel.targetlist; } diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 8c106eb48e2..3e190c307c8 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * subselect.c-- + * subselect.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/prep/prepkeyset.c b/src/backend/optimizer/prep/prepkeyset.c index 406c6929d0e..979796ffe24 100644 --- a/src/backend/optimizer/prep/prepkeyset.c +++ b/src/backend/optimizer/prep/prepkeyset.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * prepkeyset.c-- + * prepkeyset.c * Special preperation for keyset queries. * * Copyright (c) 1994, Regents of the University of California @@ -14,7 +14,7 @@ #include "optimizer/planmain.h" /* - * Node_Copy-- + * Node_Copy * a macro to simplify calling of copyObject on the specified field */ #define Node_Copy(from, newnode, field) newnode->field = copyObject(from->field) diff --git a/src/backend/optimizer/prep/prepqual.c b/src/backend/optimizer/prep/prepqual.c index eed763422b8..39f863cde79 100644 --- a/src/backend/optimizer/prep/prepqual.c +++ b/src/backend/optimizer/prep/prepqual.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * prepqual.c-- + * prepqual.c * Routines for preprocessing the parse tree qualification * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.12 1999/02/03 21:16:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.13 1999/02/13 23:16:37 momjian Exp $ * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 5b31b2f578b..084809c9d9e 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * preptlist.c-- + * preptlist.c * Routines to preprocess the parse tree target list * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.17 1999/02/03 21:16:45 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.18 1999/02/13 23:16:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,7 +43,7 @@ static List *new_relation_targetlist(Oid relid, Index rt_index, /* - * preprocess-targetlist-- + * preprocess_targetlist * Driver for preprocessing the parse tree targetlist. * * 1. Deal with appends and replaces by filling missing attributes @@ -124,7 +124,7 @@ preprocess_targetlist(List *tlist, *****************************************************************************/ /* - * expand-targetlist-- + * expand_targetlist * Given a target list as generated by the parser and a result relation, * add targetlist entries for the attributes which have not been used. * @@ -235,9 +235,9 @@ replace_matching_resname(List *new_tlist, List *old_tlist) } /* - * new-relation-targetlist-- + * new_relation_targetlist * Generate a targetlist for the relation with relation OID 'relid' - * and rangetable index 'rt-index'. + * and rangetable index 'rt_index'. * * Returns the new targetlist. */ diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index cbc91efd571..b8b8a606656 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * prepunion.c-- + * prepunion.c * Routines to plan inheritance, union, and version queries * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.28 1999/02/03 21:16:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.29 1999/02/13 23:16:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -48,7 +48,7 @@ static Append *make_append(List *appendplans, List *unionrtables, Index rt_index /* - * plan-union-queries-- + * plan_union_queries * * Plans the queries for a given UNION. * @@ -204,7 +204,7 @@ plan_union_queries(Query *parse) /* - * plan-inherit-queries-- + * plan_inherit_queries * * Plans the queries for a given parent relation. * @@ -243,7 +243,7 @@ plan_inherit_queries(Query *parse, Index rt_index) } /* - * plan-inherit-query-- + * plan_inherit_query * Returns a list of plans for 'relids' and a list of range table entries * in union_rtentries. */ @@ -295,7 +295,7 @@ plan_inherit_query(List *relids, } /* - * find-all-inheritors - + * find_all_inheritors - * Returns a list of relids corresponding to relations that inherit * attributes from any relations listed in either of the argument relid * lists. @@ -310,7 +310,7 @@ find_all_inheritors(List *unexamined_relids, /* * Find all relations which inherit from members of - * 'unexamined-relids' and store them in 'new-inheritors'. + * 'unexamined_relids' and store them in 'new_inheritors'. */ List *rels = NIL; List *newrels = NIL; @@ -336,7 +336,7 @@ find_all_inheritors(List *unexamined_relids, } /* - * first-inherit-rt-entry - + * first_inherit_rt_entry - * Given a rangetable, find the first rangetable entry that represents * the appropriate special case. * @@ -361,11 +361,11 @@ first_inherit_rt_entry(List *rangetable) } /* - * new-rangetable-entry - - * Replaces the name and relid of 'old-entry' with the values for - * 'new-relid'. + * new_rangetable_entry - + * Replaces the name and relid of 'old_entry' with the values for + * 'new_relid'. * - * Returns a copy of 'old-entry' with the parameters substituted. + * Returns a copy of 'old_entry' with the parameters substituted. */ static RangeTblEntry * new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry) @@ -384,8 +384,8 @@ new_rangetable_entry(Oid new_relid, RangeTblEntry *old_entry) } /* - * subst-rangetable-- - * Replaces the 'index'th rangetable entry in 'root' with 'new-entry'. + * subst_rangetable + * Replaces the 'index'th rangetable entry in 'root' with 'new_entry'. * * Returns a new copy of 'root'. */ @@ -463,12 +463,12 @@ fix_parsetree_attnums_nodes(Index rt_index, } /* - * fix-parsetree-attnums-- + * fix_parsetree_attnums * Replaces attribute numbers from the relation represented by - * 'old-relid' in 'parsetree' with the attribute numbers from - * 'new-relid'. + * 'old_relid' in 'parsetree' with the attribute numbers from + * 'new_relid'. * - * Returns the destructively-modified parsetree. + * Returns the destructively_modified parsetree. * */ static void diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 9df6b6a2a5d..26ca6733590 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * clauses.c-- + * clauses.c * routines to manipulate qualification clauses * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.28 1999/02/03 21:16:51 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.29 1999/02/13 23:16:42 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -71,7 +71,7 @@ make_clause(int type, Node *oper, List *args) /* - * is_opclause-- + * is_opclause * * Returns t iff the clause is an operator clause: * (op expr expr) or (op expr). @@ -88,7 +88,7 @@ is_opclause(Node *clause) } /* - * make_opclause-- + * make_opclause * Creates a clause given its operator left operand and right * operand (if it is non-null). * @@ -106,7 +106,7 @@ make_opclause(Oper *op, Var *leftop, Var *rightop) } /* - * get_leftop-- + * get_leftop * * Returns the left operand of a clause of the form (op expr expr) * or (op expr) @@ -151,7 +151,7 @@ agg_clause(Node *clause) *****************************************************************************/ /* - * is_funcclause-- + * is_funcclause * * Returns t iff the clause is a function clause: (func { expr }). * @@ -164,7 +164,7 @@ is_funcclause(Node *clause) } /* - * make_funcclause-- + * make_funcclause * * Creates a function clause given the FUNC node and the functional * arguments. @@ -187,7 +187,7 @@ make_funcclause(Func *func, List *funcargs) *****************************************************************************/ /* - * or_clause-- + * or_clause * * Returns t iff the clause is an 'or' clause: (OR { expr }). * @@ -201,7 +201,7 @@ or_clause(Node *clause) } /* - * make_orclause-- + * make_orclause * * Creates an 'or' clause given a list of its subclauses. * @@ -223,7 +223,7 @@ make_orclause(List *orclauses) *****************************************************************************/ /* - * not_clause-- + * not_clause * * Returns t iff this is a 'not' clause: (NOT expr). * @@ -236,7 +236,7 @@ not_clause(Node *clause) } /* - * make_notclause-- + * make_notclause * * Create a 'not' clause given the expression to be negated. * @@ -254,7 +254,7 @@ make_notclause(Expr *notclause) } /* - * get_notclausearg-- + * get_notclausearg * * Retrieve the clause within a 'not' clause * @@ -271,7 +271,7 @@ get_notclausearg(Expr *notclause) /* - * and_clause-- + * and_clause * * Returns t iff its argument is an 'and' clause: (AND { expr }). * @@ -284,7 +284,7 @@ and_clause(Node *clause) } /* - * make_andclause-- + * make_andclause * * Create an 'and' clause given its arguments in a list. * @@ -308,7 +308,7 @@ make_andclause(List *andclauses) /* - * case_clause-- + * case_clause * * Returns t iff its argument is a 'case' clause: (CASE { expr }). * @@ -328,7 +328,7 @@ case_clause(Node *clause) /* - * pull-constant-clauses-- + * pull_constant_clauses * Scans through a list of qualifications and find those that * contain no variables. * @@ -356,7 +356,7 @@ pull_constant_clauses(List *quals, List **constantQual) } /* - * clause-relids-vars-- + * clause_relids_vars * Retrieves relids and vars appearing within a clause. * Returns ((relid1 relid2 ... relidn) (var1 var2 ... varm)) where * vars appear in the clause this is done by recursively searching @@ -399,8 +399,8 @@ clause_get_relids_vars(Node *clause, List **relids, List **vars) } /* - * NumRelids-- - * (formerly clause-relids) + * NumRelids + * (formerly clause_relids) * * Returns the number of different relations referenced in 'clause'. */ @@ -423,7 +423,7 @@ NumRelids(Node *clause) } /* - * contains-not-- + * contains_not * * Returns t iff the clause is a 'not' clause or if any of the * subclauses within an 'or' clause contain 'not's. @@ -453,7 +453,7 @@ contains_not(Node *clause) } /* - * is_joinable-- + * is_joinable * * Returns t iff 'clause' is a valid join clause. * @@ -487,7 +487,7 @@ is_joinable(Node *clause) } /* - * qual-clause-p-- + * qual_clause_p * * Returns t iff 'clause' is a valid qualification clause. * @@ -509,7 +509,7 @@ qual_clause_p(Node *clause) } /* - * fix-opid-- + * fix_opid * Calculate the opfid from the opno... * * Returns nothing. @@ -571,7 +571,7 @@ fix_opid(Node *clause) } /* - * fix-opids-- + * fix_opids * Calculate the opfid from the opno for all the clauses... * * Returns its argument. @@ -589,7 +589,7 @@ fix_opids(List *clauses) } /* - * get_relattval-- + * get_relattval * For a non-join clause, returns a list consisting of the * relid, * attno, @@ -716,7 +716,7 @@ get_relattval(Node *clause, } /* - * get_relsatts-- + * get_relsatts * * Returns a list * ( relid1 attno1 relid2 attno2 ) diff --git a/src/backend/optimizer/util/indexnode.c b/src/backend/optimizer/util/indexnode.c index dafeb8ddee3..64fcbbf8517 100644 --- a/src/backend/optimizer/util/indexnode.c +++ b/src/backend/optimizer/util/indexnode.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * indexnode.c-- + * indexnode.c * Routines to find all indices on a relation * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.13 1999/02/12 05:56:55 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.14 1999/02/13 23:16:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ static List *find_secondary_index(Query *root, Oid relid); /* - * find-relation-indices-- + * find_relation_indices * Returns a list of index nodes containing appropriate information for * each (secondary) index defined on a relation. * @@ -42,7 +42,7 @@ find_relation_indices(Query *root, RelOptInfo *rel) } /* - * find-secondary-index-- + * find_secondary_index * Creates a list of index path nodes containing information for each * secondary index defined on a relation by searching through the index * catalog. diff --git a/src/backend/optimizer/util/joininfo.c b/src/backend/optimizer/util/joininfo.c index dc28c95d79f..4b9dce6e5a3 100644 --- a/src/backend/optimizer/util/joininfo.c +++ b/src/backend/optimizer/util/joininfo.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * joininfo.c-- + * joininfo.c * JoinInfo node manipulation routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.14 1999/02/10 21:02:40 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.15 1999/02/13 23:16:45 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,16 +22,16 @@ /* - * joininfo-member-- + * joininfo_member * Determines whether a node has already been created for a join * between a set of join relations and the relation described by - * 'joininfo-list'. + * 'joininfo_list'. * - * 'join-relids' is a list of relids corresponding to the join relation - * 'joininfo-list' is the list of joininfo nodes against which this is + * 'join_relids' is a list of relids corresponding to the join relation + * 'joininfo_list' is the list of joininfo nodes against which this is * checked * - * Returns the corresponding node in 'joininfo-list' if such a node + * Returns the corresponding node in 'joininfo_list' if such a node * exists. * */ @@ -52,9 +52,9 @@ joininfo_member(List *join_relids, List *joininfo_list) /* - * find-joininfo-node-- + * find_joininfo_node * Find the joininfo node within a relation entry corresponding - * to a join between 'this_rel' and the relations in 'join-relids'. A + * to a join between 'this_rel' and the relations in 'join_relids'. A * new node is created and added to the relation entry's joininfo * field if the desired one can't be found. * @@ -81,7 +81,7 @@ find_joininfo_node(RelOptInfo *this_rel, List *join_relids) } /* - * other-join-clause-var-- + * other_join_clause_var * Determines whether a var node is contained within a joinclause * of the form(op var var). * diff --git a/src/backend/optimizer/util/keys.c b/src/backend/optimizer/util/keys.c index b82c807e7e0..cfd2f26d26a 100644 --- a/src/backend/optimizer/util/keys.c +++ b/src/backend/optimizer/util/keys.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * keys.c-- + * keys.c * Key manipulation routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.16 1999/02/11 17:00:48 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.17 1999/02/13 23:16:45 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ static bool equal_indexkey_var(int index_key, Var *var); * where subkeyI is a var node * note that the 'Keys field is a list of these * 3. join key - * (outer-subkey inner-subkey) + * (outer_subkey inner_subkey) * where each subkey is a var node * 4. sort key * one of: @@ -48,8 +48,8 @@ static bool equal_indexkey_var(int index_key, Var *var); */ /* - * match-indexkey-operand-- - * Returns t iff an index key 'index-key' matches the given clause + * match_indexkey_operand + * Returns t iff an index key 'index_key' matches the given clause * operand. * */ @@ -65,8 +65,8 @@ match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel) } /* - * equal_indexkey_var-- - * Returns t iff an index key 'index-key' matches the corresponding + * equal_indexkey_var + * Returns t iff an index key 'index_key' matches the corresponding * fields of var node 'var'. * */ @@ -80,7 +80,7 @@ equal_indexkey_var(int index_key, Var *var) } /* - * extract-join-subkey-- + * extract_join_subkey * Returns the subkey in a join key corresponding to the outer or inner * relation. * @@ -106,7 +106,7 @@ extract_join_subkey(JoinKey *jk, int which_subkey) } /* - * pathkeys_match-- + * pathkeys_match * Returns t iff two sets of path keys are equivalent. They are * equivalent if the first Var nodes match the second Var nodes. * @@ -169,14 +169,14 @@ pathkeys_match(List *keys1, List *keys2, int *better_key) } /* - * collect-index-pathkeys-- + * collect_index_pathkeys * Creates a list of subkeys by retrieving var nodes corresponding to - * each index key in 'index-keys' from the relation's target list + * each index key in 'index_keys' from the relation's target list * 'tlist'. If the key is not in the target list, the key is irrelevant * and is thrown away. The returned subkey list is of the form: * ((var1) (var2) ... (varn)) * - * 'index-keys' is a list of index keys + * 'index_keys' is a list of index keys * 'tlist' is a relation target list * * Returns the list of cons'd subkeys. diff --git a/src/backend/optimizer/util/ordering.c b/src/backend/optimizer/util/ordering.c index 268f16df0e2..eef0fbb3141 100644 --- a/src/backend/optimizer/util/ordering.c +++ b/src/backend/optimizer/util/ordering.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * ordering.c-- + * ordering.c * Routines to manipulate and compare merge and path orderings * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.14 1999/02/11 21:05:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.15 1999/02/13 23:16:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ static bool sortops_order_match(Oid *ordering1, Oid *ordering2, int *better_sort); /* - * equal-path-ordering-- + * equal_path_ordering * Returns t iff two path orderings are equal. * */ @@ -83,7 +83,7 @@ pathorder_match(PathOrder *path_ordering1, } /* - * equal-path-merge-ordering-- + * equal_path_merge_ordering * Returns t iff a path ordering is usable for ordering a merge join. * * XXX Presently, this means that the first sortop of the path matches @@ -106,7 +106,7 @@ equal_path_merge_ordering(Oid *path_ordering, } /* - * equal-merge-ordering-- + * equal_merge_ordering * Returns t iff two merge orderings are equal. * */ diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 5618ae6b76e..cf3072a8be7 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * pathnode.c-- + * pathnode.c * Routines to manipulate pathlists and create path nodes * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.34 1999/02/12 06:43:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.35 1999/02/13 23:16:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -37,7 +37,7 @@ static Path *better_path(Path *new_path, List *unique_paths, bool *is_new); *****************************************************************************/ /* - * path-is-cheaper-- + * path_is_cheaper * Returns t iff 'path1' is cheaper than 'path2'. * */ @@ -51,11 +51,11 @@ path_is_cheaper(Path *path1, Path *path2) } /* - * set_cheapest-- + * set_cheapest * Finds the minimum cost path from among a relation's paths. * - * 'parent-rel' is the parent relation - * 'pathlist' is a list of path nodes corresponding to 'parent-rel' + * 'parent_rel' is the parent relation + * 'pathlist' is a list of path nodes corresponding to 'parent_rel' * * Returns and sets the relation entry field with the pathnode that * is minimum. @@ -86,14 +86,14 @@ set_cheapest(RelOptInfo *parent_rel, List *pathlist) } /* - * add_pathlist-- - * For each path in the list 'new-paths', add to the list 'unique-paths' + * add_pathlist + * For each path in the list 'new_paths', add to the list 'unique_paths' * only those paths that are unique (i.e., unique ordering and ordering * keys). Should a conflict arise, the more expensive path is thrown out, * thereby pruning the plan space. But we don't prune if xfunc * told us not to. * - * 'parent-rel' is the relation entry to which these paths correspond. + * 'parent_rel' is the relation entry to which these paths correspond. * * Returns the list of unique pathnodes. * @@ -140,15 +140,15 @@ add_pathlist(RelOptInfo *parent_rel, List *unique_paths, List *new_paths) } /* - * better_path-- - * Determines whether 'new-path' has the same ordering and keys as some - * path in the list 'unique-paths'. If there is a redundant path, + * better_path + * Determines whether 'new_path' has the same ordering and keys as some + * path in the list 'unique_paths'. If there is a redundant path, * eliminate the more expensive path. * * Returns: - * The old path - if 'new-path' matches some path in 'unique-paths' and is + * The old path - if 'new_path' matches some path in 'unique_paths' and is * cheaper - * nil - if 'new-path' matches but isn't cheaper + * nil - if 'new_path' matches but isn't cheaper * t - if there is no path in the list with the same ordering and keys * */ @@ -269,7 +269,7 @@ better_path(Path *new_path, List *unique_paths, bool *is_new) *****************************************************************************/ /* - * create_seqscan_path-- + * create_seqscan_path * Creates a path corresponding to a sequential scan, returning the * pathnode. * @@ -290,7 +290,7 @@ create_seqscan_path(RelOptInfo *rel) pathnode->pathkeys = NIL; /* - * copy restrictinfo list into path for expensive function processing -- + * copy restrictinfo list into path for expensive function processing * JMH, 7/7/92 */ pathnode->loc_restrictinfo = (List *) copyObject((Node *) rel->restrictinfo); @@ -311,13 +311,13 @@ create_seqscan_path(RelOptInfo *rel) } /* - * create_index_path-- + * create_index_path * Creates a single path node for an index scan. * * 'rel' is the parent rel * 'index' is the pathnode for the index on 'rel' - * 'restriction-clauses' is a list of restriction clause nodes. - * 'is-join-scan' is a flag indicating whether or not the index is being + * 'restriction_clauses' is a list of restriction clause nodes. + * 'is_join_scan' is a flag indicating whether or not the index is being * considered because of its sort order. * * Returns the new path node. @@ -343,7 +343,7 @@ create_index_path(Query *root, pathnode->indexqual = NIL; /* - * copy restrictinfo list into path for expensive function processing -- + * copy restrictinfo list into path for expensive function processing * JMH, 7/7/92 */ pathnode->path.loc_restrictinfo = set_difference((List *) copyObject((Node *) rel->restrictinfo), @@ -460,7 +460,7 @@ create_index_path(Query *root, } /* - * create_nestloop_path-- + * create_nestloop_path * Creates a pathnode corresponding to a nestloop join between two * relations. * @@ -523,7 +523,7 @@ create_nestloop_path(RelOptInfo *joinrel, } /* - * create_mergejoin_path-- + * create_mergejoin_path * Creates a pathnode corresponding to a mergejoin join between * two relations * diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 0a852553944..79d6c2fe310 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * - * plancat.c-- + * plancat.c * routines for accessing the system catalogs * * @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.24 1999/02/03 21:16:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.25 1999/02/13 23:16:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -47,7 +47,7 @@ static void IndexSelectivity(Oid indexrelid, Oid indrelid, int32 nIndexKeys, /* - * relation-info - + * relation_info - * Retrieves catalog information for a given relation. Given the oid of * the relation, return the following information: * whether the relation has secondary indices @@ -85,7 +85,7 @@ relation_info(Query *root, Index relid, /* - * index-info-- + * index_info * Retrieves catalog information on an index on a given relation. * * The index relation is opened on the first invocation. The current @@ -225,7 +225,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info) } /* - * index-selectivity-- + * index_selectivity * * Call util/plancat.c:IndexSelectivity with the indicated arguments. * @@ -308,7 +308,7 @@ index_selectivity(Oid indid, } /* - * restriction_selectivity in lisp system.-- + * restriction_selectivity in lisp system. * * NOTE: The routine is now merged with RestrictionClauseSelectivity * as defined in plancat.c @@ -349,7 +349,7 @@ restriction_selectivity(Oid functionObjectId, } /* - * join_selectivity-- + * join_selectivity * Similarly, this routine is merged with JoinClauseSelectivity in * plancat.c * @@ -388,7 +388,7 @@ join_selectivity(Oid functionObjectId, } /* - * find_all_inheritors-- + * find_all_inheritors * * Returns a LISP list containing the OIDs of all relations which * inherits from the relation with OID 'inhparent'. @@ -424,7 +424,7 @@ find_inheritance_children(Oid inhparent) #ifdef NOT_USED /* - * VersionGetParents-- + * VersionGetParents * * Returns a LISP list containing the OIDs of all relations which are * base relations of the relation with OID 'verrelid'. @@ -469,7 +469,7 @@ VersionGetParents(Oid verrelid) *****************************************************************************/ /* - * IdexSelectivity-- + * IdexSelectivity * * Retrieves the 'amopnpages' and 'amopselect' parameters for each * AM operator when a given index (specified by 'indexrelid') is used. diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index fd474f65c07..1b0c1d69474 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * relnode.c-- + * relnode.c * Relation manipulation routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.12 1999/02/12 05:56:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.13 1999/02/13 23:16:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ /* - * get_base_rel-- + * get_base_rel * Returns relation entry corresponding to 'relid', creating a new one if * necessary. This is for base relations. * @@ -93,7 +93,7 @@ get_base_rel(Query *root, int relid) } /* - * get_join_rel-- + * get_join_rel * Returns relation entry corresponding to 'relid' (a list of relids), * creating a new one if necessary. This is for join relations. * @@ -105,7 +105,7 @@ get_join_rel(Query *root, List *relid) } /* - * rel-member-- + * rel_member * Determines whether a relation of id 'relid' is contained within a list * 'rels'. * diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index 22ffe665e2e..374533a4222 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * restrictinfo.c-- + * restrictinfo.c * RestrictInfo node manipulation routines. * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.1 1999/02/05 19:59:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.2 1999/02/13 23:16:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,13 +21,13 @@ #include "optimizer/restrictinfo.h" /* - * valid-or-clause-- + * valid_or_clause * * Returns t iff the restrictinfo node contains a 'normal' 'or' clause. * */ bool -valid_or_clause(RestrictInfo * restrictinfo) +valid_or_clause(RestrictInfo *restrictinfo) { if (restrictinfo != NULL && !single_node((Node *) restrictinfo->clause) && @@ -39,9 +39,9 @@ valid_or_clause(RestrictInfo * restrictinfo) } /* - * get-actual-clauses-- + * get_actual_clauses * - * Returns a list containing the clauses from 'restrictinfo-list'. + * Returns a list containing the clauses from 'restrictinfo_list'. * */ List * @@ -68,7 +68,7 @@ get_actual_clauses(List *restrictinfo_list) */ /* - * get_relattvals-- + * get_relattvals * For each member of a list of restrictinfo nodes to be used with an * index, create a vectori-long specifying: * the attnos, @@ -79,7 +79,7 @@ get_actual_clauses(List *restrictinfo_list) * flag indicating whether the constant is on the left or right should * always be *SELEC-CONSTANT-RIGHT*. * - * 'restrictinfo-list' is a list of restrictinfo nodes + * 'restrictinfo_list' is a list of restrictinfo nodes * * Returns a list of vectori-longs. * @@ -117,7 +117,7 @@ get_relattvals(List *restrictinfo_list, } /* - * get_joinvars -- + * get_joinvars * Given a list of join restrictinfo nodes to be used with the index * of an inner join relation, return three lists consisting of: * the attributes corresponding to the inner join relation @@ -126,7 +126,7 @@ get_relattvals(List *restrictinfo_list, * the operator. * * 'relid' is the inner join relation - * 'restrictinfo-list' is a list of qualification clauses to be used with + * 'restrictinfo_list' is a list of qualification clauses to be used with * 'rel' * */ @@ -168,7 +168,7 @@ get_joinvars(Oid relid, } /* - * get_opnos-- + * get_opnos * Create and return a list containing the clause operators of each member * of a list of restrictinfo nodes to be used with an index. * diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index f844ca89060..29013f59ffd 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * tlist.c-- + * tlist.c * Target list manipulation routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.25 1999/02/10 21:02:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.26 1999/02/13 23:16:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -34,13 +34,13 @@ static Node *flatten_tlistentry(Node *tlistentry, List *flat_tlist); *****************************************************************************/ /* - * tlistentry-member-- + * tlistentry_member * * RETURNS: the leftmost member of sequence "targetlist" that satisfies * the predicate "var_equal" * MODIFIES: nothing * REQUIRES: test = function which can operate on a lispval union - * var = valid var-node + * var = valid var_node * targetlist = valid sequence */ TargetEntry * @@ -61,7 +61,7 @@ tlistentry_member(Var *var, List *targetlist) } /* - * matching_tlvar-- + * matching_tlvar * * RETURNS: var node in a target list which is var_equal to 'var', * if one exists. @@ -81,7 +81,7 @@ matching_tlvar(Var *var, List *targetlist) } /* - * add_tl_element-- + * add_var_to_tlist * Creates a targetlist entry corresponding to the supplied var node * * 'var' and adds the new targetlist entry to the targetlist field of @@ -90,10 +90,10 @@ matching_tlvar(Var *var, List *targetlist) * RETURNS: nothing * MODIFIES: vartype and varid fields of leftmost varnode that matches * argument "var" (sometimes). - * CREATES: new var-node iff no matching var-node exists in targetlist + * CREATES: new var_node iff no matching var_node exists in targetlist */ void -add_tl_element(RelOptInfo *rel, Var *var) +add_var_to_tlist(RelOptInfo *rel, Var *var) { Expr *oldvar = (Expr *) NULL; @@ -121,12 +121,12 @@ add_tl_element(RelOptInfo *rel, Var *var) } /* - * create_tl_element-- + * create_tl_element * Creates a target list entry node and its associated (resdom var) pair * with its resdom number equal to 'resdomno' and the joinlist field set * to 'joinlist'. * - * RETURNS: newly created tlist-entry + * RETURNS: newly created tlist_entry * CREATES: new targetlist entry (always). */ TargetEntry * @@ -144,7 +144,7 @@ create_tl_element(Var *var, int resdomno) } /* - * get-actual-tlist-- + * get_actual_tlist * Returns the targetlist elements from a relation tlist. * */ @@ -184,7 +184,7 @@ get_actual_tlist(List *tlist) *****************************************************************************/ /* - * tlist-member-- + * tlist_member * Determines whether a var node is already contained within a * target list. * @@ -245,7 +245,7 @@ tlist_resdom(List *tlist, Resdom *resnode) /* - * match_varid-- + * match_varid * Searches a target list for an entry with some desired varid. * * 'varid' is the desired id @@ -299,7 +299,7 @@ match_varid(Var *test_var, List *tlist) /* - * new-unsorted-tlist-- + * new_unsorted_tlist * Creates a copy of a target list by creating new resdom nodes * without sort information. * @@ -325,7 +325,7 @@ new_unsorted_tlist(List *targetlist) } /* - * copy-vars-- + * copy_vars * Replaces the var nodes in the first target list with those from * the second target list. The two target lists are assumed to be * identical except their actual resdoms and vars are different. @@ -355,7 +355,7 @@ copy_vars(List *target, List *source) } /* - * flatten-tlist-- + * flatten_tlist * Create a target list that only contains unique variables. * * @@ -407,13 +407,13 @@ flatten_tlist(List *tlist) } /* - * flatten-tlist-vars-- + * flatten_tlist_vars * Redoes the target list of a query with no nested attributes by * replacing vars within computational expressions with vars from * the 'flattened' target list of the query. * - * 'full-tlist' is the actual target list - * 'flat-tlist' is the flattened (var-only) target list + * 'full_tlist' is the actual target list + * 'flat_tlist' is the flattened (var-only) target list * * Returns the modified actual target list. * @@ -437,12 +437,12 @@ flatten_tlist_vars(List *full_tlist, List *flat_tlist) } /* - * flatten-tlistentry-- + * flatten_tlistentry * Replaces vars within a target list entry with vars from a flattened * target list. * * 'tlistentry' is the target list entry to be modified - * 'flat-tlist' is the flattened target list + * 'flat_tlist' is the flattened target list * * Returns the (modified) target_list entry from the target list. * diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index 462fd9e7df6..0e4b350c52c 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * - * var.c-- + * var.c * Var node manipulation routines * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.15 1999/01/24 00:28:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.16 1999/02/13 23:16:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -67,7 +67,7 @@ pull_varnos(Node *me) } /* - * contain_var_clause-- + * contain_var_clause * Recursively find var nodes from a clause by pulling vars from the * left and right operands of the clause. * @@ -157,7 +157,7 @@ contain_var_clause(Node *clause) } /* - * pull_var_clause-- + * pull_var_clause * Recursively pulls all var nodes from a clause by pulling vars from the * left and right operands of the clause. * |