Re: [HACKERS] Bug?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Bug?
Дата
Msg-id 199802051650.LAA01355@candle.pha.pa.us
обсуждение исходный текст
Ответ на Bug?  (Michael Meskes <meskes@topsystem.de>)
Ответы Re: [HACKERS] Bug?
Список pgsql-hackers
>
> I'm currently back to work with version 6.2.1 since I cannot connect with
> 6.3 via ODBC.
>
> Anyway, I got my application running after finding a problem (inside the
> app) with data conversion (it read double from a long data field). But it
> seems I also encountered what I believe to be a bug. Since I'm nor sure
> whether it's known I bring it up here. If I try to insert 199802051215 to a
> float8 field it doesn't work because the parser believes this is a long and
> truncates it to 2147...... Using 199802051215.0 to make sure it's a float
> works fine. Shouldn't the parser be able to handle this?

I think it converts it to an integer, and then by the time it tries to
convert it, it has already chopped off the top of the number.  The only
fix for this would be to read all integers in as 64-bit integers, then
do the conversion, but that could be a performance problem.

--
Bruce Momjian
maillist@candle.pha.pa.us

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

Предыдущее
От: Ewan Mellor
Дата:
Сообщение: create function bug?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [QUESTIONS] MySQL benchmark page