Andreas Kretschmer writes:
'3 years' != '2 years 11 mons 30 days', but i got 0 rows, why?
Well, actually:

regression=# select '3 years'::interval = '2 years 11 mons 30 days'::interval;
  ?column?
----------
  t
(1 row)

IIRC, interval comparison operators normalize the two values assuming that
1 month = 30 days. Which is kind of arbitrary, but without some such
assumption there's no way to have a scalar ordering of intervals at all.

    regards, tom lane

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 7 | next ›
Discussion Overview
grouppgsql-general @
categoriespostgresql
postedAug 29, '13 at 7:11p
activeAug 30, '13 at 7:44a
posts7
users5
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2017 Grokbase