diff options
Diffstat (limited to 'src/include/nodes/primnodes.h')
-rw-r--r-- | src/include/nodes/primnodes.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index c8b1f907a8f..a8a2c4e4e76 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -1076,8 +1076,16 @@ typedef struct XmlExpr * NullTest represents the operation of testing a value for NULLness. * The appropriate test is performed and returned as a boolean Datum. * - * NOTE: the semantics of this for rowtype inputs are noticeably different - * from the scalar case. We provide an "argisrow" flag to reflect that. + * When argisrow is false, this simply represents a test for the null value. + * + * When argisrow is true, the input expression must yield a rowtype, and + * the node implements "row IS [NOT] NULL" per the SQL standard. This + * includes checking individual fields for NULLness when the row datum + * itself isn't NULL. + * + * NOTE: the combination of a rowtype input and argisrow==false does NOT + * correspond to the SQL notation "row IS [NOT] NULL"; instead, this case + * represents the SQL notation "row IS [NOT] DISTINCT FROM NULL". * ---------------- */ @@ -1091,7 +1099,7 @@ typedef struct NullTest Expr xpr; Expr *arg; /* input expression */ NullTestType nulltesttype; /* IS NULL, IS NOT NULL */ - bool argisrow; /* T if input is of a composite type */ + bool argisrow; /* T to perform field-by-field null checks */ int location; /* token location, or -1 if unknown */ } NullTest; |