11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.72 2009/12/23 17:41:43 tgl Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.73 2010/03/17 15:55:50 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -266,10 +266,10 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
266266 <title id="SQL-CREATEINDEX-storage-parameters-title">Index Storage Parameters</title>
267267
268268 <para>
269- The <literal>WITH</> clausecan specify <firstterm>storage parameters</>
270- forindexes . Each index methodcan have its own set of allowed storage
271- parameters. The<literal> B-tree</literal>, <literal> hash</literal> and
272- <literal>GiST</literal> built-in index methods all accept a single parameter:
269+ Theoptional <literal>WITH</> clausespecifies <firstterm>storage
270+ parameters</> forthe index . Each index methodhas its own set of allowed
271+ storage parameters. The B-tree, hash and GiST index methods all accept a
272+ single parameter:
273273 </para>
274274
275275 <variablelist>
@@ -281,10 +281,11 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
281281 The fillfactor for an index is a percentage that determines how full
282282 the index method will try to pack index pages. For B-trees, leaf pages
283283 are filled to this percentage during initial index build, and also
284- when extending the index at the right (largest key values). If pages
284+ when extending the index at the right (adding new largest key values).
285+ If pages
285286 subsequently become completely full, they will be split, leading to
286287 gradual degradation in the index's efficiency. B-trees use a default
287- fillfactor of 90, but any value from 10 to 100 can be selected.
288+ fillfactor of 90, but anyinteger value from 10 to 100 can be selected.
288289 If the table is static then fillfactor 100 is best to minimize the
289290 index's physical size, but for heavily updated tables a smaller
290291 fillfactor is better to minimize the need for page splits. The
@@ -297,7 +298,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
297298 </variablelist>
298299
299300 <para>
300- <literal> GIN</literal> indexes accept a different parameter:
301+ GIN indexes accept a different parameter:
301302 </para>
302303
303304 <variablelist>
@@ -373,7 +374,7 @@ CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable class="parameter">name</
373374 command will fail but leave behind an <quote>invalid</> index. This index
374375 will be ignored for querying purposes because it might be incomplete;
375376 however it will still consume update overhead. The <application>psql</>
376- <command>\d</> command willmark such an index as <literal>INVALID</>:
377+ <command>\d</> command willreport such an index as <literal>INVALID</>:
377378
378379<programlisting>
379380postgres=# \d tab
@@ -457,8 +458,8 @@ Indexes:
457458 <para>
458459 For index methods that support ordered scans (currently, only B-tree),
459460 the optional clauses <literal>ASC</>, <literal>DESC</>, <literal>NULLS
460- FIRST</>, and/or <literal>NULLS LAST</> can be specified toreverse
461- thenormal sortdirection of the index. Since an ordered index can be
461+ FIRST</>, and/or <literal>NULLS LAST</> can be specified tomodify
462+ the sortordering of the index. Since an ordered index can be
462463 scanned either forward or backward, it is not normally useful to create a
463464 single-column <literal>DESC</> index — that sort ordering is already
464465 available with a regular index. The value of these options is that
@@ -539,7 +540,7 @@ CREATE UNIQUE INDEX title_idx ON films (title) WITH (fillfactor = 70);
539540 <para>
540541 To create a <acronym>GIN</> index with fast updates disabled:
541542<programlisting>
542- CREATE INDEX gin_idx ON documents_table (locations) WITH (fastupdate = off);
543+ CREATE INDEX gin_idx ON documents_tableUSING gin (locations) WITH (fastupdate = off);
543544</programlisting>
544545 </para>
545546
@@ -552,22 +553,17 @@ CREATE INDEX code_idx ON films (code) TABLESPACE indexspace;
552553</programlisting>
553554 </para>
554555
555- <!--
556- <comment>
557- Is this example correct?
558- </comment>
559556 <para>
560557 To create a GiST index on a point attribute so that we
561558 can efficiently use box operators on the result of the
562559 conversion function:
563560 <programlisting>
564561CREATE INDEX pointloc
565- ON points USINGGIST (point2box (location) box_ops );
562+ ON points USINGgist (box (location,location) );
566563SELECT * FROM points
567- WHEREpoint2box(points.pointloc) = boxes. box;
564+ WHEREbox(location,location) && '(0,0),(1,1)':: box;
568565 </programlisting>
569566 </para>
570- -->
571567
572568 <para>
573569 To create an index without locking out writes to the table: