Optimizer cleanup.

This commit is contained in:
Bruce Momjian 1999-02-05 19:59:31 +00:00
parent d5db88142c
commit 6e2edaf4b8
10 changed files with 28 additions and 28 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.61 1999/02/04 03:19:06 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.62 1999/02/05 19:59:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1343,7 +1343,7 @@ _copyRestrictInfo(RestrictInfo * from)
Node_Copy(from, newnode, indexids);
Node_Copy(from, newnode, mergejoinorder);
newnode->hashjoinoperator = from->hashjoinoperator;
newnode->cinfojoinid = listCopy(from->cinfojoinid);
newnode->restrictinfojoinid = listCopy(from->restrictinfojoinid);
return newnode;
}

View File

@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: outfuncs.c,v 1.64 1999/02/04 01:46:54 momjian Exp $
* $Id: outfuncs.c,v 1.65 1999/02/05 19:59:25 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@ -1107,7 +1107,7 @@ _outMergeOrder(StringInfo str, MergeOrder *node)
static void
_outRestrictInfo(StringInfo str, RestrictInfo * node)
{
appendStringInfo(str, " CINFO :clause ");
appendStringInfo(str, " RESTRICTINFO :clause ");
_outNode(str, node->clause);
appendStringInfo(str,

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.48 1999/02/04 03:19:06 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.49 1999/02/05 19:59:25 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@ -2087,13 +2087,13 @@ parsePlanString(void)
return_value = _readJoinKey();
else if (!strncmp(token, "MERGEORDER", length))
return_value = _readMergeOrder();
else if (!strncmp(token, "CLAUSEINFO", length))
else if (!strncmp(token, "RETRICTINFO", length))
return_value = _readRestrictInfo();
else if (!strncmp(token, "JOINMETHOD", length))
return_value = _readJoinMethod();
else if (!strncmp(token, "JOININFO", length))
return_value = _readJoinInfo();
else if (!strncmp(token, "HINFO", length))
else if (!strncmp(token, "HASHINFO", length))
return_value = _readHashInfo();
else if (!strncmp(token, "ITER", length))
return_value = _readIter();

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.37 1999/02/03 21:16:26 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.38 1999/02/05 19:59:26 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 * clauseInfo, 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);
@ -571,14 +571,14 @@ group_clauses_by_ikey_for_joins(RelOptInfo * rel,
*
*/
static RestrictInfo *
match_clause_to_indexkey(RelOptInfo * rel,
RelOptInfo * index,
match_clause_to_indexkey(RelOptInfo *rel,
RelOptInfo *index,
int indexkey,
int xclass,
RestrictInfo * clauseInfo,
RestrictInfo *restrictInfo,
bool join)
{
Expr *clause = clauseInfo->clause;
Expr *clause = restrictInfo->clause;
Var *leftop,
*rightop;
Oid join_op = InvalidOid;
@ -761,7 +761,7 @@ match_clause_to_indexkey(RelOptInfo * rel,
}
if (isIndexable)
return clauseInfo;
return restrictInfo;
return NULL;
}
@ -1208,7 +1208,7 @@ indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
{
List *clauses = lfirst(clausegroups);
((RestrictInfo *) lfirst(clauses))->cinfojoinid = joininfo->otherrels;
((RestrictInfo *) lfirst(clauses))->restrictinfojoinid = joininfo->otherrels;
}
cg_list = nconc(cg_list, clausegroups);
}
@ -1298,7 +1298,7 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
pathnode->indexkeys = index->indexkeys;
pathnode->indexqual = clausegroup;
pathnode->path.joinid = ((RestrictInfo *) lfirst(clausegroup))->cinfojoinid;
pathnode->path.joinid = ((RestrictInfo *) lfirst(clausegroup))->restrictinfojoinid;
pathnode->path.path_cost = cost_index((Oid) lfirsti(index->relids),
(int) temp_pages,

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.21 1999/02/05 03:43:05 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.22 1999/02/05 19:59:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -64,9 +64,9 @@ prune_joinrel(RelOptInfo *rel, List *other_rels)
List *r1 = NIL;
List *result = NIL;
foreach(r1, other_rels)
foreach(i, other_rels)
{
RelOptInfo *other_rel = (RelOptInfo *) lfirst(r1);
RelOptInfo *other_rel = (RelOptInfo *) lfirst(i);
if (same(rel->relids, other_rel->relids))
/*

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.36 1999/02/03 21:16:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.37 1999/02/05 19:59:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -321,7 +321,7 @@ create_indexscan_node(IndexPath *best_path,
/*
* Extract the(first if conjunct, only if disjunct) clause from the
* clauseinfo list.
* restrictinfo list.
*/
Expr *index_clause = (Expr *) NULL;
List *indxqual = NIL;

View File

@ -4,7 +4,7 @@
# Makefile for optimizer/util
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.7 1998/07/20 20:01:48 momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/optimizer/util/Makefile,v 1.8 1999/02/05 19:59:28 momjian Exp $
#
#-------------------------------------------------------------------------
@ -13,7 +13,7 @@ include ../../../Makefile.global
CFLAGS += -I../..
OBJS = clauseinfo.o clauses.o indexnode.o plancat.o \
OBJS = restrictinfo.o clauses.o indexnode.o plancat.o \
joininfo.o keys.o ordering.o pathnode.o relnode.o tlist.o var.o
# not ready yet: predmig.o xfunc.o

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.9 1999/02/03 21:16:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.10 1999/02/05 19:59:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -44,7 +44,7 @@ equal_path_path_ordering(PathOrder *path_ordering1,
path_ordering2->ordtype == SORTOP_ORDER)
{
return (equal_sortops_order(path_ordering1->ord.sortop,
path_ordering2->ord.sortop));
path_ordering2->ord.sortop));
}
else if (path_ordering1->ordtype == MERGE_ORDER &&
path_ordering2->ordtype == SORTOP_ORDER)

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.11 1999/02/03 21:16:50 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.1 1999/02/05 19:59:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: relation.h,v 1.14 1999/02/04 03:19:10 momjian Exp $
* $Id: relation.h,v 1.15 1999/02/05 19:59:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -219,7 +219,7 @@ typedef struct RestrictInfo
/* hashjoin only */
Oid hashjoinoperator;
Relid cinfojoinid;
Relid restrictinfojoinid;
} RestrictInfo;
typedef struct JoinMethod