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