Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Cc: Hiroshi Inoue <Inoue@tpf.co.jp>, Michael Meskes <meskes@postgreSQL.org>, PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Date: 2000-02-17T07:38:46Z
Lists: pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes: >> I proposed a while back that T_Float tokens ought to carry the value in >> string form, rather than actually converting it to float, > No fair only doing it for float8; int4 has the same trouble. Au contraire: int representation has no risk of loss of precision. It does risk overflow, but we can detect that reliably, and in fact scan.l already takes care of that scenario. If we allow ints to retain their current representation, then the manipulations currently done in gram.y don't need to change. All that's needed is to invoke the proper typinput function after we've decided what type we really want to convert a T_Float to. T_Float would act kind of like UNKNOWN-type string constants, except that the knowledge that the string looks numeric-ish could be used in type selection heuristics. regards, tom lane