rails/rails — pull request #14692 by senny (2014-04-10 18:46:43+00:00)
Title: PostgreSQL automatic type map reload

This patch contains two fixes:

* PostgreSQL adapter automatically reloads it's type map.
* Closes #14678
* PostgreSQL, only warn once per connection per missing OID.
* Closes #14275

**PostgreSQL adapter automatically reloads it's type map:**
PostgreSQL caches it's type-map after it's been initialized. When new types are defined, the type map was not updated. This lead to broken behavior and "unknown OID" warnings. This patch reloads the type map a single time when encountering a missing OID. Currently the complete type map is re-initialized. This could be enhanced by looking for the missing OID.

**PostgreSQL, only warn once per connection per missing OID:**
When unknown OIDs are in play, a warning was issued whenever that unknown type is used. This leads to a spam of warning messages on stderr. This patch registers the missing oid with `OID::Identity`.