summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorBruce Momjian2002-07-18 04:41:46 +0000
committerBruce Momjian2002-07-18 04:41:46 +0000
commit3e22406ec63b60ed50d3d0c593f9e84b5e1d058b (patch)
tree9cd544d8f473a766e21629227f615bd536d0359d /src/include/nodes
parent7ea5f1d7f16e9771e90c020db93d7e8a9a3b22f5 (diff)
Finished the Between patch Christopher started.
Implements between (symmetric / asymmetric) as a node. Executes the left or right expression once, makes a Const out of the resulting Datum and executes the >=, <= portions out of the Const sets. Of course, the parser does a fair amount of preparatory work for this to happen. Rod Taylor
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/makefuncs.h3
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/parsenodes.h21
3 files changed, 24 insertions, 3 deletions
diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h
index 69b9818f57..21473ff704 100644
--- a/src/include/nodes/makefuncs.h
+++ b/src/include/nodes/makefuncs.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: makefuncs.h,v 1.37 2002/06/20 20:29:49 momjian Exp $
+ * $Id: makefuncs.h,v 1.38 2002/07/18 04:41:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,5 +57,6 @@ extern RelabelType *makeRelabelType(Node *arg, Oid rtype, int32 rtypmod);
extern RangeVar *makeRangeVar(char *schemaname, char *relname);
extern TypeName *makeTypeName(char *typnam);
+extern TypeName *makeQualifiedTypeName(List *lst);
#endif /* MAKEFUNC_H */
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index a2980a1ff2..7d643dad68 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.110 2002/07/11 07:39:27 ishii Exp $
+ * $Id: nodes.h,v 1.111 2002/07/18 04:41:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -226,6 +226,7 @@ typedef enum NodeTag
T_GroupClause,
T_NullTest,
T_BooleanTest,
+ T_BetweenExpr,
T_CaseExpr,
T_CaseWhen,
T_FkConstraint,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c0933f8ae7..7f0cbd6ac2 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.187 2002/07/16 22:12:20 tgl Exp $
+ * $Id: parsenodes.h,v 1.188 2002/07/18 04:41:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -174,6 +174,25 @@ typedef struct A_Const
} A_Const;
/*
+ * BetweenExpr - an SQL99 BETWEEN expression
+ */
+
+typedef struct BetweenExpr
+{
+ NodeTag type;
+ Node *expr; /* Expression to check */
+ Node *lexpr; /* First bound */
+ Node *rexpr; /* Second bound */
+ bool not; /* Do we want inverse? */
+ bool symmetric; /* True if SYMMETRIC, false if ASYMMETRIC */
+ Oid typeId; /* Information abotu common type */
+ int16 typeLen;
+ bool typeByVal;
+ Expr *gthan;
+ Expr *lthan;
+} BetweenExpr;
+
+/*
* TypeCast - a CAST expression
*
* NOTE: for mostly historical reasons, A_Const parsenodes contain