diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2013-06-26 08:15:44 -0700 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2013-06-26 08:15:44 -0700 |
commit | 51aec4f4c847f5447a02f57e095f7a3a16a4fe67 (patch) | |
tree | 2a59549aac8744e208cb7c9459f22df202be3253 | |
parent | 11447041804dd39d05684c7809971a253c800cba (diff) | |
parent | fb469dfb240ef62ee05d58f843f4923c635a6ad2 (diff) | |
download | sqlalchemy-51aec4f4c847f5447a02f57e095f7a3a16a4fe67.tar.gz |
Merge pull request #12 from cjw296/master
Range type docs improvements.
-rw-r--r-- | doc/build/dialects/postgresql.rst | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/build/dialects/postgresql.rst b/doc/build/dialects/postgresql.rst index f2b401e9a..3c151483f 100644 --- a/doc/build/dialects/postgresql.rst +++ b/doc/build/dialects/postgresql.rst @@ -82,8 +82,11 @@ construction arguments, are as follows: :members: __init__ :show-inheritance: -.. autoclass:: sqlalchemy.dialects.postgresql.ranges.RangeOperators - :members: +Range Types +~~~~~~~~~~~ + +The new range column types founds in PostgreSQL 9.2 onwards are +catered for by the following types: .. autoclass:: INT4RANGE :show-inheritance: @@ -103,6 +106,19 @@ construction arguments, are as follows: .. autoclass:: TSTZRANGE :show-inheritance: +The types above get most of their functionality from the following +mixin: + +.. autoclass:: sqlalchemy.dialects.postgresql.ranges.RangeOperators + :members: + +.. warning:: + + The range type DDL support should work with any Postgres DBAPI + driver, however the data types returned may vary. If you are using + ``psycopg2``, it's recommended to upgrade to version 2.5 or later + before using these column types. + PostgreSQL Constraint Types --------------------------- @@ -116,10 +132,7 @@ SQLAlchemy supports Postgresql EXCLUDE constraints via the For example:: - from sqlalchemy.dialects.postgresql import ( - ExcludeConstraint, - TSRANGE as Range, - ) + from sqlalchemy.dialects.postgresql import ExcludeConstraint, TSRANGE class RoomBookings(Base): |