Skip to content

Commit 3f1802e

Browse files
committed
Documentation corrections for opclass parameters
Discussion: https://postgr.es/m/20200331024419.GB14618%40telsasoft.com Author: Justin Pryzby
1 parent 8d84dd0 commit 3f1802e

File tree

5 files changed

+42
-41
lines changed

5 files changed

+42
-41
lines changed

doc/src/sgml/hstore.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,13 @@ CREATE INDEX hidx ON testhstore USING GIN (h);
468468
</programlisting>
469469

470470
<para>
471-
<literal>gist_hstore_ops</literal> GiST opclass approximates set of
472-
key/value pairs as a bitmap signature. Optional integer parameter
473-
<literal>siglen</literal> of <literal>gist_hstore_ops</literal> determines
474-
signature length in bytes. Default signature length is 16 bytes.
471+
<literal>gist_hstore_ops</literal> GiST opclass approximates a set of
472+
key/value pairs as a bitmap signature. Its optional integer parameter
473+
<literal>siglen</literal> determines the
474+
signature length in bytes. The default length is 16 bytes.
475475
Valid values of signature length are between 1 and 2024 bytes. Longer
476-
signatures leads to more precise search (scan less fraction of index, scan
477-
less heap pages), but larger index.
476+
signatures lead to a more precise search (scanning a smaller fraction of the index and
477+
fewer heap pages), at the cost of a larger index.
478478
</para>
479479

480480
<para>

doc/src/sgml/intarray.sgml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
</para>
266266

267267
<para>
268-
Two parametrized GiST index operator classes are provided:
268+
Two parameterized GiST index operator classes are provided:
269269
<literal>gist__int_ops</literal> (used by default) is suitable for
270270
small- to medium-size data sets, while
271271
<literal>gist__intbig_ops</literal> uses a larger signature and is more
@@ -276,22 +276,23 @@
276276
</para>
277277

278278
<para>
279-
<literal>gist__int_ops</literal> approximates integer set as an array of
280-
integer ranges. Optional integer parameter <literal>numranges</literal> of
281-
<literal>gist__int_ops</literal> determines maximum number of ranges in
282-
one index key. Default value of <literal>numranges</literal> is 100.
279+
<literal>gist__int_ops</literal> approximates an integer set as an array of
280+
integer ranges. Its optional integer parameter <literal>numranges</literal>
281+
determines the maximum number of ranges in
282+
one index key. The default value of <literal>numranges</literal> is 100.
283283
Valid values are between 1 and 253. Using larger arrays as GiST index
284-
keys leads to more precise search (scan less fraction of index, scan less
285-
heap pages), but larger index.
284+
keys leads to a more precise search (scaning a smaller fraction of the index and
285+
fewer heap pages), at the cost of a larger index.
286286
</para>
287287

288288
<para>
289-
<literal>gist__intbig_ops</literal> approximates integer set as a bitmap
290-
signature. Optional integer parameter <literal>siglen</literal> of
291-
<literal>gist__intbig_ops</literal> determines signature length in bytes.
292-
Default signature length is 16 bytes. Valid values of signature length
293-
are between 1 and 2024 bytes. Longer signatures leads to more precise
294-
search (scan less fraction of index, scan less heap pages), but larger index.
289+
<literal>gist__intbig_ops</literal> approximates an integer set as a bitmap
290+
signature. Its optional integer parameter <literal>siglen</literal>
291+
determines the signature length in bytes.
292+
The default signature length is 16 bytes. Valid values of signature length
293+
are between 1 and 2024 bytes. Longer signatures lead to a more precise
294+
search (scanning a smaller fraction of the index and fewer heap pages), at
295+
the cost of a larger index.
295296
</para>
296297

297298
<para>

doc/src/sgml/ltree.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -516,16 +516,16 @@ Europe &amp; Russia*@ &amp; !Transportation
516516
<literal>@</literal>, <literal>~</literal>, <literal>?</literal>
517517
</para>
518518
<para>
519-
<literal>gist_ltree_ops</literal> GiST opclass approximates set of
520-
path labels as a bitmap signature. Optional integer parameter
521-
<literal>siglen</literal> of <literal>gist_ltree_ops</literal> determines
522-
signature length in bytes. Default signature length is 8 bytes.
519+
<literal>gist_ltree_ops</literal> GiST opclass approximates a set of
520+
path labels as a bitmap signature. Its optional integer parameter
521+
<literal>siglen</literal> determines the
522+
signature length in bytes. The default signature length is 8 bytes.
523523
Valid values of signature length are between 1 and 2024 bytes. Longer
524-
signatures leads to more precise search (scan less fraction of index, scan
525-
less heap pages), but larger index.
524+
signatures lead to a more precise search (scanning a smaller fraction of the index and
525+
fewer heap pages), at the cost of a larger index.
526526
</para>
527527
<para>
528-
Example of creating such an index with a default signature length of 8 bytes:
528+
Example of creating such an index with the default signature length of 8 bytes:
529529
</para>
530530
<programlisting>
531531
CREATE INDEX path_gist_idx ON test USING GIST (path);
@@ -545,13 +545,13 @@ CREATE INDEX path_gist_idx ON test USING GIST (path gist_ltree_ops(siglen=100));
545545
<literal>@</literal>, <literal>~</literal>, <literal>?</literal>
546546
</para>
547547
<para>
548-
<literal>gist__ltree_ops</literal> GiST opclass works similar to
548+
<literal>gist__ltree_ops</literal> GiST opclass works similarly to
549549
<literal>gist_ltree_ops</literal> and also takes signature length as
550-
a parameter. Default value of <literal>siglen</literal> in
550+
a parameter. The default value of <literal>siglen</literal> in
551551
<literal>gist__ltree_ops</literal> is 28 bytes.
552552
</para>
553553
<para>
554-
Example of creating such an index with a default signature length of 28 bytes:
554+
Example of creating such an index with the default signature length of 28 bytes:
555555
</para>
556556
<programlisting>
557557
CREATE INDEX path_gist_idx ON test USING GIST (array_path);

doc/src/sgml/pgtrgm.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@ CREATE INDEX trgm_idx ON test_trgm USING GIN (t gin_trgm_ops);
391391
</para>
392392

393393
<para>
394-
<literal>gist_trgm_ops</literal> GiST opclass approximates set of
395-
trigrams as a bitmap signature. Optional integer parameter
396-
<literal>siglen</literal> of <literal>gist_trgm_ops</literal> determines
397-
signature length in bytes. Default signature length is 12 bytes.
394+
<literal>gist_trgm_ops</literal> GiST opclass approximates a set of
395+
trigrams as a bitmap signature. Its optional integer parameter
396+
<literal>siglen</literal> determines the
397+
signature length in bytes. The default length is 12 bytes.
398398
Valid values of signature length are between 1 and 2024 bytes. Longer
399-
signatures leads to more precise search (scan less fraction of index, scan
400-
less heap pages), but larger index.
399+
signatures lead to a more precise search (scanning a smaller fraction of the index and
400+
fewer heap pages), at the cost of a larger index.
401401
</para>
402402

403403
<para>

doc/src/sgml/textsearch.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,17 +3670,17 @@ SELECT plainto_tsquery('supernovae stars');
36703670
to check the actual table row to eliminate such false matches.
36713671
(<productname>PostgreSQL</productname> does this automatically when needed.)
36723672
GiST indexes are lossy because each document is represented in the
3673-
index by a fixed-length signature. Signature length in bytes is determined
3673+
index by a fixed-length signature. The signature length in bytes is determined
36743674
by the value of the optional integer parameter <literal>siglen</literal>.
3675-
Default signature length (when <literal>siglen</literal> is not specied) is
3676-
124 bytes, maximal length is 2024 bytes. The signature is generated by hashing
3675+
The default signature length (when <literal>siglen</literal> is not specified) is
3676+
124 bytes, the maximum signature length is 2024 bytes. The signature is generated by hashing
36773677
each word into a single bit in an n-bit string, with all these bits OR-ed
36783678
together to produce an n-bit document signature. When two words hash to
36793679
the same bit position there will be a false match. If all words in
36803680
the query have matches (real or false) then the table row must be
3681-
retrieved to see if the match is correct. Longer signatures leads to more
3682-
precise search (scan less fraction of index, scan less heap pages), but
3683-
larger index.
3681+
retrieved to see if the match is correct. Longer signatures lead to a more
3682+
precise search (scanning a smaller fraction of the index and fewer heap
3683+
pages), at the cost of a larger index.
36843684
</para>
36853685

36863686
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy