docs: consistently uppercase index method and add spacing

Consistently uppercase index method names, e.g. GIN, and add space after
the index method name and the parentheses enclosing the column names.
pull/14/head
Bruce Momjian 10 years ago
parent 9feaba28e2
commit f6d65f0c70
  1. 2
      doc/src/sgml/btree-gin.sgml
  2. 4
      doc/src/sgml/btree-gist.sgml
  3. 2
      doc/src/sgml/gist.sgml
  4. 2
      doc/src/sgml/indices.sgml
  5. 6
      doc/src/sgml/json.sgml
  6. 4
      doc/src/sgml/ltree.sgml
  7. 6
      doc/src/sgml/pgtrgm.sgml
  8. 6
      doc/src/sgml/rangetypes.sgml
  9. 2
      doc/src/sgml/ref/create_index.sgml
  10. 12
      doc/src/sgml/textsearch.sgml

@ -36,7 +36,7 @@
<programlisting>
CREATE TABLE test (a int4);
-- create index
CREATE INDEX testidx ON test USING gin (a);
CREATE INDEX testidx ON test USING GIN (a);
-- query
SELECT * FROM test WHERE a &lt; 10;
</programlisting>

@ -61,7 +61,7 @@
<programlisting>
CREATE TABLE test (a int4);
-- create index
CREATE INDEX testidx ON test USING gist (a);
CREATE INDEX testidx ON test USING GIST (a);
-- query
SELECT * FROM test WHERE a &lt; 10;
-- nearest-neighbor search: find the ten entries closest to "42"
@ -78,7 +78,7 @@ SELECT *, a &lt;-&gt; 42 AS dist FROM test ORDER BY a &lt;-&gt; 42 LIMIT 10;
=&gt; CREATE TABLE zoo (
cage INTEGER,
animal TEXT,
EXCLUDE USING gist (cage WITH =, animal WITH &lt;&gt;)
EXCLUDE USING GIST (cage WITH =, animal WITH &lt;&gt;)
);
=&gt; INSERT INTO zoo VALUES(123, 'zebra');

@ -220,7 +220,7 @@
To use it, mention the class name in <command>CREATE INDEX</>,
for example
<programlisting>
CREATE INDEX ON my_table USING gist (my_inet_column inet_ops);
CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);
</programlisting>
</para>

@ -189,7 +189,7 @@ CREATE INDEX test1_id_index ON test1 (id);
<literal>=</literal> operator.
The following command is used to create a hash index:
<synopsis>
CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING hash (<replaceable>column</replaceable>);
CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING HASH (<replaceable>column</replaceable>);
</synopsis>
</para>

@ -375,13 +375,13 @@ SELECT '"foo"'::jsonb ? 'foo';
implement, see <xref linkend="functions-jsonb-op-table">.)
An example of creating an index with this operator class is:
<programlisting>
CREATE INDEX idxgin ON api USING gin (jdoc);
CREATE INDEX idxgin ON api USING GIN (jdoc);
</programlisting>
The non-default GIN operator class <literal>jsonb_path_ops</>
supports indexing the <literal>@&gt;</> operator only.
An example of creating an index with this operator class is:
<programlisting>
CREATE INDEX idxginp ON api USING gin (jdoc jsonb_path_ops);
CREATE INDEX idxginp ON api USING GIN (jdoc jsonb_path_ops);
</programlisting>
</para>
@ -426,7 +426,7 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc -&gt; 'tags' ? 'qui'
the <literal>"tags"</> key is common, defining an index like this
may be worthwhile:
<programlisting>
CREATE INDEX idxgintags ON api USING gin ((jdoc -&gt; 'tags'));
CREATE INDEX idxgintags ON api USING GIN ((jdoc -&gt; 'tags'));
</programlisting>
Now, the <literal>WHERE</> clause <literal>jdoc -&gt; 'tags' ? 'qui'</>
will be recognized as an application of the indexable

@ -550,8 +550,8 @@ INSERT INTO test VALUES ('Top.Collections.Pictures.Astronomy');
INSERT INTO test VALUES ('Top.Collections.Pictures.Astronomy.Stars');
INSERT INTO test VALUES ('Top.Collections.Pictures.Astronomy.Galaxies');
INSERT INTO test VALUES ('Top.Collections.Pictures.Astronomy.Astronauts');
CREATE INDEX path_gist_idx ON test USING gist(path);
CREATE INDEX path_idx ON test USING btree(path);
CREATE INDEX path_gist_idx ON test USING GIST (path);
CREATE INDEX path_idx ON test USING BTREE (path);
</programlisting>
<para>

@ -168,11 +168,11 @@
<programlisting>
CREATE TABLE test_trgm (t text);
CREATE INDEX trgm_idx ON test_trgm USING gist (t gist_trgm_ops);
CREATE INDEX trgm_idx ON test_trgm USING GIST (t gist_trgm_ops);
</programlisting>
or
<programlisting>
CREATE INDEX trgm_idx ON test_trgm USING gin (t gin_trgm_ops);
CREATE INDEX trgm_idx ON test_trgm USING GIN (t gin_trgm_ops);
</programlisting>
</para>
@ -274,7 +274,7 @@ CREATE TABLE words AS SELECT word FROM
Next, create a trigram index on the word column:
<programlisting>
CREATE INDEX words_idx ON words USING gin(word gin_trgm_ops);
CREATE INDEX words_idx ON words USING GIN (word gin_trgm_ops);
</programlisting>
Now, a <command>SELECT</command> query similar to the previous example can

@ -406,7 +406,7 @@ SELECT '[1.234, 5.678]'::floatrange;
GiST and SP-GiST indexes can be created for table columns of range types.
For instance, to create a GiST index:
<programlisting>
CREATE INDEX reservation_idx ON reservation USING gist (during);
CREATE INDEX reservation_idx ON reservation USING GIST (during);
</programlisting>
A GiST or SP-GiST index can accelerate queries involving these range operators:
<literal>=</>,
@ -453,7 +453,7 @@ CREATE INDEX reservation_idx ON reservation USING gist (during);
<programlisting>
CREATE TABLE reservation (
during tsrange,
EXCLUDE USING gist (during WITH &amp;&amp;)
EXCLUDE USING GIST (during WITH &amp;&amp;)
);
</programlisting>
@ -486,7 +486,7 @@ CREATE EXTENSION btree_gist;
CREATE TABLE room_reservation (
room text,
during tsrange,
EXCLUDE USING gist (room WITH =, during WITH &amp;&amp;)
EXCLUDE USING GIST (room WITH =, during WITH &amp;&amp;)
);
INSERT INTO room_reservation VALUES

@ -637,7 +637,7 @@ CREATE UNIQUE INDEX title_idx ON films (title) WITH (fillfactor = 70);
<para>
To create a <acronym>GIN</> index with fast updates disabled:
<programlisting>
CREATE INDEX gin_idx ON documents_table USING gin (locations) WITH (fastupdate = off);
CREATE INDEX gin_idx ON documents_table USING GIN (locations) WITH (fastupdate = off);
</programlisting>
</para>

@ -481,7 +481,7 @@ LIMIT 10;
linkend="textsearch-indexes">) to speed up text searches:
<programlisting>
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('english', body));
CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body));
</programlisting>
Notice that the 2-argument version of <function>to_tsvector</function> is
@ -511,7 +511,7 @@ CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('english', body));
configuration name is specified by another column, e.g.:
<programlisting>
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector(config_name, body));
CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector(config_name, body));
</programlisting>
where <literal>config_name</> is a column in the <literal>pgweb</>
@ -527,7 +527,7 @@ CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector(config_name, body));
Indexes can even concatenate columns:
<programlisting>
CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('english', title || ' ' || body));
CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title || ' ' || body));
</programlisting>
</para>
@ -547,7 +547,7 @@ UPDATE pgweb SET textsearchable_index_col =
Then we create a <acronym>GIN</acronym> index to speed up the search:
<programlisting>
CREATE INDEX textsearch_idx ON pgweb USING gin(textsearchable_index_col);
CREATE INDEX textsearch_idx ON pgweb USING GIN (textsearchable_index_col);
</programlisting>
Now we are ready to perform a fast full text search:
@ -3217,7 +3217,7 @@ SELECT plainto_tsquery('supernovae stars');
<tertiary>text search</tertiary>
</indexterm>
<literal>CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING gist(<replaceable>column</replaceable>);</literal>
<literal>CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING GIST (<replaceable>column</replaceable>);</literal>
</term>
<listitem>
@ -3238,7 +3238,7 @@ SELECT plainto_tsquery('supernovae stars');
<tertiary>text search</tertiary>
</indexterm>
<literal>CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING gin(<replaceable>column</replaceable>);</literal>
<literal>CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING GIN (<replaceable>column</replaceable>);</literal>
</term>
<listitem>

Loading…
Cancel
Save