summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-03-30 16:47:35 +0000
committerBruce Momjian <bruce@momjian.us>1998-03-30 16:47:35 +0000
commit9a0dd4fb183958f59f68d8a5f096dd8df18d9b59 (patch)
tree2843356dbd25f4e11cf4a414e56d6afae3775071 /src/backend/optimizer
parentc579ce0fb03aaf92d184adf369cf13be013adf1b (diff)
There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to the C programming style (which are, of course, personal). The other patch removes the compilation of backend/lib/qsort.c, as qsort() is a standard function in stdlib.h and can be used any where else (and it is). It was only used in backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c, and backend/storage/page/bufpage.c > > Some or all of these changes might not be appropriate for v6.3, since we > > are in beta testing and since they do not affect the current functionality. > > For those cases, how about submitting patches based on the final v6.3 > > release? There's more to come. Please review these patches. I ran the regression tests and they only failed where this was expected (random, geo, etc). Cheers, Jeroen
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r--src/backend/optimizer/geqo/geqo_pool.c7
-rw-r--r--src/backend/optimizer/path/joinrels.c4
-rw-r--r--src/backend/optimizer/path/predmig.c5
3 files changed, 7 insertions, 9 deletions
diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c
index 085a649796a..bd797045215 100644
--- a/src/backend/optimizer/geqo/geqo_pool.c
+++ b/src/backend/optimizer/geqo/geqo_pool.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_pool.c,v 1.5 1998/02/26 04:32:23 momjian Exp $
+ * $Id: geqo_pool.c,v 1.6 1998/03/30 16:46:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,8 +35,6 @@
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
-#include "lib/qsort.h"
-
#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
#include "optimizer/geqo_pool.h"
@@ -127,8 +125,7 @@ random_init_pool(Query *root, Pool *pool, int strt, int stp)
void
sort_pool(Pool *pool)
{
- pg_qsort(pool->data, pool->size, sizeof(Chromosome), compare);
-
+ qsort(pool->data, pool->size, sizeof(Chromosome), compare);
}
/*
diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c
index 7917baed097..00277253468 100644
--- a/src/backend/optimizer/path/joinrels.c
+++ b/src/backend/optimizer/path/joinrels.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.8 1998/02/26 04:32:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.9 1998/03/30 16:46:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,10 +70,12 @@ find_join_rels(Query *root, List *outer_rels)
Rel *outer_rel = (Rel *) lfirst(r);
if (!(joins = find_clause_joins(root, outer_rel, outer_rel->joininfo)))
+ {
if (BushyPlanFlag)
joins = find_clauseless_joins(outer_rel, outer_rels);
else
joins = find_clauseless_joins(outer_rel, root->base_relation_list_);
+ }
join_list = nconc(join_list, joins);
}
diff --git a/src/backend/optimizer/path/predmig.c b/src/backend/optimizer/path/predmig.c
index 544a3c1c8e7..0a73ea8b33e 100644
--- a/src/backend/optimizer/path/predmig.c
+++ b/src/backend/optimizer/path/predmig.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.9 1998/02/26 04:32:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.10 1998/03/30 16:46:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,7 +47,6 @@
#include "optimizer/cost.h"
#include "optimizer/keys.h"
#include "optimizer/tlist.h"
-#include "lib/qsort.h"
#define is_clause(node) (get_cinfo(node)) /* a stream node
* represents a clause
@@ -698,7 +697,7 @@ xfunc_stream_qsort(Stream root, Stream bottom)
nodearray[i] = tmp;
/* sort the array */
- pg_qsort(nodearray, num, sizeof(LispValue), xfunc_stream_compare);
+ qsort(nodearray, num, sizeof(LispValue), xfunc_stream_compare);
/* paste together the array elements */
output = nodearray[num - 1];