PostgreSQL/Math Functions/isfinite
isfinite("now"::timestamp)
postgres=# SELECT isfinite("now"::timestamp) AS now_is_finite,
postgres-# isfinite("infinity"::timestamp) AS infinity;
now_is_finite | infinity
---------------+----------
t | f
(1 row)
postgres=#