From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jian He <hejian(dot)mark(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Fwd: range of composite types! |
Date: | 2022-04-27 05:26:00 |
Message-ID: | 318628.1651037160@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Jian He <hejian(dot)mark(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2022-04-27 05:29:28 | Re: range of composite types! |
Previous Message | Jian He | 2022-04-27 05:03:49 | Fwd: range of composite types! |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-04-27 05:27:00 | Re: Possible corruption by CreateRestartPoint at promotion |
Previous Message | Michael Paquier | 2022-04-27 05:16:01 | Re: Possible corruption by CreateRestartPoint at promotion |