Re: [HACKERS] Re: [GENERAL] date_part bug?

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] Re: [GENERAL] date_part bug?
Дата
Msg-id 367A7248.4E435FD9@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: [GENERAL] date_part bug?  ("Oliver Elphick" <olly@lfix.co.uk>)
Список pgsql-general
> Not all glibc2: I run glibc2 Debian Linux and do not see this problem.
> I was wondering if it was libc5 that was giving trouble...

Not on my libc5-only machine (where I developed the code). We'll need to
get a reproducible case to be able to track it down. I'm guessing that
we are seeing float->int rounding problems, though I don't know why this
test query should show different results for the two columns.

What glibc2, compiler, and optimization level are you using? If you are
using anything above -O2 try backing down to that; if you are already
there then try -O0 and tell us what changes.

                      - Tom

postgres=> create table tmp (v1 date, v2 datetime);
CREATE
postgres=> insert into tmp values ('06-01-1999', '06-01-1999');
INSERT 901482 1
postgres=> select date_part('month', v1) as m1, date_part('month', v2)
as m2 from tmp;
m1|m2
--+--
 6| 6
(1 row)

В списке pgsql-general по дате отправления:

Предыдущее
От: Valerio Santinelli
Дата:
Сообщение: Slow Searches using MSAccess and ODBC to a PostGreSQL database
Следующее
От: Clark Evans
Дата:
Сообщение: FWD: Erlang/Mnesia Open source