docs: consistently uppercase index method and add spacing
authorBruce Momjian
Fri, 15 May 2015 15:42:29 +0000 (11:42 -0400)
committerBruce Momjian
Fri, 15 May 2015 15:42:34 +0000 (11:42 -0400)
Consistently uppercase index method names, e.g. GIN, and add space after
the index method name and the parentheses enclosing the column names.

doc/src/sgml/btree-gin.sgml
doc/src/sgml/btree-gist.sgml
doc/src/sgml/gist.sgml
doc/src/sgml/indices.sgml
doc/src/sgml/json.sgml
doc/src/sgml/ltree.sgml
doc/src/sgml/pgtrgm.sgml
doc/src/sgml/rangetypes.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/textsearch.sgml

index 42b9e97b72a1f9191c51dc6d43694cc148dd1855..2b081db9d5ab3c5943c6a0e7ba35ddde9197652e 100644 (file)
@@ -36,7 +36,7 @@
 
 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 < 10;
 
index 2275a997ba296add0091cfe745fc92c3dd9f106f..f4afc0954630885fe20b043370e6250da65d3e12 100644 (file)
@@ -61,7 +61,7 @@
 
 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 < 10;
 -- nearest-neighbor search: find the ten entries closest to "42"
@@ -78,7 +78,7 @@ SELECT *, a <-> 42 AS dist FROM test ORDER BY a <-> 42 LIMIT 10;
 => CREATE TABLE zoo (
   cage   INTEGER,
   animal TEXT,
-  EXCLUDE USING gist (cage WITH =, animal WITH <>)
+  EXCLUDE USING GIST (cage WITH =, animal WITH <>)
 );
 
 => INSERT INTO zoo VALUES(123, 'zebra');
index 641d1d04ba4c747413b4945e93c5a8f36cfd5bc5..4ab93252340b0cc5f5bba366137b6d461d8e7561 100644 (file)
   To use it, mention the class name in CREATE INDEX,
   for example
 
-CREATE INDEX ON my_table USING gist (my_inet_column inet_ops);
+CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);
 
  
 
index b73463a323872444b3b28bcdbfd6a20bcf586815..309fd1269bd6056e3d0675fba8e4ac05a7aeae73 100644 (file)
@@ -189,7 +189,7 @@ CREATE INDEX test1_id_index ON test1 (id);
    = operator.
    The following command is used to create a hash index:
 
-CREATE INDEX name ON table USING hash (column);
+CREATE INDEX name ON table USING HASH (column);
 
   
 
index 6282ab885397683428197d526bbb226093184c9e..1e78558e27ac390a5669ba682996ab2035df0f20 100644 (file)
@@ -375,13 +375,13 @@ SELECT '"foo"'::jsonb ? 'foo';
     implement, see .)
     An example of creating an index with this operator class is:
 
-CREATE INDEX idxgin ON api USING gin (jdoc);
+CREATE INDEX idxgin ON api USING GIN (jdoc);
 
     The non-default GIN operator class jsonb_path_ops
     supports indexing the @> operator only.
     An example of creating an index with this operator class is:
 
-CREATE INDEX idxginp ON api USING gin (jdoc jsonb_path_ops);
+CREATE INDEX idxginp ON api USING GIN (jdoc jsonb_path_ops);
 
   
 
@@ -426,7 +426,7 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc -> 'tags' ? 'qui'
     the "tags" key is common, defining an index like this
     may be worthwhile:
 
-CREATE INDEX idxgintags ON api USING gin ((jdoc -> 'tags'));
+CREATE INDEX idxgintags ON api USING GIN ((jdoc -> 'tags'));
 
     Now, the WHERE clause jdoc -> 'tags' ? 'qui'
     will be recognized as an application of the indexable
index 3f87319bf96813edfdc0cd736effa01f6a4491fc..8a7a36390d3c8c9c428015b7df5a4e9a2c7f892f 100644 (file)
@@ -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);
 
 
   
index f66439523a5c3dc47f5f5e7dea86b04e5224ae77..9eb2a6742e48ec00c96de5eac8feb36f891ae40f 100644 (file)
 
 
 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);
 
 or
 
-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);
 
   
 
@@ -274,7 +274,7 @@ CREATE TABLE words AS SELECT word FROM
    Next, create a trigram index on the word column:
 
 
-CREATE INDEX words_idx ON words USING gin(word gin_trgm_ops);
+CREATE INDEX words_idx ON words USING GIN (word gin_trgm_ops);
 
 
    Now, a SELECT query similar to the previous example can
index d1125618b4af990dd9d2a2e2a779f2d822ee7bab..260545711b3a544b71ea5c316d3a3ad6f6ad6dba 100644 (file)
@@ -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:
 
-CREATE INDEX reservation_idx ON reservation USING gist (during);
+CREATE INDEX reservation_idx ON reservation USING GIST (during);
 
    A GiST or SP-GiST index can accelerate queries involving these range operators:
    =,
@@ -453,7 +453,7 @@ CREATE INDEX reservation_idx ON reservation USING gist (during);
 
 CREATE TABLE reservation (
     during tsrange,
-    EXCLUDE USING gist (during WITH &&)
+    EXCLUDE USING GIST (during WITH &&)
 );
 
 
@@ -486,7 +486,7 @@ CREATE EXTENSION btree_gist;
 CREATE TABLE room_reservation (
     room text,
     during tsrange,
-    EXCLUDE USING gist (room WITH =, during WITH &&)
+    EXCLUDE USING GIST (room WITH =, during WITH &&)
 );
 
 INSERT INTO room_reservation VALUES
index 6b2ee2818118398d0c860db745a6df4ce8ee8588..ce36a1ba48006c055c5415d7a8740deb013a6d6d 100644 (file)
@@ -637,7 +637,7 @@ CREATE UNIQUE INDEX title_idx ON films (title) WITH (fillfactor = 70);
   
    To create a GIN index with fast updates disabled:
 
-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);
 
   
 
index 0bc7e7b41c7769966bd82068f297b41f00de8dfc..b1c669fb9152c518e5c6d4e594205d95915cb5c1 100644 (file)
@@ -481,7 +481,7 @@ LIMIT 10;
     linkend="textsearch-indexes">) to speed up text searches:
 
 
-CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector('english', body));
+CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', body));
 
 
     Notice that the 2-argument version of to_tsvector 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.:
 
 
-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));
 
 
     where config_name is a column in the pgweb
@@ -527,7 +527,7 @@ CREATE INDEX pgweb_idx ON pgweb USING gin(to_tsvector(config_name, body));
     Indexes can even concatenate columns:
 
 
-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));
 
    
 
@@ -547,7 +547,7 @@ UPDATE pgweb SET textsearchable_index_col =
     Then we create a GIN index to speed up the search:
 
 
-CREATE INDEX textsearch_idx ON pgweb USING gin(textsearchable_index_col);
+CREATE INDEX textsearch_idx ON pgweb USING GIN (textsearchable_index_col);
 
 
     Now we are ready to perform a fast full text search:
@@ -3217,7 +3217,7 @@ SELECT plainto_tsquery('supernovae stars');
       text search
      
 
-      CREATE INDEX name ON table USING gist(column);
+      CREATE INDEX name ON table USING GIST (column);
      
 
      
@@ -3238,7 +3238,7 @@ SELECT plainto_tsquery('supernovae stars');
       text search
      
 
-      CREATE INDEX name ON table USING gin(column);
+      CREATE INDEX name ON table USING GIN (column);