Re: Test of value equivalency of row type, feature or bug? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Test of value equivalency of row type, feature or bug?
Date
Msg-id 12452.1545317966@sss.pgh.pa.us
Whole thread Raw
In response to Re: Test of value equivalency of row type, feature or bug?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Dec 20, 2018 at 7:35 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It's a feature.  The btree comparison functions (<, =, >, 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-COMPARISON

That's talking specifically about the results of a comparison of
two row constructors, ie "ROW(...) = ROW(...)".

The fact that this acts differently from other seemingly-related cases
can be blamed directly on the SQL spec.

            regards, tom lane


pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Test of value equivalency of row type, feature or bug?
Next
From: Jean-Marc Lessard
Date:
Subject: RE: BUG #15553: "ERROR: cache lookup failed for type 2" with afunction the first time it run.