Sam Mason <s...@samason.me.uk> writes: > This example does seem to be confounded by PG's somewhat eccentric type > system. Things would "just work" (in this case, and there have been > other cases recently[1]) if type decisions could be delayed slightly.
There's been previous speculation about having numeric literals be initially typed as "unknown_numeric", and then the existing preference for resolving "var op unknown" as a same-types operator could do the trick here. However, this would help only for float4 --- float8 tends to behave as expected already. Given that anyone working in float4 had better be well aware of its limited precision, I'm not convinced that there's much to be gained by fooling with this. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers