mauricio / postgresql-async

Async, Netty based, database drivers for PostgreSQL and MySQL written in Scala
Apache License 2.0
1.43k stars 222 forks source link

Timestamp decoder/encoder does not support infinity #247

Open cornerman opened 6 years ago

cornerman commented 6 years ago

In postgres, there are some special date/time/timestamp values like infinity and -infinity (see https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE). These can also show up as values in a column.

When decoding special timestamp values like infinity the decoder throws an IllegalArgumentException with "invalid format: infinity".

Can we support this?

Maybe related for having a proper counter part in the joda data types: https://sourceforge.net/p/joda-time/feature-requests/79/