Re: Difference in DATEs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dean Gibson (DB Administrator)" <postgresql3(at)ultimeth(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Difference in DATEs
Date: 2004-09-21 14:01:22
Message-ID: 386.1095775282@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Dean Gibson (DB Administrator)" <postgresql3(at)ultimeth(dot)com> writes:
> 3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not
> defined in the manual for two DATE values).

Sure it is: see 10th row in
http://www.postgresql.org/docs/7.4/static/functions-datetime.html#OPERATORS-DATETIME-TABLE

Forget the interval and compare to an integer.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message CHRIS HOOVER 2004-09-21 14:23:00 Re: Help with function
Previous Message Pierre-Frédéric Caillaud 2004-09-21 12:41:30 Re: degradation in performance