rails/rails — pull request #13244 by kommen (2013-12-09 18:18:23+00:00)
Title: Add Enum type to postgresql adapter's oids to prevent unknown OID warnings

Currently whenever ActiveRecord retrieves a row from postgres which has an enum column, a warning is printed, e.g.

```
unknown OID: enum(75561) (SELECT "postgresql_enums".* FROM "postgresql_enums" WHERE "postgresql_enums"."id" = $1 LIMIT 1)
```

This patch adds an Enum type for postgres and registers enums in the type map, preventing the warnings.
The patch also changes the return values from enums to symbols from strings., which I think would be the proper way to do it. Though I recognise this might break existing apps using enums and expecting strings being returned, so it might be better to just let it be strings?

Related to #7814