extern Oid exprCollation(const Node *expr); extern Oid exprInputCollation(const Node *expr); externvoid exprSetCollation(Node *expr, Oid collation); externvoid exprSetInputCollation(Node *expr, Oid inputcollation);
/* Is clause a FuncExpr clause? */ staticinlinebool
is_funcclause(constvoid *clause)
{ return clause != NULL && IsA(clause, FuncExpr);
}
/* Is clause an OpExpr clause? */ staticinlinebool
is_opclause(constvoid *clause)
{ return clause != NULL && IsA(clause, OpExpr);
}
/* Extract left arg of a binary opclause, or only arg of a unary opclause */ staticinline Node *
get_leftop(constvoid *clause)
{ const OpExpr *expr = (const OpExpr *) clause;
/* Is clause an AND clause? */ staticinlinebool
is_andclause(constvoid *clause)
{ return (clause != NULL &&
IsA(clause, BoolExpr) &&
((const BoolExpr *) clause)->boolop == AND_EXPR);
}
/* Is clause an OR clause? */ staticinlinebool
is_orclause(constvoid *clause)
{ return (clause != NULL &&
IsA(clause, BoolExpr) &&
((const BoolExpr *) clause)->boolop == OR_EXPR);
}
/* Is clause a NOT clause? */ staticinlinebool
is_notclause(constvoid *clause)
{ return (clause != NULL &&
IsA(clause, BoolExpr) &&
((const BoolExpr *) clause)->boolop == NOT_EXPR);
}
/* Extract argument from a clause known to be a NOT clause */ staticinline Expr *
get_notclausearg(constvoid *notclause)
{ return (Expr *) linitial(((const BoolExpr *) notclause)->args);
}
#define expression_tree_walker(n, w, c) \
expression_tree_walker_impl(n, (tree_walker_callback) (w), c) #define expression_tree_mutator(n, m, c) \
expression_tree_mutator_impl(n, (tree_mutator_callback) (m), c)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.