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

From Thomas Lockhart
Subject Re: [HACKERS] numeric data type on 6.5
Date
Msg-id 3725C990.DF9C4070@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] numeric data type on 6.5  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] numeric data type on 6.5  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>     The  problem is that the yacc parser already tries to convert
>     it into an integer or float if you omit the quotes. I'll  try
>     to  implement  a  NUMERIC  fallback for this case for 6.6 and
>     then have all the auto conversion functionality  so  NUMERIC,
>     INTEGER and FLOAT can be used mixed.

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.

istm that this would be a no-brainer for v6.5, since it is just
replacing one heuristic with a more general and more correct one. And
I had implemented both, so we know who to blame :)

Will let y'all know how it goes...
                      - Tom

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] HSavage bug in Postgresql beta?
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] RE: Mysql comparison