Skip to content

Commit 14903f2

Browse files
committed
Language fixes for docs related to opclass options
Discussion: https://postgr.es/m/20200620232145.GB17995%40telsasoft.com Author: Justin Pryzby Backpatch-through: 13
1 parent 48c6959 commit 14903f2

File tree

6 files changed

+41
-41
lines changed

6 files changed

+41
-41
lines changed

doc/src/sgml/brin.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,30 +562,30 @@ typedef struct BrinOpcInfo
562562
</varlistentry>
563563
</variablelist>
564564

565-
Optionally, an operator class for <acronym>BRIN</acronym> can supply the
565+
An operator class for <acronym>BRIN</acronym> can optionally specify the
566566
following method:
567567

568568
<variablelist>
569569
<varlistentry>
570570
<term><function>void options(local_relopts *relopts)</function></term>
571571
<listitem>
572572
<para>
573-
Defines set of user-visible parameters that control operator class
573+
Defines a set of user-visible parameters that control operator class
574574
behavior.
575575
</para>
576576

577577
<para>
578-
The <function>options</function> function has given pointer to
578+
The <function>options</function> function is passed a pointer to a
579579
<replaceable>local_relopts</replaceable> struct, which needs to be
580580
filled with a set of operator class specific options. The options
581-
can be accessed from other support functions using
581+
can be accessed from other support functions using the
582582
<literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
583583
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
584584
</para>
585585

586586
<para>
587-
Since both key extraction for indexed value and representation of the
588-
key in <acronym>GIN</acronym> are flexible, it may depends on
587+
Since both key extraction of indexed values and representation of the
588+
key in <acronym>GIN</acronym> are flexible, they may depend on
589589
user-specified parameters.
590590
</para>
591591
</listitem>

doc/src/sgml/btree.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
557557
Optionally, a B-tree operator family may provide
558558
<function>options</function> (<quote>operator class specific
559559
options</quote>) support functions, registered under support
560-
function number 5. These functions define set of user-visible
560+
function number 5. These functions define a set of user-visible
561561
parameters that control operator class behavior.
562562
</para>
563563
<para>
@@ -566,19 +566,19 @@ equalimage(<replaceable>opcintype</replaceable> <type>oid</type>) returns bool
566566
<synopsis>
567567
options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns void
568568
</synopsis>
569-
The function has given pointer to <replaceable>local_relopts</replaceable>
569+
The function is passed a pointer to a <replaceable>local_relopts</replaceable>
570570
struct, which needs to be filled with a set of operator class
571571
specific options. The options can be accessed from other support
572-
functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
572+
functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
573573
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
574574
</para>
575575
<para>
576-
Currently, no B-Tree operator class has <function>options</function>
576+
Currently, no B-Tree operator class has an <function>options</function>
577577
support function. B-tree doesn't allow flexible representation of keys
578578
like GiST, SP-GiST, GIN and BRIN do. So, <function>options</function>
579-
probably doesn't have much usage in current shape of B-tree index
579+
probably doesn't have much application in the current B-tree index
580580
access method. Nevertheless, this support function was added to B-tree
581-
for uniformity, and probably it will found its usage during further
581+
for uniformity, and will probably find uses during further
582582
evolution of B-tree in <productname>PostgreSQL</productname>.
583583
</para>
584584
</listitem>

doc/src/sgml/gin.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,17 +411,17 @@
411411
</para>
412412

413413
<para>
414-
The <function>options</function> function has given pointer to
414+
The <function>options</function> function is passed a pointer to a
415415
<replaceable>local_relopts</replaceable> struct, which needs to be
416-
filled with s set of operator class specific options. The options
417-
can be accessed from other support functions using
416+
filled with a set of operator class specific options. The options
417+
can be accessed from other support functions using the
418418
<literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
419419
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
420420
</para>
421421

422422
<para>
423-
Since both key extraction for indexed value and representation of the
424-
key in <acronym>GIN</acronym> are flexible, it may depends on
423+
Since both key extraction of indexed values and representation of the
424+
key in <acronym>GIN</acronym> are flexible, they may depend on
425425
user-specified parameters.
426426
</para>
427427
</listitem>

doc/src/sgml/gist.sgml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ my_fetch(PG_FUNCTION_ARGS)
946946
<term><function>options</function></term>
947947
<listitem>
948948
<para>
949-
Allows defintion of user-visible parameters that control operator
949+
Allows definition of user-visible parameters that control operator
950950
class behavior.
951951
</para>
952952

@@ -962,16 +962,16 @@ LANGUAGE C STRICT;
962962
</para>
963963

964964
<para>
965-
The function has given pointer to <replaceable>local_relopts</replaceable>
965+
The function is passed a pointer to a <replaceable>local_relopts</replaceable>
966966
struct, which needs to be filled with a set of operator class
967967
specific options. The options can be accessed from other support
968-
functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
968+
functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
969969
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
970970
</para>
971971

972972
<para>
973-
The sample implementation of my_option() and parameters usage
974-
in the another support function are given below:
973+
An example implementation of my_options() and parameters use
974+
from other support functions are given below:
975975

976976
<programlisting>
977977
typedef enum MyEnumType
@@ -990,7 +990,7 @@ typedef struct
990990
int str_param; /* string parameter */
991991
} MyOptionsStruct;
992992

