PostgreSQL ISFINITE Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL ISFINITE() function

ISFINITE() function

The isfinite() function is used to get test for finite date (not +/-infinity).

Syntax :

isfinite(date)
or
isfinite(timestamp)
or
isfinite(interval)

Return Type : boolean.

PostgreSQL Version : 9.3

Pictorial Presentation of PostgreSQL ISFINITE() function

 

Example 1: PostgreSQL ISFINITE() function

SELECT isfinite(date '2002-09-17');

Output :

  isfinite
----------
 t
(1 row)

Example 2: PostgreSQL ISFINITE() function

The isfinite() function is used to get the test for a finite date (not +/-infinity).

SELECT isfinite(timestamp '2002-09-17 19:27:45');

Output :

 isfinite
----------
 t
(1 row)

Example 3: PostgreSQL ISFINITE() function

This function is used to test for a finite interval.

SELECT isfinite(interval '7 hours');

Output :

   isfinite
----------
 t
(1 row)