Re: [HACKERS] numeric data type on 6.5 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] numeric data type on 6.5
Date
Msg-id 8478.925225198@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] numeric data type on 6.5  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> I'm looking at this right now. I had coded in a fallback to FLOAT8 for
> the integer types because at the time that was the only other useful
> numeric type. However, I'm going to try changing the code to leave a
> failed INTx token as a string of unspecified type, which would be
> typed and converted later using the automatic coersion mechanism.

That would be good as far as it goes, but what about cases with a
decimal point in 'em?  Converting to float and then to numeric will
lose precision.

I'm inclined to think you should prevent the parser from converting
*any* numeric constant out of string form until it knows the target data
type.

(IIRC, INT8 has problems similar to NUMERIC's...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] views and group by (formerly: create view as selec
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Re: [GENERAL] unknown symbol 'lo_unlink'