rails/rails — pull request #6821 by tonywok (2012-06-21 23:38:48+00:00)
Title: Allow precision option for postgresql datetimes

This patch addresses the difficulty of retrieving datetime fields. By default, the database holds a higher precision than the time as a String. Currently there isn't a sensible way to specify a precision on timestamp fields.

However, you are able to get postgres to accept a precision by sending along a :limit option from ActiveRecord. This commit is an attempt to swap that responsibility with :precision, as I think it was intended.

This issue is discussed at length at the following links:
- [#3519](https://github.com/rails/rails/issues/3519)
- [#3520](https://github.com/rails/rails/issues/3520)

Also, kudos to @mattscilipoti for pointing it out in the above issues.

Thanks!