diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
commit | e6381966c1886badbc19c94ac1f1ffbc104125ab (patch) | |
tree | 9da3d5d073dcb4cff68bdb69f6118409b5315512 /src/backend/optimizer/util/clauses.c | |
parent | 08320bfb22b3ef006885de91f5163ef5fe831889 (diff) |
Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars). This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases. I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
Diffstat (limited to 'src/backend/optimizer/util/clauses.c')
-rw-r--r-- | src/backend/optimizer/util/clauses.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index f9906cffc04..ca4353f6085 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.46 1999/08/12 04:32:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.47 1999/08/16 02:17:56 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -164,7 +164,7 @@ make_funcclause(Func *func, List *funcargs) { Expr *expr = makeNode(Expr); - expr->typeOid = InvalidOid; /* assume type checking done */ + expr->typeOid = func->functype; expr->opType = FUNC_EXPR; expr->oper = (Node *) func; expr->args = funcargs; @@ -417,43 +417,6 @@ NumRelids(Node *clause) } /* - * is_joinable - * - * Returns t iff 'clause' is a valid join clause. - * - */ -bool -is_joinable(Node *clause) -{ - Node *leftop, - *rightop; - - if (!is_opclause(clause)) - return false; - - leftop = (Node *) get_leftop((Expr *) clause); - rightop = (Node *) get_rightop((Expr *) clause); - - if (!rightop) - return false; /* unary opclauses need not apply */ - - /* - * One side of the clause (i.e. left or right operands) must either be - * a var node ... - */ - if (IsA(leftop, Var) || IsA(rightop, Var)) - return true; - - /* - * ... or a func node. - */ - if (is_funcclause(leftop) || is_funcclause(rightop)) - return true; - - return false; -} - -/* * fix_opids * Calculate opid field from opno for each Oper node in given tree. * (The given tree can be anything expression_tree_walker handles.) |