2016-01-03 12:56:22 +02:00
|
|
|
===========================
|
2014-03-26 16:44:21 +00:00
|
|
|
``django.contrib.postgres``
|
|
|
|
===========================
|
|
|
|
|
2015-02-16 12:11:39 -05: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 19:46:48 -04: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 19:46:48 -04: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 17:21:48 +02:00
|
|
|
aggregates
|
2019-07-12 13:08:00 +02:00
|
|
|
constraints
|
2020-11-20 21:35:04 +01:00
|
|
|
expressions
|
2014-03-26 16:44:21 +00:00
|
|
|
fields
|
|
|
|
forms
|
2015-06-01 18:00:34 +01:00
|
|
|
functions
|
2016-08-08 17:20:25 +05:30
|
|
|
indexes
|
2014-09-05 22:53:11 +02:00
|
|
|
lookups
|
2014-03-14 17:34:49 +00:00
|
|
|
operations
|
2015-05-31 22:45:03 +01:00
|
|
|
search
|
2014-03-14 17:34:49 +00:00
|
|
|
validators
|