Re: possible bug on age() function (8.2.4 , 8.3.6)

From: "Philippe Amelant" <pamelant(at)companeo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: possible bug on age() function (8.2.4 , 8.3.6)
Date: 2009-06-24 07:37:00
Message-ID: 1245829020.6161.33.camel@philippe-desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok but if I work with hours or whatever the problem is still there

SELECT (EXTRACT(EPOCH FROM TIMESTAMP '2009-06-23 18:36:05.064066+02') -
EXTRACT(EPOCH FROM TIMESTAMP '"2009-05-12 18:36:05.064066+02"'))/3600,
EXTRACT(EPOCH FROM interval '1008 hours')/3600, age('2009-06-23
18:36:05.064066+02' ,'"2009-05-12 18:36:05.064066+02"') > interval '1007
hours';

The third test should be true and not false

Le mardi 23 juin 2009 à 13:43 -0400, Tom Lane a écrit :
> "Philippe Amelant" <pamelant(at)companeo(dot)com> writes:
> > Can I workaround this ?
>
> Don't assume that "1 month" means a constant number of seconds.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2009-06-24 07:53:59 Re: Replication
Previous Message Craig Ringer 2009-06-24 06:20:40 Re: question about frequency of updates/reads