aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-04-30 03:59:06 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-04-30 03:59:06 +0000
commit11a0027e289ec48576284559e80f8806c4fbaafa (patch)
tree49cc5d32bf1492f2eaa517a636631b9023699ee5 /src
parent52f1b2f3b6c8e6f8b04abb2beba264b23f9eeb83 (diff)
downloadpostgresql-11a0027e289ec48576284559e80f8806c4fbaafa.tar.gz
postgresql-11a0027e289ec48576284559e80f8806c4fbaafa.zip
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...
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/path/pathkeys.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index fa9ac394788..1cde4a686cf 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -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;
}
}