From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: 孙冰 <subi.the.dream.walker@gmail.com>
Cc: Postgres Bug <pgsql-bugs@postgresql.org>
Subject: Re: Test of value equivalency of row type, feature or bug?
Date: Thu, 20 Dec 2018 09:59:26 -0500
Message-ID: <12452.1545317966@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZ1NbN2a6HGgdHtubuFDUEYUOLccyqboNifGD=6ehY68g@mail.gmail.com>
References: <CA+czfDUU+SU9P73y5mg7bvsp6EQyNKoMcdSP8tQoRbDU_UF8ww@mail.gmail.com>
<11491.1545316500@sss.pgh.pa.us>
<CAKFQuwZ1NbN2a6HGgdHtubuFDUEYUOLccyqboNifGD=6ehY68g@mail.gmail.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, subi.the.dream.walker@gmail.com
Subject: Re: Test of value equivalency of row type, feature or bug?
In-Reply-To: <12452.1545317966@sss.pgh.pa.us>
References: <CA+czfDUU+SU9P73y5mg7bvsp6EQyNKoMcdSP8tQoRbDU_UF8ww@mail.gmail.com> <11491.1545316500@sss.pgh.pa.us> <CAKFQuwZ1NbN2a6HGgdHtubuFDUEYUOLccyqboNifGD=6ehY68g@mail.gmail.com> <12452.1545317966@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox