aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/joininfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/util/joininfo.c')
-rw-r--r--src/backend/optimizer/util/joininfo.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/src/backend/optimizer/util/joininfo.c b/src/backend/optimizer/util/joininfo.c
index 3420313c98c..13d1f6b9fb2 100644
--- a/src/backend/optimizer/util/joininfo.c
+++ b/src/backend/optimizer/util/joininfo.c
@@ -7,14 +7,13 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.23 1999/07/16 04:59:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.24 1999/08/16 02:17:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "optimizer/clauses.h"
#include "optimizer/joininfo.h"
@@ -51,8 +50,8 @@ joininfo_member(List *join_relids, List *joininfo_list)
/*
* find_joininfo_node
* Find the joininfo node within a relation entry corresponding
- * to a join between 'this_rel' and the relations in 'join_relids'. A
- * new node is created and added to the relation entry's joininfo
+ * to a join between 'this_rel' and the relations in 'join_relids'.
+ * A new node is created and added to the relation entry's joininfo
* field if the desired one can't be found.
*
* Returns a joininfo node.
@@ -69,40 +68,7 @@ find_joininfo_node(RelOptInfo *this_rel, Relids join_relids)
joininfo = makeNode(JoinInfo);
joininfo->unjoined_relids = join_relids;
joininfo->jinfo_restrictinfo = NIL;
- joininfo->mergejoinable = false;
- joininfo->hashjoinable = false;
this_rel->joininfo = lcons(joininfo, this_rel->joininfo);
}
return joininfo;
}
-
-/*
- * other_join_clause_var
- * Determines whether a var node is contained within a joinclause
- * of the form(op var var).
- *
- * Returns the other var node in the joinclause if it is, nil if not.
- *
- */
-Var *
-other_join_clause_var(Var *var, Expr *clause)
-{
- Var *retval;
- Var *l,
- *r;
-
- retval = (Var *) NULL;
-
- if (var != NULL && is_joinable((Node *) clause))
- {
- l = (Var *) get_leftop(clause);
- r = (Var *) get_rightop(clause);
-
- if (equal(var, l))
- retval = r;
- else if (equal(var, r))
- retval = l;
- }
-
- return retval;
-}