diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-16 02:30:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-16 02:30:39 +0000 |
commit | 51972a9d5d068dd34b24ff4923981ffb90e5cc2d (patch) | |
tree | c68fddbb3eaafbd332e84afbafe3c171f6372d4e /src/include/nodes/execnodes.h | |
parent | de25638d2fbe9e56ecfc60a7dda8a0c56028317a (diff) |
COALESCE() and NULLIF() are now first-class expressions, not macros
that turn into CASE expressions. They evaluate their arguments at most
once. Patch by Kris Jurka, review and (very light) editorializing by me.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 8d2b1305984..591870be515 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.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: execnodes.h,v 1.94 2003/02/09 00:30:39 tgl Exp $ + * $Id: execnodes.h,v 1.95 2003/02/16 02:30:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -441,8 +441,9 @@ typedef struct ArrayRefExprState /* ---------------- * FuncExprState node * - * Although named for FuncExpr, this is also used for OpExpr and DistinctExpr - * nodes; be careful to check what xprstate.expr is actually pointing at! + * Although named for FuncExpr, this is also used for OpExpr, DistinctExpr, + * and NullIf nodes; be careful to check what xprstate.expr is actually + * pointing at! * ---------------- */ typedef struct FuncExprState @@ -540,6 +541,16 @@ typedef struct CaseWhenState } CaseWhenState; /* ---------------- + * CoalesceExprState node + * ---------------- + */ +typedef struct CoalesceExprState +{ + ExprState xprstate; + List *args; /* the arguments */ +} CoalesceExprState; + +/* ---------------- * CoerceToDomainState node * ---------------- */ |