“Django/docs/2.2.x/ref/contrib/postgres/index”的版本间差异

来自菜鸟教程
Django/docs/2.2.x/ref/contrib/postgres/index
跳转至:导航、​搜索
(autoload)
 
(Page commit)
 
第1行: 第1行:
 +
{{DISPLAYTITLE:django.contrib.postgres — Django 文档}}
 
<div id="module-django.contrib.postgres" class="section">
 
<div id="module-django.contrib.postgres" class="section">
  
 
<span id="django-contrib-postgres"></span>
 
<span id="django-contrib-postgres"></span>
= <code>django.contrib.postgres</code> =
+
= django.contrib.postgres =
  
PostgreSQL has a number of features which are not shared by the other databases
+
PostgreSQL 具有许多 Django 支持的其他数据库不共享的功能。 此可选模块包含许多 PostgreSQL 特定数据类型的模型字段和表单字段。
Django supports. This optional module contains model fields and form fields for
 
a number of PostgreSQL specific data types.
 
  
 
<div class="admonition note">
 
<div class="admonition note">
  
注解
+
笔记
  
Django is, and will continue to be, a database-agnostic web framework. We
+
Django 是并且将继续是一个与数据库无关的 Web 框架。 我们鼓励那些为 Django 社区编写可重用应用程序的人在可行的情况下编写与数据库无关的代码。 但是,我们认识到使用 Django 编写的现实世界项目不需要与数据库无关。 事实上,一旦项目达到给定的大小,更改底层数据存储已经是一个重大挑战,并且可能需要以某种方式更改代码库以处理数据存储之间的差异。
would encourage those writing reusable applications for the Django
 
community to write database-agnostic code where practical. However, we
 
recognize that real world projects written using Django need not be
 
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.
 
  
Django provides support for a number of data types which will
+
Django 支持多种仅适用于 PostgreSQL 的数据类型。 没有根本原因(例如)<code>contrib.mysql</code> 模块不存在,除了 PostgreSQL 拥有最丰富的受支持数据库的功能集,因此它的用户可以获得最多的收益。
only work with PostgreSQL. There is no fundamental reason why (for example)
 
a <code>contrib.mysql</code> module does not exist, except that PostgreSQL has the
 
richest feature set of the supported databases so its users have the most
 
to gain.
 
  
  
第31行: 第19行:
 
<div class="toctree-wrapper compound">
 
<div class="toctree-wrapper compound">
  
* [[../aggregates|PostgreSQL specific aggregation functions]]
+
* [[../aggregates|PostgreSQL 特定的聚合函数]]
** [[../aggregates#general-purpose-aggregation-functions|General-purpose aggregation functions]]
+
** [[../aggregates#general-purpose-aggregation-functions|通用聚合函数]]
** [[../aggregates#aggregate-functions-for-statistics|Aggregate functions for statistics]]
+
** [[../aggregates#aggregate-functions-for-statistics|统计聚合函数]]
** [[../aggregates#usage-examples|Usage examples]]
+
** [[../aggregates#usage-examples|使用示例]]
* [[../fields|PostgreSQL specific model fields]]
+
* [[../fields|PostgreSQL 特定模型字段]]
** [[../fields#indexing-these-fields|Indexing these fields]]
+
** [[../fields#indexing-these-fields|索引这些字段]]
 
** [[../fields#arrayfield|<code>ArrayField</code>]]
 
** [[../fields#arrayfield|<code>ArrayField</code>]]
** [[../fields#citext-fields|<code>CIText</code> fields]]
+
** [[../fields#citext-fields|<code>CIText</code> 字段]]
 
** [[../fields#hstorefield|<code>HStoreField</code>]]
 
** [[../fields#hstorefield|<code>HStoreField</code>]]
 
** [[../fields#jsonfield|<code>JSONField</code>]]
 
** [[../fields#jsonfield|<code>JSONField</code>]]
** [[../fields#range-fields|Range Fields]]
+
** [[../fields#range-fields|范围字段]]
* [[../forms|PostgreSQL specific form fields and widgets]]
+
* [[../forms|PostgreSQL 特定的表单字段和小部件]]
 
** [[../forms#fields|字段]]
 
** [[../forms#fields|字段]]
** [[../forms#widgets|小部件]]
+
** [[../forms#widgets|小工具]]
* [[../functions|PostgreSQL specific database functions]]
+
* [[../functions|PostgreSQL 特定的数据库函数]]
 
** [[../functions#randomuuid|<code>RandomUUID</code>]]
 
** [[../functions#randomuuid|<code>RandomUUID</code>]]
 
** [[../functions#transactionnow|<code>TransactionNow</code>]]
 
** [[../functions#transactionnow|<code>TransactionNow</code>]]
* [[../indexes|PostgreSQL specific model indexes]]
+
* [[../indexes|PostgreSQL 特定的模型索引]]
 
** [[../indexes#brinindex|<code>BrinIndex</code>]]
 
** [[../indexes#brinindex|<code>BrinIndex</code>]]
 
** [[../indexes#btreeindex|<code>BTreeIndex</code>]]
 
** [[../indexes#btreeindex|<code>BTreeIndex</code>]]
第55行: 第43行:
 
** [[../indexes#hashindex|<code>HashIndex</code>]]
 
** [[../indexes#hashindex|<code>HashIndex</code>]]
 
** [[../indexes#spgistindex|<code>SpGistIndex</code>]]
 
** [[../indexes#spgistindex|<code>SpGistIndex</code>]]
* [[../lookups|PostgreSQL specific lookups]]
+
* [[../lookups|PostgreSQL 特定的查找]]
** [[../lookups#trigram-similarity|Trigram similarity]]
+
** [[../lookups#trigram-similarity|三元组相似度]]
 
** [[../lookups#unaccent|<code>Unaccent</code>]]
 
** [[../lookups#unaccent|<code>Unaccent</code>]]
* [[../operations|Database migration operations]]
+
* [[../operations|数据库迁移操作]]
** [[../operations#creating-extension-using-migrations|Creating extension using migrations]]
+
** [[../operations#creating-extension-using-migrations|使用迁移创建扩展]]
 
** [[../operations#createextension|<code>CreateExtension</code>]]
 
** [[../operations#createextension|<code>CreateExtension</code>]]
 
** [[../operations#btreeginextension|<code>BtreeGinExtension</code>]]
 
** [[../operations#btreeginextension|<code>BtreeGinExtension</code>]]
第68行: 第56行:
 
** [[../operations#trigramextension|<code>TrigramExtension</code>]]
 
** [[../operations#trigramextension|<code>TrigramExtension</code>]]
 
** [[../operations#unaccentextension|<code>UnaccentExtension</code>]]
 
** [[../operations#unaccentextension|<code>UnaccentExtension</code>]]
* [[../search|Full text search]]
+
* [[../search|全文检索]]
** [[../search#the-search-lookup|The <code>search</code> lookup]]
+
** [[../search#the-search-lookup|<code>search</code> 查找]]
 
** [[../search#searchvector|<code>SearchVector</code>]]
 
** [[../search#searchvector|<code>SearchVector</code>]]
 
** [[../search#searchquery|<code>SearchQuery</code>]]
 
** [[../search#searchquery|<code>SearchQuery</code>]]
 
** [[../search#searchrank|<code>SearchRank</code>]]
 
** [[../search#searchrank|<code>SearchRank</code>]]
** [[../search#changing-the-search-configuration|Changing the search configuration]]
+
** [[../search#changing-the-search-configuration|更改搜索配置]]
** [[../search#weighting-queries|Weighting queries]]
+
** [[../search#weighting-queries|加权查询]]
** [[../search#performance|Performance]]
+
** [[../search#performance|表现]]
** [[../search#trigram-similarity|Trigram similarity]]
+
** [[../search#trigram-similarity|三元组相似度]]
* [[../validators|Validators]]
+
* [[../validators|验证器]]
 
** [[../validators#keysvalidator|<code>KeysValidator</code>]]
 
** [[../validators#keysvalidator|<code>KeysValidator</code>]]
** [[../validators#range-validators|Range validators]]
+
** [[../validators#range-validators|范围验证器]]
  
  
第85行: 第73行:
  
 
</div>
 
</div>
 +
<div class="clearer">
  
[[Category:Django 2.2.x 中文文档]]
+
 
 +
 
 +
</div>
 +
 
 +
[[Category:Django 2.2.x 文档]]

2021年10月31日 (日) 04:05的最新版本

django.contrib.postgres

PostgreSQL 具有许多 Django 支持的其他数据库不共享的功能。 此可选模块包含许多 PostgreSQL 特定数据类型的模型字段和表单字段。

笔记

Django 是并且将继续是一个与数据库无关的 Web 框架。 我们鼓励那些为 Django 社区编写可重用应用程序的人在可行的情况下编写与数据库无关的代码。 但是,我们认识到使用 Django 编写的现实世界项目不需要与数据库无关。 事实上,一旦项目达到给定的大小,更改底层数据存储已经是一个重大挑战,并且可能需要以某种方式更改代码库以处理数据存储之间的差异。

Django 支持多种仅适用于 PostgreSQL 的数据类型。 没有根本原因(例如)contrib.mysql 模块不存在,除了 PostgreSQL 拥有最丰富的受支持数据库的功能集,因此它的用户可以获得最多的收益。