aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-09-28 20:51:43 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-09-28 20:51:43 +0000
commitf213131f2024bcb85aea7d2a7dfadef6a0ee1b31 (patch)
tree090a85694dfd64f735732bc49b8489835186d83b /src/include/nodes/execnodes.h
parentd3aa4a8e33bee5e5274615cfd461aac810d7bbc1 (diff)
downloadpostgresql-f213131f2024bcb85aea7d2a7dfadef6a0ee1b31.tar.gz
postgresql-f213131f2024bcb85aea7d2a7dfadef6a0ee1b31.zip
Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform to
the SQL spec, viz IS NULL is true if all the row's fields are null, IS NOT NULL is true if all the row's fields are not null. The former coding got this right for a limited number of cases with IS NULL (ie, those where it could disassemble a ROW constructor at parse time), but was entirely wrong for IS NOT NULL. Per report from Teodor. I desisted from changing the behavior for arrays, since on closer inspection it's not clear that there's any support for that in the SQL spec. This probably needs more consideration.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 35ee8a20d06..5cbe5a54287 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.160 2006/08/25 04:06:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.161 2006/09/28 20:51:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -706,6 +706,19 @@ typedef struct MinMaxExprState
} MinMaxExprState;
/* ----------------
+ * NullTestState node
+ * ----------------
+ */
+typedef struct NullTestState
+{
+ ExprState xprstate;
+ ExprState *arg; /* input expression */
+ bool argisrow; /* T if input is of a composite type */
+ /* used only if argisrow: */
+ TupleDesc argdesc; /* tupdesc for most recent input */
+} NullTestState;
+
+/* ----------------
* CoerceToDomainState node
* ----------------
*/