Corresponding values for -Infinity & Infinity in Postgres
2 answers
In fact, you can use the data types +infinity
and -infinity
to FLOAT4
and FLOAT8
(ie, float
and double precision
) and timestamps.
regress=> SELECT FLOAT8 '+infinity', FLOAT8 '-infinity';
float8 | float8
----------+-----------
Infinity | -Infinity
(1 row)
For other types, either use a separate column, use the min / max values for the type, or (where logically necessary) use null.
+6
source to share