Skip to content

Commit

Permalink
Some documentation, drops 1.8.7 from travis
Browse files Browse the repository at this point in the history
  • Loading branch information
danmcclain committed Jun 14, 2013
1 parent 992550f commit 6daa250
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- jruby-18mode
- jruby-19mode

before_script:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ the gem please ask the question on
[Stack Overflow](http://stackoverflow.com). Be sure to tag the
question with `DockYard` so we can find it.

## Note ##
PostgresExt is dropping support for Ruby 1.8.7 with the next minor
release.

## Installation

Add this line to your application's Gemfile:
Expand Down
19 changes: 19 additions & 0 deletions docs/type_casting.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,22 @@ person_2.favorite_numbers
person_2.favorite_numbers.first.class
# => Fixnum
```

## Ranges
Like array objects, postgres\_ext supports range types as well.
Numrange, in4range, int8range, daterange, tsrange, and tstzrange are all
supported, but there are some notable caveats.

### Int and Date ranges
As integers and days are discrete measurements, PostgreSQL will
normalize these ranges as they are store in the database. PostgreSQL
will convert end-inclusive ranges to end-exclusive, meaning that `0..4`
becomes `0...5`. Developers should be aware of this when using integer
and date ranges, since ruby will treat these ranges differently from
PostgreSQL.

### Timestamp with and without timezone
Ruby/Rails 3.2.x does not support datetime ranges that begin or end with
infinity. Rails 4 has patched datetime and time so that infinity
terminated ranges work, but currently postgres\_ext has not patched the
required methods.

0 comments on commit 6daa250

Please sign in to comment.