:tickets: 7156
Adds support for PostgreSQL MultiRange types, introduced
- in PostgreSQL 14.
+ in PostgreSQL 14. Note that this feature currently only
+ tested with `psycopg` and the `psycopg.types.multirange`
+ type.
\ No newline at end of file
.. warning::
The multirange type DDL support should work with any PostgreSQL DBAPI
- driver, however the data types returned may vary.
+ driver, however the data types returned may vary. The feature is
+ currently developed against the psycopg driver, and is known to
+ work with the range types specific to the `psycopg.types.range`
+ extension module.
When instantiating models that use these column types, you should pass
whatever data type is expected by the DBAPI driver you're using for
For example:
.. code-block:: python
-
+ # Note: Multirange type currently only tested against the psycopg
+ # driver, hence the use here.
from psycopg.types.range import Range
from pscyopg.types.multirange import Multirange
from sqlalchemy.dialects.postgresql import TSMULTIRANGE