Timestamp Infinity

The driver uses the following values to represent negative and positive infinity:

typeNegative infinityPositive infinity
LocalDateTimeLocalDateTime.MINLocalDateTime.MAX
OffsetDateTimeOffsetDateTime.MINOffsetDateTime.MAX
java.sql.Timestampwhen object’s millisecond value equals PGStatement.DATE_NEGATIVE_INFINITYwhen object’s millisecond value equals PGStatement.DATE_POSITIVE_INFINITY
java.sql.Timestamp ts = myResultSet.getTimestamp("mycol");

if (ts.getTime() == PGStatement.DATE_NEGATIVE_INFINITY) {
  // The value in the database is '-infinity'
}
if (ts.getTime() == PGStatement.DATE_POSITIVE_INFINITY) {
  // The value in the database is 'infinity'
}