mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
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
This commit is contained in:
@@ -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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -173,6 +173,25 @@ typedef struct A_Const
|
||||
TypeName *typename; /* typecast */
|
||||
} 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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user