Skip to content

Commit 11a0027

Browse files
committed
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...
1 parent 52f1b2f commit 11a0027

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backend/optimizer/path/pathkeys.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.7 1999/02/22 05:26:20 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.8 1999/04/30 03:59:06 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -240,10 +240,8 @@ get_cheapest_path_for_joinkeys(List *joinkeys,
240240
pathorder_match(ordering, path->pathorder, &better_sort) &&
241241
better_sort == 0)
242242
{
243-
if (matched_path)
244-
if (path->path_cost < matched_path->path_cost)
245-
matched_path = path;
246-
else
243+
if (matched_path == NULL ||
244+
path->path_cost < matched_path->path_cost)
247245
matched_path = path;
248246
}
249247
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy