Optmizer cleanup

This commit is contained in:
Bruce Momjian 1999-02-10 21:02:50 +00:00
parent d5a785cd5a
commit 9dbb0efb0b
30 changed files with 161 additions and 162 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.28 1999/02/10 03:52:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.29 1999/02/10 21:02:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.5 1999/02/10 03:52:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.6 1999/02/10 21:02:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_eval.c,v 1.26 1999/02/03 21:16:19 momjian Exp $ * $Id: geqo_eval.c,v 1.27 1999/02/10 21:02:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_misc.c,v 1.13 1999/02/10 03:52:37 momjian Exp $ * $Id: geqo_misc.c,v 1.14 1999/02/10 21:02:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_paths.c,v 1.14 1999/02/09 03:51:15 momjian Exp $ * $Id: geqo_paths.c,v 1.15 1999/02/10 21:02:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.8 1998/09/01 04:29:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.9 1999/02/10 21:02:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.26 1999/02/10 03:52:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.27 1999/02/10 21:02:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.28 1999/02/10 03:52:39 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.29 1999/02/10 21:02:37 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.41 1999/02/10 03:52:39 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.42 1999/02/10 21:02:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.18 1999/02/10 17:14:30 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.19 1999/02/10 21:02:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -59,7 +59,6 @@ static List *hash_inner_and_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, R
* If bushy trees are considered, may modify the relid field of the * If bushy trees are considered, may modify the relid field of the
* join rel nodes to flatten the lists. * join rel nodes to flatten the lists.
* *
* Returns nothing of interest. (?)
* It does a destructive modification. * It does a destructive modification.
*/ */
void void

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.17 1999/02/03 21:16:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.18 1999/02/10 21:02:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.15 1999/02/10 17:14:30 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.16 1999/02/10 21:02:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -135,7 +135,7 @@ match_pathkey_joinkeys(List *pathkey,
{ {
jk = (JoinKey *) lfirst(x); jk = (JoinKey *) lfirst(x);
if (var_equal(path_subkey, if (var_equal(path_subkey,
extract_subkey(jk, which_subkey))) extract_join_subkey(jk, which_subkey)))
return pos; return pos;
pos++; pos++;
} }
@ -183,7 +183,7 @@ every_func(List *joinkeys, List *pathkey, int which_subkey)
temp = (Var *) lfirst((List *) lfirst(j)); temp = (Var *) lfirst((List *) lfirst(j));
if (temp == NULL) if (temp == NULL)
continue; continue;
tempkey = extract_subkey(xjoinkey, which_subkey); tempkey = extract_join_subkey(xjoinkey, which_subkey);
if (var_equal(tempkey, temp)) if (var_equal(tempkey, temp))
{ {
found = true; found = true;
@ -267,7 +267,7 @@ extract_path_keys(List *joinkeys,
/* /*
* find the right Var in the target list for this key * find the right Var in the target list for this key
*/ */
var = (Var *) extract_subkey(jkey, which_subkey); var = (Var *) extract_join_subkey(jkey, which_subkey);
key = (Var *) matching_tlvar(var, tlist); key = (Var *) matching_tlvar(var, tlist);
/* /*

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.17 1999/02/10 03:52:41 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.18 1999/02/10 21:02:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.25 1999/02/09 03:51:21 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.26 1999/02/10 21:02:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.24 1999/02/03 21:16:29 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.25 1999/02/10 21:02:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.11 1999/02/03 20:15:42 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.12 1999/02/10 21:02:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.13 1999/02/03 20:15:42 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.14 1999/02/10 21:02:40 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.13 1999/02/10 03:52:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.14 1999/02/10 21:02:41 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -80,13 +80,13 @@ equal_indexkey_var(int index_key, Var *var)
} }
/* /*
* extract-subkey-- * extract-join-subkey--
* Returns the subkey in a join key corresponding to the outer or inner * Returns the subkey in a join key corresponding to the outer or inner
* lelation. * relation.
* *
*/ */
Var * Var *
extract_subkey(JoinKey *jk, int which_subkey) extract_join_subkey(JoinKey *jk, int which_subkey)
{ {
Var *retval; Var *retval;
@ -99,7 +99,7 @@ extract_subkey(JoinKey *jk, int which_subkey)
retval = jk->inner; retval = jk->inner;
break; break;
default: /* do nothing */ default: /* do nothing */
elog(DEBUG, "extract_subkey with neither INNER or OUTER"); elog(DEBUG, "extract_join_subkey with neither INNER or OUTER");
retval = NULL; retval = NULL;
} }
return retval; return retval;

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.22 1999/02/10 03:52:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.23 1999/02/10 21:02:43 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.24 1999/02/07 03:02:21 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.25 1999/02/10 21:02:43 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: cost.h,v 1.13 1999/02/10 03:52:53 momjian Exp $ * $Id: cost.h,v 1.14 1999/02/10 21:02:43 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo.h,v 1.9 1998/09/01 04:36:56 momjian Exp $ * $Id: geqo.h,v 1.10 1999/02/10 21:02:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_misc.h,v 1.7 1998/09/01 04:36:59 momjian Exp $ * $Id: geqo_misc.h,v 1.8 1999/02/10 21:02:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: geqo_paths.h,v 1.6 1998/09/01 04:37:02 momjian Exp $ * $Id: geqo_paths.h,v 1.7 1999/02/10 21:02:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: joininfo.h,v 1.8 1998/09/01 04:37:10 momjian Exp $ * $Id: joininfo.h,v 1.9 1999/02/10 21:02:48 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: keys.h,v 1.8 1998/09/01 04:37:11 momjian Exp $ * $Id: keys.h,v 1.9 1999/02/10 21:02:48 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -17,7 +17,7 @@
#include "nodes/relation.h" #include "nodes/relation.h"
extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel); extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel);
extern Var *extract_subkey(JoinKey *jk, int which_subkey); extern Var *extract_join_subkey(JoinKey *jk, int which_subkey);
extern bool samekeys(List *keys1, List *keys2); extern bool samekeys(List *keys1, List *keys2);
extern List *collect_index_pathkeys(int *index_keys, List *tlist); extern List *collect_index_pathkeys(int *index_keys, List *tlist);

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pathnode.h,v 1.11 1999/02/10 03:52:54 momjian Exp $ * $Id: pathnode.h,v 1.12 1999/02/10 21:02:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -7,7 +7,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: paths.h,v 1.12 1999/02/04 03:19:11 momjian Exp $ * $Id: paths.h,v 1.13 1999/02/10 21:02:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: tlist.h,v 1.13 1998/09/01 04:37:21 momjian Exp $ * $Id: tlist.h,v 1.14 1999/02/10 21:02:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */

View File

@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: xfunc.h,v 1.11 1999/02/03 20:15:53 momjian Exp $ * $Id: xfunc.h,v 1.12 1999/02/10 21:02:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */