Re: Test of value equivalency of row type, feature or bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: 孙冰 <subi(dot)the(dot)dream(dot)walker(at)gmail(dot)com>, Postgres Bug <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Test of value equivalency of row type, feature or bug?
Date: 2018-12-20 14:59:26
Message-ID: 12452.1545317966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Thu, Dec 20, 2018 at 7:35 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jean-Marc Lessard 2018-12-20 17:50:59 RE: BUG #15553: "ERROR: cache lookup failed for type 2" with a function the first time it run.
Previous Message David G. Johnston 2018-12-20 14:48:56 Re: Test of value equivalency of row type, feature or bug?