Commit a5537608 authored by Bruce Momjian's avatar Bruce Momjian

Optimizer cleanup.

parent ead64f31
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.23 1999/02/04 01:46:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.24 1999/02/06 17:29:25 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -344,7 +344,6 @@ _equalPath(Path *a, Path *b) ...@@ -344,7 +344,6 @@ _equalPath(Path *a, Path *b)
if (a->p_ordering.ord.sortop == NULL || if (a->p_ordering.ord.sortop == NULL ||
b->p_ordering.ord.sortop == NULL) b->p_ordering.ord.sortop == NULL)
{ {
if (a->p_ordering.ord.sortop != b->p_ordering.ord.sortop) if (a->p_ordering.ord.sortop != b->p_ordering.ord.sortop)
return false; return false;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.9 1999/02/03 21:16:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.10 1999/02/06 17:29:26 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -218,8 +218,8 @@ match_paths_joinkeys(List *joinkeys, ...@@ -218,8 +218,8 @@ match_paths_joinkeys(List *joinkeys,
key_match = every_func(joinkeys, path->keys, which_subkey); key_match = every_func(joinkeys, path->keys, which_subkey);
if (equal_path_path_ordering(ordering, if (equal_path_ordering(ordering,
&path->p_ordering) && &path->p_ordering) &&
length(joinkeys) == length(path->keys) && length(joinkeys) == length(path->keys) &&
key_match) key_match)
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.12 1999/02/04 03:19:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.13 1999/02/06 17:29:26 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -115,7 +115,7 @@ match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list) ...@@ -115,7 +115,7 @@ match_order_mergeinfo(PathOrder *ordering, List *mergeinfo_list)
xmergeorder = mergeinfo->m_ordering; xmergeorder = mergeinfo->m_ordering;
if ((ordering->ordtype == MERGE_ORDER && if ((ordering->ordtype == MERGE_ORDER &&
equal_merge_merge_ordering(ordering->ord.merge, xmergeorder)) || equal_merge_ordering(ordering->ord.merge, xmergeorder)) ||
(ordering->ordtype == SORTOP_ORDER && (ordering->ordtype == SORTOP_ORDER &&
equal_path_merge_ordering(ordering->ord.sortop, xmergeorder))) equal_path_merge_ordering(ordering->ord.sortop, xmergeorder)))
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.10 1999/02/05 19:59:30 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.11 1999/02/06 17:29:27 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
static bool equal_sortops_order(Oid *ordering1, Oid *ordering2); static bool equal_sortops_order(Oid *ordering1, Oid *ordering2);
/* /*
* equal-path-path-ordering-- * equal-path-ordering--
* Returns t iff two path orderings are equal. * Returns t iff two path orderings are equal.
* *
*/ */
bool bool
equal_path_path_ordering(PathOrder *path_ordering1, equal_path_ordering(PathOrder *path_ordering1,
PathOrder *path_ordering2) PathOrder *path_ordering2)
{ {
if (path_ordering1 == path_ordering2) if (path_ordering1 == path_ordering2)
return true; return true;
...@@ -83,20 +83,22 @@ equal_path_merge_ordering(Oid *path_ordering, ...@@ -83,20 +83,22 @@ equal_path_merge_ordering(Oid *path_ordering,
} }
/* /*
* equal-merge-merge-ordering-- * equal-merge-ordering--
* Returns t iff two merge orderings are equal. * Returns t iff two merge orderings are equal.
* *
*/ */
bool bool
equal_merge_merge_ordering(MergeOrder *merge_ordering1, equal_merge_ordering(MergeOrder *merge_ordering1,
MergeOrder *merge_ordering2) MergeOrder *merge_ordering2)
{ {
return equal(merge_ordering1, merge_ordering2); return equal(merge_ordering1, merge_ordering2);
} }
/*****************************************************************************
/*
* sortops
* *
*****************************************************************************/ */
/* /*
* equal_sort_ops_order - * equal_sort_ops_order -
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.18 1999/02/04 19:20:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.19 1999/02/06 17:29:27 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -165,8 +165,8 @@ better_path(Path *new_path, List *unique_paths, bool *noOther) ...@@ -165,8 +165,8 @@ better_path(Path *new_path, List *unique_paths, bool *noOther)
path = (Path *) lfirst(temp); path = (Path *) lfirst(temp);
if (samekeys(path->keys, new_path->keys) && if (samekeys(path->keys, new_path->keys) &&
equal_path_path_ordering(&path->p_ordering, equal_path_ordering(&path->p_ordering,
&new_path->p_ordering)) &new_path->p_ordering))
{ {
old_path = path; old_path = path;
break; break;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: ordering.h,v 1.9 1998/09/01 04:37:12 momjian Exp $ * $Id: ordering.h,v 1.10 1999/02/06 17:29:30 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
#include <nodes/relation.h> #include <nodes/relation.h>
extern bool equal_path_path_ordering(PathOrder *path_ordering1, extern bool equal_path_ordering(PathOrder *path_ordering1,
PathOrder *path_ordering2); PathOrder *path_ordering2);
extern bool equal_path_merge_ordering(Oid *path_ordering, extern bool equal_path_merge_ordering(Oid *path_ordering,
MergeOrder *merge_ordering); MergeOrder *merge_ordering);
extern bool equal_merge_merge_ordering(MergeOrder *merge_ordering1, extern bool equal_merge_ordering(MergeOrder *merge_ordering1,
MergeOrder *merge_ordering2); MergeOrder *merge_ordering2);
#endif /* ORDERING_H */ #endif /* ORDERING_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment