Language fixes for docs related to opclass options
authorAlexander Korotkov
Sun, 21 Jun 2020 01:48:03 +0000 (04:48 +0300)
committerAlexander Korotkov
Sun, 21 Jun 2020 01:51:32 +0000 (04:51 +0300)
Discussion: https://postgr.es/m/20200620232145.GB17995%40telsasoft.com
Author: Justin Pryzby
Backpatch-through: 13

doc/src/sgml/brin.sgml
doc/src/sgml/btree.sgml
doc/src/sgml/gin.sgml
doc/src/sgml/gist.sgml
doc/src/sgml/spgist.sgml
doc/src/sgml/xindex.sgml

index d7f1af7819a49a77aa1221b452654f993cd90f63..4c5eeb875f4b42713df834c4d0f736ff15cc2841 100644 (file)
@@ -562,7 +562,7 @@ typedef struct BrinOpcInfo
    
   
 
-  Optionally, an operator class for BRIN can supply the
+  An operator class for BRIN can optionally specify the
   following method:
 
   
@@ -570,22 +570,22 @@ typedef struct BrinOpcInfo
      void options(local_relopts *relopts)
      
       
-       Defines set of user-visible parameters that control operator class
+       Defines set of user-visible parameters that control operator class
        behavior.
       
 
       
-       The options function has given pointer to
+       The options function is passed a pointer to a
        local_relopts struct, which needs to be
        filled with a set of operator class specific options.  The options
-       can be accessed from other support functions using
+       can be accessed from other support functions using the
        PG_HAS_OPCLASS_OPTIONS() and
        PG_GET_OPCLASS_OPTIONS() macros.
       
 
       
-       Since both key extraction for indexed value and representation of the
-       key in GIN are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in GIN are flexible, they may depend on
        user-specified parameters.
       
      
index 4f1438d522df426f5ca59b92e12b354563dfd049..d03ee4d6fa0d1a41bc26368a12035833c3db73cc 100644 (file)
@@ -557,7 +557,7 @@ equalimage(opcintype oid) returns bool
      Optionally, a B-tree operator family may provide
      options (operator class specific
      options) support functions, registered under support
-     function number 5.  These functions define set of user-visible
+     function number 5.  These functions define set of user-visible
      parameters that control operator class behavior.
     
     
@@ -566,19 +566,19 @@ equalimage(opcintype oid) returns bool
 
 options(relopts local_relopts *) returns void
 
-     The function has given pointer to local_relopts
+     The function is passed a pointer to a local_relopts
      struct, which needs to be filled with a set of operator class
      specific options.  The options can be accessed from other support
-     functions using PG_HAS_OPCLASS_OPTIONS() and
+     functions using the PG_HAS_OPCLASS_OPTIONS() and
      PG_GET_OPCLASS_OPTIONS() macros.
     
     
-     Currently, no B-Tree operator class has options
+     Currently, no B-Tree operator class has an options
      support function.  B-tree doesn't allow flexible representation of keys
      like GiST, SP-GiST, GIN and BRIN do.  So, options
-     probably doesn't have much usage in current shape of B-tree index
+     probably doesn't have much application in the current B-tree index
      access method.  Nevertheless, this support function was added to B-tree
-     for uniformity, and probably it will found its usage during further
+     for uniformity, and will probably find uses during further
      evolution of B-tree in PostgreSQL.
     
    
index d85e7c8796bc39b1d5a8ce909da5afacd8b007fc..7a8c18a4495c7bd6f374f78bbd7237e9d286c06e 100644 (file)
       
 
       
-       The options function has given pointer to
+       The options function is passed a pointer to a
        local_relopts struct, which needs to be
-       filled with s set of operator class specific options.  The options
-       can be accessed from other support functions using
+       filled with a set of operator class specific options.  The options
+       can be accessed from other support functions using the
        PG_HAS_OPCLASS_OPTIONS() and
        PG_GET_OPCLASS_OPTIONS() macros.
       
 
       
-       Since both key extraction for indexed value and representation of the
-       key in GIN are flexible, it may depends on
+       Since both key extraction of indexed values and representation of the
+       key in GIN are flexible, they may depend on
        user-specified parameters.
       
      
