rails/rails — pull request #17037 by adamonduty (2014-09-23 18:37:11+00:00)
Title: Add support for timetz fields

While upgrading an app to rails 4, I noticed messages like this in my development log:
```unknown OID: field_name(1266) (SELECT ...)```

In addition, the ```time_select``` helpers on the field fail with ````undefined method `min' for "12:00:00+00":String```` because the field is interpreted as a string rather than typecast to a time.

The warning message is produced by this code in the postgres adapter. I think its well known that postgres has both `timestamp` and `timestamptz` for date and time, but for time of day only, postgres also has both `time` and `timetz`. This patch registers `timetz` which enables my application to work as expected.

This patch is targeted to 4.0, but the same fix applies in 4.1, and I have another branch of very similar name for 4.1 in my fork.

On master, it appears another one line fix would work for this code, but it is untested:

```ruby
m.alias_type 'timetz', 'time'
```

I can submit a patch for master if necessary.