OSDN Git Service

Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform to
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 28 Sep 2006 20:51:43 +0000 (20:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 28 Sep 2006 20:51:43 +0000 (20:51 +0000)
commitf213131f2024bcb85aea7d2a7dfadef6a0ee1b31
tree090a85694dfd64f735732bc49b8489835186d83b
parentd3aa4a8e33bee5e5274615cfd461aac810d7bbc1
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.
doc/src/sgml/func.sgml
src/backend/executor/execQual.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/predtest.c
src/backend/parser/gram.y
src/backend/utils/cache/lsyscache.c
src/include/nodes/execnodes.h
src/include/nodes/nodes.h
src/include/nodes/primnodes.h
src/include/utils/lsyscache.h