浏览代码

Refs #26167 -- Corrected OpClass() example in docs.

Hannes Ljungberg 4 年之前
父节点
当前提交
90ddf46ef7
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      docs/ref/contrib/postgres/indexes.txt

+ 4 - 1
docs/ref/contrib/postgres/indexes.txt

@@ -190,7 +190,10 @@ available from the ``django.contrib.postgres.indexes`` module.
 
     For example::
 
-        Index(OpClass(Lower('username'), name='varchar_pattern_ops'))
+        Index(
+            OpClass(Lower('username'), name='varchar_pattern_ops'),
+            name='lower_username_idx',
+        )
 
     creates an index on ``Lower('username')`` using ``varchar_pattern_ops``.