From: | Frazer McLean <frazer(at)frazermclean(dot)co(dot)uk> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Unexpected interval comparison |
Date: | 2017-03-29 15:42:58 |
Message-ID: | 1490802178.134161.927524440.76CFA134@webmail.messagingengine.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Originally asked on pgsql-general[1].
I came across an unexpected comparison (tested on PostgreSQL 9.4 and
9.6) for intervals with a large difference in magnitude.
I narrowed it down to this example, where comparisons within this range
give the wrong value:
postgres=# SELECT
'1 year'::interval > '3854933 years'::interval,
'1 year'::interval > '3854934 years'::interval,
'1 year'::interval > '32618664 years'::interval,
'1 year'::interval > '32618665 years'::interval;
?column? | ?column? | ?column? | ?column?
----------+----------+----------+----------
f | t | t | f
(1 row)
Kind regards,
Frazer McLean
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim Gündüz | 2017-03-29 16:20:50 | Re: BUG #14602: Fedora 20 + PG 9.3 Cannot retrive metalink |
Previous Message | Feike Steenbergen | 2017-03-29 14:54:03 | Re: BUG #14600: Passwords in user mappings leaked by psql \deu+ command |