Add IS UNKNOWN, IS NOT UNKNOWN boolean tests, fix the existing boolean
Tom Lane <tgl@sss.pgh.pa.us>
Add IS UNKNOWN, IS NOT UNKNOWN boolean tests, fix the existing boolean tests to return the correct results per SQL9x when given NULL inputs. Reimplement these tests as well as IS [NOT] NULL to have their own expression node types, instead of depending on special functions. From Joe Conway, with a little help from Tom Lane.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +16 −1 |
| doc/src/sgml/syntax.sgml | modified | +2 −2 |
| src/backend/executor/execQual.c | modified | +137 −1 |
| src/backend/nodes/copyfuncs.c | modified | +43 −1 |
| src/backend/nodes/equalfuncs.c | modified | +27 −1 |
| src/backend/nodes/outfuncs.c | modified | +33 −8 |
| src/backend/nodes/readfuncs.c | modified | +55 −1 |
| src/backend/optimizer/util/clauses.c | modified | +25 −1 |
| src/backend/parser/gram.y | modified | +92 −43 |
| src/backend/parser/keywords.c | modified | +2 −1 |
| src/backend/parser/parse_clause.c | modified | +14 −18 |
| src/backend/parser/parse_coerce.c | modified | +25 −1 |
| src/backend/parser/parse_expr.c | modified | +81 −39 |
| src/backend/utils/adt/ruleutils.c | modified | +55 −21 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/nodes/nodes.h | modified | +3 −3 |
| src/include/nodes/parsenodes.h | modified | +47 −4 |
| src/include/parser/parse_coerce.h | modified | +3 −1 |