993-
/* String representations for enum values */
993+
/* String representation of enum values */
994994
static relopt_enum_elt_def myEnumValues[] =
995995
{
996996
{"on", MY_ENUM_ON},
@@ -1002,7 +1002,7 @@ static relopt_enum_elt_def myEnumValues[] =
10021002
static char *str_param_default = "default";
10031003

10041004
/*
1005-
* Sample validatior: checks that string is not longer than 8 bytes.
1005+
* Sample validator: checks that string is not longer than 8 bytes.
10061006
*/
10071007
static void
10081008
validate_my_string_relopt(const char *value)
@@ -1090,8 +1090,8 @@ my_compress(PG_FUNCTION_ARGS)
10901090

10911091
<para>
10921092
Since the representation of the key in <acronym>GiST</acronym> is
1093-
flexible, it may depends on user-specified parameters. For instace,
1094-
the length of key signature may be such parameter. See
1093+
flexible, it may depend on user-specified parameters. For instance,
1094+
the length of key signature may be specified. See
10951095
<literal>gtsvector_options()</literal> for example.
10961096
</para>
10971097
</listitem>

doc/src/sgml/spgist.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@
290290
values for the support method, while the second argument is a pointer to a
291291
C struct where output values must be placed. Four of the mandatory methods just
292292
return <type>void</type>, since all their results appear in the output struct; but
293-
<function>leaf_consistent</function> additionally returns a <type>boolean</type> result.
293+
<function>leaf_consistent</function> returns a <type>boolean</type> result.
294294
The methods must not modify any fields of their input structs. In all
295295
cases, the output struct is initialized to zeroes before calling the
296296
user-defined method. The optional sixth method <function>compress</function>
297-
accepts datum to be indexed as the only argument and returns a value suitable
297+
accepts a <type>datum</type> to be indexed as the only argument and returns a value suitable
298298
for physical storage in a leaf tuple. The optional seventh method
299-
<function>options</function> accepts internal pointer to a C struct, where
299+
<function>options</function> accepts an <type>internal</type> pointer to a C struct, where
300300
opclass-specific parameters should be placed, and returns <type>void</type>.
301301
</para>
302302

@@ -897,16 +897,16 @@ LANGUAGE C STRICT;
897897
</para>
898898

899899
<para>
900-
The function has given pointer to <replaceable>local_relopts</replaceable>
900+
The function is passed a pointer to a <replaceable>local_relopts</replaceable>
901901
struct, which needs to be filled with a set of operator class
902902
specific options. The options can be accessed from other support
903-
functions using <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
903+
functions using the <literal>PG_HAS_OPCLASS_OPTIONS()</literal> and
904904
<literal>PG_GET_OPCLASS_OPTIONS()</literal> macros.
905905
</para>
906906

907907
<para>
908908
Since the representation of the key in <acronym>SP-GiST</acronym> is
909-
flexible, it may depends on user-specified parameters.
909+
flexible, it may depend on user-specified parameters.
910910
</para>
911911
</listitem>
912912
</varlistentry>

doc/src/sgml/xindex.sgml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,9 @@
410410
</para>
411411

412412
<para>
413-
Additionally, some opclasses allow user to set specific parameters, which
414-
controls its behavior. Each builtin index access method have optional
415-
<function>options</function> support function, which defines set of
413+
Additionally, some opclasses allow users to specify parameters which
414+
control their behavior. Each builtin index access method has an optional
415+
<function>options</function> support function, which defines a set of
416416
opclass-specific parameters.
417417
</para>
418418

@@ -459,7 +459,7 @@
459459
</row>
460460
<row>
461461
<entry>
462-
Defines set of options that are specific for this operator class
462+
Defines a set of options that are specific to this operator class
463463
(optional)
464464
</entry>
465465
<entry>5</entry>
@@ -501,7 +501,7 @@
501501
</row>
502502
<row>
503503
<entry>
504-
Defines set of options that are specific for this operator class
504+
Defines a set of options that are specific to this operator class
505505
(optional)
506506
</entry>
507507
<entry>3</entry>
@@ -584,7 +584,7 @@
584584
<row>
585585
<entry><function>options</function></entry>
586586
<entry>
587-
Defines set of options that are specific for this operator class
587+
Defines a set of options that are specific to this operator class
588588
(optional)
589589
</entry>
590590
<entry>10</entry>
@@ -643,7 +643,7 @@
643643
<row>
644644
<entry><function>options</function></entry>
645645
<entry>
646-
Defines set of options that are specific for this operator class
646+
Defines a set of options that are specific to this operator class
647647
(optional)
648648
</entry>
649649
<entry>6</entry>
@@ -720,7 +720,7 @@
720720
<row>
721721
<entry><function>options</function></entry>
722722
<entry>
723-
Defines set of options that are specific for this operator class
723+
Defines a set of options that are specific to this operator class
724724
(optional)
725725
</entry>
726726
<entry>7</entry>
@@ -778,7 +778,7 @@
778778
<row>
779779
<entry><function>options</function></entry>
780780
<entry>
781-
Defines set of options that are specific for this operator class
781+
Defines a set of options that are specific to this operator class
782782
(optional)
783783
</entry>
784784
<entry>5</entry>

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