Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8' - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Date
Msg-id 38AB9FD2.92869E92@alumni.caltech.edu
Whole thread Raw
In response to RE: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
List pgsql-hackers
> I proposed a while back that T_Float tokens ought to carry the value in
> string form, rather than actually converting it to float, so that we
> behave consistently while taking no precision risks until the target
> type is known for certain.  Thomas seems not to want to do it that way,
> for some reason.

Hmm. We should then carry *all* numeric types as strings farther into
the backend, probably deeper than gram.y? Some of the input validation
happens as early as gram.y now, so I guess we would need to do some
conversion at that point for some contexts, and leave the numeric
stuff as a string in other contexts. No fair only doing it for float8;
int4 has the same trouble.

Just seems like a can of worms, but it is definitely (?) the right
solution since at the moment the early interpretation of numerics can
lead to loss of info or precision deeper in the code.

This could be a minor-release kind of improvement...
                     - Thomas

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] libpq
Next
From: Tom Lane
Date:
Subject: Definitional issue for INET types