Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZznS-0004vI-4V for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Dec 2018 14:59:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZznQ-0002ox-Ls for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Dec 2018 14:59:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZznQ-0002op-2y for pgsql-bugs@lists.postgresql.org; Thu, 20 Dec 2018 14:59:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZznM-00051C-Kw for pgsql-bugs@postgresql.org; Thu, 20 Dec 2018 14:59:30 +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 wBKExQAu012453; Thu, 20 Dec 2018 09:59:27 -0500 From: Tom Lane To: "David G. Johnston" cc: =?UTF-8?B?5a2Z5Yaw?= , Postgres Bug Subject: Re: Test of value equivalency of row type, feature or bug? In-reply-to: References: <11491.1545316500@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Thu, 20 Dec 2018 07:48:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12451.1545317966.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 20 Dec 2018 09:59:26 -0500 Message-ID: <12452.1545317966@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "David G. Johnston" writes: > On Thu, Dec 20, 2018 at 7:35 AM Tom Lane wrote: >> It's a feature. The btree comparison functions (<, =3D, >, etc) for >> composite types have to provide a total order for their datatypes, >> and treating an individual null field as a reason to return null >> would break that. > That doesn't seem to be what is going on here nor is it immediately > obvious that such is what is documented. > https://www.postgresql.org/docs/11/functions-comparisons.html#ROW-WISE-C= OMPARISON That's talking specifically about the results of a comparison of two row constructors, ie "ROW(...) =3D ROW(...)". The fact that this acts differently from other seemingly-related cases can be blamed directly on the SQL spec. regards, tom lane