Re: Fwd: range of composite types! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fwd: range of composite types!
Date
Msg-id 318628.1651037160@sss.pgh.pa.us
Whole thread Raw
In response to Fwd: range of composite types!  (Jian He <hejian.mark@gmail.com>)
List pgsql-hackers
Jian He <hejian.mark@gmail.com> writes:
>> for that means the following sql queries should return* false:*

>> select mytyperange (
>> (1,'2022-01-01')::mytype,
>> (8, '2022-01-31')::mytype, '[]') @> (2, '2020-01-19')::mytype;

Why should that return false?  The comparison rules for composites
say that you compare the first column, only if that's equal
compare the second, etc.  Here, "2" is between "1" and "8" so
the contents of the second column don't matter.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Possible corruption by CreateRestartPoint at promotion
Next
From: Michael Paquier
Date:
Subject: Re: Possible corruption by CreateRestartPoint at promotion