Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQkSE-0002N7-Tz for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 00:06:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQkSE-0001ec-Gj for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2016 00:06:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQkRa-0000Jg-Hk for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 00:05:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQkRX-000684-Hx for pgsql-bugs@postgresql.org; Sat, 23 Jul 2016 00:05:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6N05LOn018528; Fri, 22 Jul 2016 20:05:21 -0400 From: Tom Lane To: Andrew Gierth cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14235: inconsistencies with IS NULL / IS NOT NULL In-reply-to: <17567.1469230815@sss.pgh.pa.us> References: <20160708024746.1410.57282@wrigleys.postgresql.org> <8760sg96u2.fsf@news-spur.riddles.org.uk> <10227.1469218904@sss.pgh.pa.us> <87zip9qti4.fsf@news-spur.riddles.org.uk> <17567.1469230815@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 22 Jul 2016 19:40:15 -0400" Date: Fri, 22 Jul 2016 20:05:21 -0400 Message-ID: <18527.1469232321@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > Good question. The existing behavior seems to be traceable as far back as > 68d9fbeb5511d846ce3a6f66b8955d3ca55a4b76, which implemented the specific > syntax ROW( ... ) IS [NOT] NULL by dint of breaking the ROW construct into > its field expressions and applying scalar NullTest to each one. BTW, thinking about that a bit more, I'm pretty sure that back then we did not have any robust notion of composite-type datums at all, and thus that there simply would not have been any other way to implement this syntax. It would not have worked to treat ROW(...) as a construct that delivered a single Datum to a standard NullTest expression node. So it was pretty convenient for Lockhart that the spec was written the way it was. Also note the observation in the 2006 thread that the N-scalar-NullTests implementation didn't get the semantics quite right anyway, which makes it even less likely that anybody was depending on the spec semantics between 2002 and 2006. But that still leaves us with ten years of history in which we *were* conforming to the spec, modulo the very narrow corner case mentioned in this thread. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs