* nodeFuncs.c
* All node routines more complicated than simple access/modification
*
- * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.17 2002/03/21 16:00:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.22 2003/06/29 00:33:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
-
-#include <sys/types.h>
-
#include "postgres.h"
#include "nodes/nodeFuncs.h"
-#include "utils/lsyscache.h"
+
static bool var_is_inner(Var *var);
+
/*
* single_node -
* Returns t if node corresponds to a single-noded expression
return (bool)
!(var_is_inner(var) || var_is_outer(var));
}
-
-/*****************************************************************************
- * OPER nodes
- *****************************************************************************/
-
-/*
- * replace_opid -
- *
- * Given a oper node, resets the opfid field with the
- * procedure OID (regproc id).
- *
- * Returns the modified oper node.
- *
- */
-Oper *
-replace_opid(Oper *oper)
-{
- oper->opid = get_opcode(oper->opno);
- oper->op_fcache = NULL;
- return oper;
-}
-
-/*****************************************************************************
- * constant (CONST, PARAM) nodes
- *****************************************************************************/
-
-#ifdef NOT_USED
-/*
- * non_null -
- * Returns t if the node is a non-null constant, e.g., if the node has a
- * valid `constvalue' field.
- */
-bool
-non_null(Expr *c)
-{
-
- if (IsA(c, Const) &&
- !((Const *) c)->constisnull)
- return true;
- else
- return false;
-}
-
-#endif