Re: using dates in pgsql - Mailing list pgsql-novice

From Tom Lane
Subject Re: using dates in pgsql
Date
Msg-id 11123.1062078073@sss.pgh.pa.us
Whole thread Raw
In response to Re: using dates in pgsql  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: using dates in pgsql
List pgsql-novice
Ron Johnson <ron.l.johnson@cox.net> writes:
> On Wed, 2003-08-27 at 23:28, Tom Lane wrote:
>> WHERE  activedate < (CURRENT_DATE - 188)

> How does pg know that that's 188 days, and not months or years?

<shrug> ... that's what the "date - integer" operator is defined to do.
If you want some other behavior, create another operator.

            regards, tom lane

pgsql-novice by date:

Previous
From: Stuart Woodward
Date:
Subject: From which version was DROP ... CASCADE supported?
Next
From: Ron Johnson
Date:
Subject: Re: using dates in pgsql