rails/rails — pull request #12694 by meskallito (2013-10-29 18:06:22+00:00)
Title: Support for Postgresql date/time ranges

Hi

I ran into a problem with time ranges in Postgresql. During initialization of ActiveRecord objects we got:
```
ArgumentError: bad value for range
.../activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/oid.rb:162:in `initialize'
```

It doesn't work because following code is not valid ruby code: `(Time.now .. Float::INFINITY)`

I think that `DateTime::Infinity` is better candidate to set infinite bounds for those ranges. Mostly because it allows to maintain similar behaviour between Time, Date and DateTime objects. I made a small extension to make it more predictable in comparison operations and modifications using durations.