rails/rails — pull request #15158 by sgrif (2014-05-17 20:26:29+00:00)
Title: Delegate `Column#type` to the injected type object

The decision to wrap type registrations in a proc was made for two
reasons.

1. Some cases need to make an additional decision based on the type
(e.g. a `Decimal` with a 0 scale)
2. Aliased types are automatically updated if they type they point to is
updated later. If a user or another adapter decides to change the
object used for `decimal` columns, `numeric`, and `number` will
automatically point to the new type, without having to track what
types are aliased explicitly.

`OID::Type#infinity` was moved to `Type::Value` in order to avoid having
all postgres types inherit from a postgres specific superclass. I'd like
to move it back to only types that care about it as part of the larger
refactoring.

Everything else here should be pretty straightforward. PostgreSQL ranges
had to change slightly, since the `simplified_type` method is gone.

Part of #15134, and dependent on #15151.