From: | "Dan Langille" <dan(at)langille(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: possible time change issue - known problem? |
Date: | 2003-04-07 15:26:13 |
Message-ID: | 3E916055.7888.A995D50@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 7 Apr 2003 at 10:32, Tom Lane wrote:
> "Dan Langille" <dan(at)langille(dot)org> writes:
> > Yes, as hinted in the message subject. Hmmm, so that's how it's
> > doing the math. I would think '24 hours' would give a different
> > answer to '1 day' since '1 day' is not necessarily == '24 hours'.
>
> Type INTERVAL knows about months and seconds, nothing else. I've
> opined in the past that it should be months, days, and seconds,
> but no one seems excited enough about the issue to do the nontrivial
> work involved ...
I forgot to ask: Does this explain why the problem occurs under 7.2.3
but not 7.3.2? Is the Right Thing To Do(tm) this:
select current_date, current_date-1;
instead of this:
select current_date, (current_date - interval '1 day')::date;
Thanks.
--
Dan Langille : http://www.langille.org/
From | Date | Subject | |
---|---|---|---|
Next Message | pilsl | 2003-04-07 15:36:05 | listen/notify vs. sequence-model |
Previous Message | Dan Langille | 2003-04-07 15:23:57 | Re: possible time change issue - known problem? |