interval integer comparison

From: Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: interval integer comparison
Date: 2005-05-31 15:33:35
Message-ID: 006801c565f6$1c5fae80$6c00a8c0@OTTO
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

Pg 8.0.3 allows me to compare interval with integer, but I cannot see any
reasonable rule:

These are true:

1 < '1 days'::interval

2 > '1 days'::interval

999 > '1 days'::interval

1999 < '2 days'::interval

2000 != '2 days'::interval

2001 > '2 days'::interval
...

20999 < '21 days'::interval

21000 != '21 days'::interval

21001 > '21 days'::interval

and so on

Is this a bug?

Best Regards,
Otto

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2005-05-31 15:34:17 Re: Accessing PostgreSQL from C++
Previous Message Oisin Glynn 2005-05-31 15:25:50 System info in/through database on Windows 2000 Postres 8.x