Thomas Lockhart writes:
One hesitation I have is the performance hit in mixing FLOAT and
NUMERIC; I (probably) don't want to make NUMERIC the "best" numeric
type, since it is potentially so slow.
I concur --- I'd be inclined to leave FLOAT8 as the top of the
hierarchy. But NUMERIC could be stuck in there between int and float,
no? (int-vs-numeric ops certainly must be promoted to numeric...)
If you cast NUMERIC to FLOAT8, then you would loose precision and it would
be counterintuitive type promotion (at least for a C programmer). If someone
wants speed over correctness, he can always explicitly cast NUMERIC to
FLOAT8. Seems like "correct" should take precedence over "fast", at least as
long as there is a way to do "fast".

Gene Sokolov.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 13 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedFeb 16, '00 at 11:51a
activeFeb 19, '00 at 2:11p
posts13
users7
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase