Fix nasty little typo that prevented get_cheapest_path_for_joinkeys

from ever returning a path.  This put a bit of a crimp in the system's
ability to generate intelligent merge-join plans...
This commit is contained in:
Tom Lane 1999-04-30 03:59:06 +00:00
parent 52f1b2f3b6
commit 11a0027e28
1 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.7 1999/02/22 05:26:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.8 1999/04/30 03:59:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -240,10 +240,8 @@ get_cheapest_path_for_joinkeys(List *joinkeys,
pathorder_match(ordering, path->pathorder, &better_sort) &&
better_sort == 0)
{
if (matched_path)
if (path->path_cost < matched_path->path_cost)
matched_path = path;
else
if (matched_path == NULL ||
path->path_cost < matched_path->path_cost)
matched_path = path;
}
}