Documentation tweak for row-valued expressions and null
Hi
I wonder if it might be worth adding a tiny note to the manual to
point out that the special logic for "<row-valued-expression> IS [ NOT
] NULL" doesn't apply anywhere else that we handle nulls or talk about
[non]-null values in the manual. See attached.
--
Thomas Munro
http://www.enterprisedb.com
Attachments:
note-about-row-is-null.patchapplication/octet-stream; name=note-about-row-is-null.patchDownload
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 98d1497..c58d791 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -352,6 +352,12 @@
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.
+ Such treatment of row-valued expressions applies only for <literal>IS
+ [ NOT ] NULL</literal>. In other contexts (<literal>IS DISTINCT
+ FROM</literal>, <literal>COUNT</literal>, <literal>COALESCE</literal>,
+ functions declared <literal>STRICT</literal> and so on) the fields of
+ a row-valued expression have no effect on whether the expression
+ is considered to be null.
</para>
</note>
On 7/26/15 8:40 PM, Thomas Munro wrote:
I wonder if it might be worth adding a tiny note to the manual to
point out that the special logic for "<row-valued-expression> IS [ NOT
] NULL" doesn't apply anywhere else that we handle nulls or talk about
[non]-null values in the manual. See attached.
Yes. This is a common point of confusion.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Nov 10, 2015 at 11:10 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
On 7/26/15 8:40 PM, Thomas Munro wrote:
I wonder if it might be worth adding a tiny note to the manual to
point out that the special logic for "<row-valued-expression> IS [ NOT
] NULL" doesn't apply anywhere else that we handle nulls or talk about
[non]-null values in the manual. See attached.Yes. This is a common point of confusion.
Agreed. But I actually don't know whether Thomas's proposed language
matches the actual behavior in every case.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers