2016-01-03 18:56:22 +08:00
|
|
|
===========================
|
2014-03-27 00:44:21 +08:00
|
|
|
``django.contrib.postgres``
|
|
|
|
===========================
|
|
|
|
|
2015-02-17 01:11:39 +08:00
|
|
|
.. module:: django.contrib.postgres
|
|
|
|
:synopsis: PostgreSQL-specific fields and features
|
|
|
|
|
2014-03-27 00:44:21 +08: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-28 07:46:48 +08:00
|
|
|
recognize that real world projects written using Django need not be
|
2014-03-27 00:44:21 +08: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-28 07:46:48 +08:00
|
|
|
|
2014-03-27 00:44:21 +08: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 23:21:48 +08:00
|
|
|
aggregates
|
2019-07-12 19:08:00 +08:00
|
|
|
constraints
|
2014-03-27 00:44:21 +08:00
|
|
|
fields
|
|
|
|
forms
|
2015-06-02 01:00:34 +08:00
|
|
|
functions
|
2016-08-08 19:50:25 +08:00
|
|
|
indexes
|
2014-09-06 04:53:11 +08:00
|
|
|
lookups
|
2014-03-15 01:34:49 +08:00
|
|
|
operations
|
2015-06-01 05:45:03 +08:00
|
|
|
search
|
2014-03-15 01:34:49 +08:00
|
|
|
validators
|