> > --- >> The question is: how accurate is floating point numbers in Postgres. We >> are using 7.4 soon to be moving to 8.2. >> I need the accuracy to about 6 decimal points. I have read that floating >> points can convert to numbers in accurately. > > http://www.postgresql.org/docs/8.2/interactive/datatype-numeric.html#DATATYPE-FLOAT > > I didn't see anything about numeric being a string type, > >
Numeric values are physically stored without any extra leading or trailing zeroes. Thus, the declared precision and scale of a column are maximums, not fixed allocations. (In this sense the numeric type is more akin to varchar(n) than to char(n).) The actual storage requirement is two bytes for each group of four decimal digits, plus eight bytes overhead. However, arithmetic on numeric values is very slow compared to the integer types, or to the floating-point types described in the next section. http://www.postgresql.org/docs/8.2/static/datatype-numeric.html http://www.postgresql.org/docs/8.2/interactive/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL > > Regards, > Richard Broersma Jr. > -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall --- -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall --- ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq