Re: [HACKERS] Bug?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: meskes(at)topsystem(dot)de (Michael Meskes)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Bug?
Date: 1998-02-05 16:50:31
Message-ID: 199802051650.LAA01355@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us

In response to

  • Bug? at 1998-02-05 11:12:31 from Michael Meskes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-02-05 16:54:14 Re: [HACKERS] Re: [QUESTIONS] impossible insert data into VARCHAR
Previous Message Bruce Momjian 1998-02-05 16:47:44 Re: [HACKERS] Hi