summaryrefslogtreecommitdiff
path: root/src/include/nodes/parsenodes.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-07-18 04:41:46 +0000
committerBruce Momjian <bruce@momjian.us>2002-07-18 04:41:46 +0000
commit3e22406ec63b60ed50d3d0c593f9e84b5e1d058b (patch)
tree9cd544d8f473a766e21629227f615bd536d0359d /src/include/nodes/parsenodes.h
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/parsenodes.h')
-rw-r--r--src/include/nodes/parsenodes.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c0933f8ae7f..7f0cbd6ac2a 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