Re: Odd sum() problem in 7.2.2 - Mailing list pgsql-general

From Richard Huxton
Subject Re: Odd sum() problem in 7.2.2
Date
Msg-id 200210041526.14561.dev@archonet.com
Whole thread Raw
In response to Odd sum() problem in 7.2.2  (andreas@sparcy.net (Andreas Forsgren))
Responses Re: Odd sum() problem in 7.2.2
List pgsql-general
On Friday 04 Oct 2002 11:37 am, Andreas Forsgren wrote:
> I'm stuck. The following two snippets gives me two different results,
> and I can't figure out why;

>    = 5845507 and count(*) [1] gives me: 286109
>    = 5986420 and count(*) [1] gives me: 286304

Nothing changed but different numbers of rows returned? Best look at the where
clause...

> where (b_nr
>    like '12345678%' and datetime(ss7_rel_timestamp_sec) >=
>    '2002-09-01' and datetime(ss7_rel_timestamp_sec) < '2002-10-01'
>    and session_status_reached >= 20);
>
> where b_nr like '12345678%' and
>    ss7_rel_timestamp_sec >= '2002-09-01' and ss7_rel_timestamp_sec
>    < '2002-10-01' and session_status_reached >= 20;

Hmm - "datetime" - tell me sir, are you in a timezone other than Greenwich and
if you specify timezones explicitly does the problem go away?

--
  Richard Huxton

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: transactions
Next
From: Tom Lane
Date:
Subject: Re: Trouble compiling postgresql in hp-unix