index 31c28fdb61c7bb77624322989efaf4463d9ef45e..5d970ee9f2f453f042a2d2944d19ebf14bfa813a 100644 (file)
@@ -946,7 +946,7 @@ my_fetch(PG_FUNCTION_ARGS)
      options
      
       
-       Allows defintion of user-visible parameters that control operator
+       Allows definition of user-visible parameters that control operator
        class behavior.
       
 
@@ -962,16 +962,16 @@ LANGUAGE C STRICT;
       
 
       
-       The function has given pointer to local_relopts
+       The function is passed a pointer to a local_relopts
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using PG_HAS_OPCLASS_OPTIONS() and
+       functions using the PG_HAS_OPCLASS_OPTIONS() and
        PG_GET_OPCLASS_OPTIONS() macros.
       
 
        
-        The sample implementation of my_option() and parameters usage
-        in the another support function are given below:
+        An example implementation of my_options() and parameters use
+        from other support functions are given below:
 
 
 typedef enum MyEnumType
@@ -990,7 +990,7 @@ typedef struct
     int     str_param;  /* string parameter */
 } MyOptionsStruct;
 
-/* String representations for enum values */
+/* String representation of enum values */
 static relopt_enum_elt_def myEnumValues[] =
 {
     {"on", MY_ENUM_ON},
@@ -1002,7 +1002,7 @@ static relopt_enum_elt_def myEnumValues[] =
 static char *str_param_default = "default";
 
 /*
- * Sample validatior: checks that string is not longer than 8 bytes.
+ * Sample validator: checks that string is not longer than 8 bytes.
  */
 static void 
 validate_my_string_relopt(const char *value)
@@ -1090,8 +1090,8 @@ my_compress(PG_FUNCTION_ARGS)
 
       
        Since the representation of the key in GiST is
-       flexible, it may depends on user-specified parameters.  For instace,
-       the length of key signature may be such parameter.  See
+       flexible, it may depend on user-specified parameters.  For instance,
+       the length of key signature may be specified.  See
        gtsvector_options() for example.
       
      
index ad8d348a43dee33e83081b9cae20dd0d8a0b1356..d9ecfe74ed11655d6605b3b8c2f37ca8d492b9bd 100644 (file)
   values for the support method, while the second argument is a pointer to a
   C struct where output values must be placed.  Four of the mandatory methods just
   return void, since all their results appear in the output struct; but
-  leaf_consistent additionally returns a boolean result.
+  leaf_consistent returns a boolean result.
   The methods must not modify any fields of their input structs.  In all
   cases, the output struct is initialized to zeroes before calling the
   user-defined method.  The optional sixth method compress
-  accepts datum to be indexed as the only argument and returns a value suitable
+  accepts datum to be indexed as the only argument and returns a value suitable
   for physical storage in a leaf tuple.  The optional seventh method
-  options accepts internal pointer to a C struct, where
+  options accepts an internal pointer to a C struct, where
   opclass-specific parameters should be placed, and returns void.
  
 
@@ -897,16 +897,16 @@ LANGUAGE C STRICT;
       
 
       
-       The function has given pointer to local_relopts
+       The function is passed a pointer to a local_relopts
        struct, which needs to be filled with a set of operator class
        specific options.  The options can be accessed from other support
-       functions using PG_HAS_OPCLASS_OPTIONS() and
+       functions using the PG_HAS_OPCLASS_OPTIONS() and
        PG_GET_OPCLASS_OPTIONS() macros.
       
 
       
        Since the representation of the key in SP-GiST is
-       flexible, it may depends on user-specified parameters.
+       flexible, it may depend on user-specified parameters.
       
      
     
index 0e4587a81b98dc372fde841b41693de5cae9b047..2cfd71b5b77a767b37d6428e930ef295e6ed3746 100644 (file)
   
 
   
-   Additionally, some opclasses allow user to set specific parameters, which
-   controls its behavior.  Each builtin index access method have optional
-   options support function, which defines set of
+   Additionally, some opclasses allow users to specify parameters which
+   control their behavior.  Each builtin index access method has an optional
+   options support function, which defines set of
    opclass-specific parameters.
   
 
       
       
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        5
       
       
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        3
       
        options
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        10
       
        options
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        6
       
        options
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        7
       
        options
        
-        Defines set of options that are specific for this operator class
+        Defines a set of options that are specific to this operator class
         (optional)
        
        5