Re: Odd sum() problem in 7.2.2

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Odd sum() problem in 7.2.2
Дата
Msg-id 200210041526.14561.dev@archonet.com
обсуждение исходный текст
Ответ на Odd sum() problem in 7.2.2  (andreas@sparcy.net (Andreas Forsgren))
Ответы Re: Odd sum() problem in 7.2.2
Список 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 по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: transactions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Trouble compiling postgresql in hp-unix