Details for ROW IS NULL test
От | Bruce Momjian |
---|---|
Тема | Details for ROW IS NULL test |
Дата | |
Msg-id | 200804070051.m370pXB07984@momjian.us обсуждение исходный текст |
Список | pgsql-docs |
I found the row handling for "IS [NOT] NULL" confusing for row-valued expressions, so I added the attached documentation sentence. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/func.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.427 diff -c -c -r1.427 func.sgml *** doc/src/sgml/func.sgml 4 Apr 2008 18:45:36 -0000 1.427 --- doc/src/sgml/func.sgml 7 Apr 2008 00:46:46 -0000 *************** *** 344,350 **** <literal>IS NULL</> is true when the row expression itself is null or when all the row's fields are null, while <literal>IS NOT NULL</> is true when the row expression itself is non-null ! and all the row's fields are non-null. This definition conforms to the SQL standard, and is a change from the inconsistent behavior exhibited by <productname>PostgreSQL</productname> versions prior to 8.2. --- 344,354 ---- <literal>IS NULL</> is true when the row expression itself is null or when all the row's fields are null, while <literal>IS NOT NULL</> is true when the row expression itself is non-null ! and all the row's fields are non-null. Because of this behavior, ! <literal>IS NULL</> and <literal>IS NOT NULL</> do not always return ! inverse results for row-valued expressions, i.e. a row-valued ! expression that contains both NULL and non-null values will return false ! for both tests. This definition conforms to the SQL standard, and is a change from the inconsistent behavior exhibited by <productname>PostgreSQL</productname> versions prior to 8.2.
В списке pgsql-docs по дате отправления: