diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-29 04:37:22 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-04-29 04:37:22 +0000 |
commit | a4792bd3d6ac50a313ccf0a24baa8637bb6f3ec6 (patch) | |
tree | 56462363126610e31738c26f08dc9be341c3a21a | |
parent | a1fbd470a9ae934bf2316740c06b0cf88607e6e8 (diff) | |
download | postgresql-a4792bd3d6ac50a313ccf0a24baa8637bb6f3ec6.tar.gz postgresql-a4792bd3d6ac50a313ccf0a24baa8637bb6f3ec6.zip |
#ifdef GEQO
bool _use_geqo_ = true;
#else
bool _use_geqo_ = false;
#endif
_use_geqo_ is settable via SET var TO ...
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 920820302c3..6abf6e11b9e 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.5 1997/02/19 12:58:01 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.6 1997/04/29 04:37:22 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -33,6 +33,13 @@ #include "optimizer/geqo_gene.h" #include "optimizer/geqo.h" +#ifdef GEQO +bool _use_geqo_ = true; +#else +bool _use_geqo_ = false; +#endif + + static void find_rel_paths(Query *root, List *rels); static List *find_join_paths(Query *root, List *outer_rels, int levels_left); @@ -166,10 +173,9 @@ find_join_paths(Query *root, List *outer_rels, int levels_left) * <utesch@aut.tu-freiberg.de> * *******************************************/ -#ifdef GEQO - return lcons(geqo(root), NIL); /* returns *one* Rel, so lcons it */ -#endif - + if ( _use_geqo_ ) + return lcons(geqo(root), NIL); /* returns *one* Rel, so lcons it */ + /******************************************* * rest will be deprecated in case of GEQO * *******************************************/ |