mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
@@ -416,43 +416,6 @@ NumRelids(Node *clause)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user