FLOAT8 is an alias for DOUBLE PRECISION in PostgreSQL and several PostgreSQL-compatible systems. It stores 64-bit IEEE-754 floating-point numbers, offering roughly 15 decimal digits of precision and exponent range up to 1E308. Because it is an approximate numeric type, arithmetic can introduce rounding error and should not be used for money or other exact values. FLOAT8 columns default to accepting NaN and ±Infinity unless constrained. When casting, FLOAT8 converts compatible numeric or character input to double precision, truncating or rounding as needed. Storage size is a fixed 8 bytes. Performance is faster than arbitrary-precision NUMERIC but less precise. Choosing FLOAT8 over FLOAT4 avoids overflow and precision loss at the cost of twice the space. Not supported natively in many non-PostgreSQL databases, where the equivalent keyword is DOUBLE or DOUBLE PRECISION.
DOUBLE PRECISION, FLOAT4, REAL, NUMERIC, DECIMAL, CAST, ALTER TABLE
PostgreSQL 6.0
FLOAT8 offers roughly 15 decimal digits of precision and supports very large or small numbers up to about 1E308.
No. Because FLOAT8 is approximate, rounding errors can occur. Use NUMERIC or DECIMAL for currency.
FLOAT8 stores double the bytes and precision of FLOAT4, reducing overflow risk but consuming more space.
PostgreSQL and derivatives (Redshift, Greenplum, DuckDB) support FLOAT8. Other engines use the keyword DOUBLE or DOUBLE PRECISION instead.