Skip to content

Commit a4792bd

Browse files
committed
#ifdef GEQO
bool _use_geqo_ = true; #else bool _use_geqo_ = false; #endif _use_geqo_ is settable via SET var TO ...
1 parent a1fbd47 commit a4792bd

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/backend/optimizer/path/allpaths.c

Lines changed: 11 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/allpaths.c,v 1.5 1997/02/19 12:58:01 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.6 1997/04/29 04:37:22 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -33,6 +33,13 @@
3333
#include "optimizer/geqo_gene.h"
3434
#include "optimizer/geqo.h"
3535

36+
#ifdef GEQO
37+
bool _use_geqo_ = true;
38+
#else
39+
bool _use_geqo_ = false;
40+
#endif
41+
42+
3643
static void find_rel_paths(Query *root, List *rels);
3744
static List *find_join_paths(Query *root, List *outer_rels, int levels_left);
3845

@@ -166,10 +173,9 @@ find_join_paths(Query *root, List *outer_rels, int levels_left)
166173
* <utesch@aut.tu-freiberg.de> *
167174
*******************************************/
168175

169-
#ifdef GEQO
170-
return lcons(geqo(root), NIL); /* returns *one* Rel, so lcons it */
171-
#endif
172-
176+
if ( _use_geqo_ )
177+
return lcons(geqo(root), NIL); /* returns *one* Rel, so lcons it */
178+
173179
/*******************************************
174180
* rest will be deprecated in case of GEQO *
175181
*******************************************/

0 commit comments

Comments
 (0)