Re: Odd sum() problem in 7.2.2

From: Richard Huxton <dev(at)archonet(dot)com>
To: andreas(at)sparcy(dot)net (Andreas Forsgren), pgsql-general(at)postgresql(dot)org
Subject: Re: Odd sum() problem in 7.2.2
Date: 2002-10-04 14:26:14
Message-ID: 200210041526.14561.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Bowlby 2002-10-04 14:27:27 pg_restore issue..
Previous Message Richard Huxton 2002-10-04 14:21:35 Re: transactions