| From: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: possible bug on age() function (8.2.4 , 8.3.6) |
| Date: | 2009-06-24 12:45:13 |
| Message-ID: | h1t74p$sde$4@reversiblemaps.ath.cx |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 2009-06-24, Philippe Amelant <pamelant(at)companeo(dot)com> wrote:
> 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
The third test is comparing a double with an interval.
compare like with like.
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"')
> EXTRACT(EPOCH FROM interval '1007 hours');
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Philippe Amelant | 2009-06-24 14:22:23 | Re: possible bug on age() function (8.2.4 , 8.3.6) |
| Previous Message | CM J | 2009-06-24 12:36:39 | Postgres 8.3.7 -- EOF on client connection |