2016-01-03 10:56:22 +00:00
|
|
|
===========================
|
2014-03-26 16:44:21 +00:00
|
|
|
``django.contrib.postgres``
|
|
|
|
===========================
|
|
|
|
|
2015-02-16 17:11:39 +00:00
|
|
|
.. module:: django.contrib.postgres
|
|
|
|
:synopsis: PostgreSQL-specific fields and features
|
|
|
|
|
2014-03-26 16:44:21 +00:00
|
|
|
PostgreSQL has a number of features which are not shared by the other databases
|
|
|
|
Django supports. This optional module contains model fields and form fields for
|
|
|
|
a number of PostgreSQL specific data types.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Django is, and will continue to be, a database-agnostic web framework. We
|
|
|
|
would encourage those writing reusable applications for the Django
|
|
|
|
community to write database-agnostic code where practical. However, we
|
2014-05-27 23:46:48 +00:00
|
|
|
recognize that real world projects written using Django need not be
|
2014-03-26 16:44:21 +00:00
|
|
|
database-agnostic. In fact, once a project reaches a given size changing
|
|
|
|
the underlying data store is already a significant challenge and is likely
|
|
|
|
to require changing the code base in some ways to handle differences
|
|
|
|
between the data stores.
|
2014-05-27 23:46:48 +00:00
|
|
|
|
2014-03-26 16:44:21 +00:00
|
|
|
Django provides support for a number of data types which will
|
|
|
|
only work with PostgreSQL. There is no fundamental reason why (for example)
|
|
|
|
a ``contrib.mysql`` module does not exist, except that PostgreSQL has the
|
|
|
|
richest feature set of the supported databases so its users have the most
|
|
|
|
to gain.
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
2015-02-08 15:21:48 +00:00
|
|
|
aggregates
|
2019-07-12 11:08:00 +00:00
|
|
|
constraints
|
2014-03-26 16:44:21 +00:00
|
|
|
fields
|
|
|
|
forms
|
2015-06-01 17:00:34 +00:00
|
|
|
functions
|
2016-08-08 11:50:25 +00:00
|
|
|
indexes
|
2014-09-05 20:53:11 +00:00
|
|
|
lookups
|
2014-03-14 17:34:49 +00:00
|
|
|
operations
|
2015-05-31 21:45:03 +00:00
|
|
|
search
|
2014-03-14 17:34:49 +00:00
|
|
|
validators
|