Fix typos and grammar in comments and docs
authorMichael Paquier <michael@paquier.xyz>
Mon, 19 Apr 2021 02:32:30 +0000 (11:32 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 19 Apr 2021 02:32:30 +0000 (11:32 +0900)
Author: Justin Pryzby
Discussion: https://postgr.es/m/20210416070310.GG3315@telsasoft.com

26 files changed:
contrib/amcheck/verify_heapam.c
doc/src/sgml/brin.sgml
doc/src/sgml/ecpg.sgml
src/backend/access/brin/brin.c
src/backend/access/brin/brin_bloom.c
src/backend/access/brin/brin_minmax_multi.c
src/backend/access/gist/gistbuild.c
src/backend/access/index/genam.c
src/backend/access/nbtree/nbtpage.c
src/backend/catalog/pg_type.c
src/backend/commands/analyze.c
src/backend/executor/nodeIncrementalSort.c
src/backend/rewrite/rewriteSearchCycle.c
src/backend/statistics/dependencies.c
src/backend/statistics/extended_stats.c
src/backend/storage/ipc/procarray.c
src/backend/tsearch/spell.c
src/backend/utils/activity/backend_status.c
src/backend/utils/adt/multirangetypes.c
src/backend/utils/adt/selfuncs.c
src/bin/pg_rewind/pg_rewind.c
src/bin/pg_waldump/pg_waldump.c
src/common/hmac_openssl.c
src/common/pg_lzcompress.c
src/interfaces/ecpg/preproc/ecpg.c
src/port/bsearch_arg.c

index 9366f45d7461a01d2445669cd0d83b923d509f50..9f159eb3dbd8dd792965658f9fa7518016441942 100644 (file)
@@ -930,7 +930,7 @@ check_tuple_visibility(HeapCheckContext *ctx)
             * If xmin_status happens to be XID_IS_CURRENT_XID, then in theory
             * any such DDL changes ought to be visible to us, so perhaps
             * we could check anyway in that case. But, for now, let's be
-            * conservate and treat this like any other uncommitted insert.
+            * conservative and treat this like any other uncommitted insert.
             */
            return false;
        }
index d2f12bb605fbd4017b3fc9eeb6652b61380e8d24..ce7c2105755dbe8e7e17d71d0a60fb43c88a8db7 100644 (file)
@@ -730,7 +730,7 @@ LOG:  request for BRIN range summarization for index "brin_wi_idx" page 128 was
      for <xref linkend="sql-altertable"/>. When set to a positive value,
      each block range is assumed to contain this number of distinct non-null
      values. When set to a negative value, which must be greater than or
-     equal to -1, the number of distinct non-null is assumed linear with
+     equal to -1, the number of distinct non-null values is assumed to grow linearly with
      the maximum possible number of tuples in the block range (about 290
      rows per block). The default value is <literal>-0.1</literal>, and
      the minimum number of distinct non-null values is <literal>16</literal>.
@@ -833,7 +833,7 @@ typedef struct BrinOpcInfo
       Returns whether all the ScanKey entries are consistent with the given
       indexed values for a range.
       The attribute number to use is passed as part of the scan key.
-      Multiple scan keys for the same attribute may be passed at once, the
+      Multiple scan keys for the same attribute may be passed at once; the
       number of entries is determined by the <literal>nkeys</literal> parameter.
      </para>
     </listitem>
@@ -1214,7 +1214,7 @@ typedef struct BrinOpcInfo
 
  <para>
   The minmax-multi operator class is also intended for data types implementing
-  a totally ordered sets, and may be seen as a simple extension of the minmax
+  a totally ordered set, and may be seen as a simple extension of the minmax
   operator class. While minmax operator class summarizes values from each block
   range into a single contiguous interval, minmax-multi allows summarization
   into multiple smaller intervals to improve handling of outlier values.
index 56f5d9b5db1f91881977d9e869c2b006e9595e58..e67f3e0bf3fa6518617ebdec90c33eca325b3918 100644 (file)
@@ -354,15 +354,15 @@ current=testdb1 (should be testdb1)
   </para>
 
   <para>
-  The third option is to declare sql identifier linked to
+  The third option is to declare a SQL identifier linked to
   the connection, for example:
 <programlisting>
 EXEC SQL AT <replaceable>connection-name</replaceable> DECLARE <replaceable>statement-name</replaceable> STATEMENT;
 EXEC SQL PREPARE <replaceable>statement-name</replaceable> FROM :<replaceable>dyn-string</replaceable>;
 </programlisting>
-   Once you link a sql identifier to a connection, you execute a dynamic SQL
-   without AT clause. Note that this option behaves like preprocessor directives,
-   therefore the link is enabled only in the file.
+   Once you link a SQL identifier to a connection, you execute dynamic SQL
+   without an AT clause. Note that this option behaves like preprocessor
+   directives, therefore the link is enabled only in the file.
   </para>
   <para>
    Here is an example program using this option:
@@ -6911,15 +6911,15 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
     <title>Description</title>
 
     <para>
-     <command>DECLARE STATEMENT</command> declares SQL statement identifier.
+     <command>DECLARE STATEMENT</command> declares SQL statement identifier.
      SQL statement identifier can be associated with the connection.
-     When the identifier is used by dynamic SQL statements, these SQLs are executed
-     by using the associated connection.
-     The namespace of the declaration is the precompile unit, and multiple declarations to
-     the same SQL statement identifier is not allowed.
-
-     Note that if the precompiler run in the Informix compatibility mode and some SQL statement
-     is declared, "database" can not be used as a cursor name.
+     When the identifier is used by dynamic SQL statements, the statements
+     are executed using the associated connection.
+     The namespace of the declaration is the precompile unit, and multiple
+     declarations to the same SQL statement identifier are not allowed.
+     Note that if the precompiler runs in Informix compatibility mode and
+     some SQL statement is declared, "database" can not be used as a cursor
+     name.
     </para>
    </refsect1>
 
index c320e215082a45663fd6ee9e1a38dac87eed9cc8..c23ea44866a10488dbd22a61b819a31f596a2bc7 100644 (file)
@@ -596,7 +596,7 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
                     * and if we're violating them. In that case we can
                     * terminate early, without invoking the support function.
                     *
-                    * As there may be more keys, we can only detemine
+                    * As there may be more keys, we can only determine
                     * mismatch within this loop.
                     */
                    if (bdesc->bd_info[attno - 1]->oi_regular_nulls &&
@@ -636,7 +636,7 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
 
                    /*
                     * Collation from the first key (has to be the same for
-                    * all keys for the same attribue).
+                    * all keys for the same attribute).
                     */
                    collation = keys[attno - 1][0]->sk_collation;
 
index 2214fb4d0ccf9d43ada61e454e5c9ba073e73429..e83c2b82e15ac67ce05bcd8ec487e9fed868187f 100644 (file)
@@ -409,7 +409,7 @@ typedef struct BloomOpaque
 {
    /*
     * XXX At this point we only need a single proc (to compute the hash), but
-    * let's keep the array just like inclusion and minman opclasses, for
+    * let's keep the array just like inclusion and minmax opclasses, for
     * consistency. We may need additional procs in the future.
     */
    FmgrInfo    extra_procinfos[BLOOM_MAX_PROCNUMS];
index 4163abef3f03bf6abc08a0ac093dd231d9372cb0..5e4b234cc61d7c45e1d41ea5502200251c75398b 100644 (file)
@@ -248,7 +248,7 @@ typedef struct DistanceValue
 } DistanceValue;
 
 
-/* Cache for support and strategy procesures. */
+/* Cache for support and strategy procedures. */
 
 static FmgrInfo *minmax_multi_get_procinfo(BrinDesc *bdesc, uint16 attno,
                                           uint16 procnum);
@@ -1311,7 +1311,7 @@ compare_distances(const void *a, const void *b)
 }
 
 /*
- * Given an array of expanded ranges, compute distance of the gaps betwen
+ * Given an array of expanded ranges, compute distance of the gaps between
  * the ranges - for ncranges there are (ncranges-1) gaps.
  *
  * We simply call the "distance" function to compute the (max-min) for pairs
@@ -1623,7 +1623,7 @@ ensure_free_space_in_buffer(BrinDesc *bdesc, Oid colloid,
     *
     * We don't simply check against range->maxvalues again. The deduplication
     * might have freed very little space (e.g. just one value), forcing us to
-    * do depuplication very often. In that case it's better to do compaction
+    * do deduplication very often. In that case it's better to do compaction
     * and reduce more space.
     */
    if (2 * range->nranges + range->nvalues <= range->maxvalues * MINMAX_BUFFER_LOAD_FACTOR)
index 36edc576a8827badcf5691dffa18af5ca04b180c..f46a42197c9791dde81f9dfbb596b12efe5d3edf 100644 (file)
@@ -115,7 +115,7 @@ typedef struct
 
 /*
  * In sorted build, we use a stack of these structs, one for each level,
- * to hold an in-memory buffer of the righmost page at the level. When the
+ * to hold an in-memory buffer of the rightmost page at the level. When the
  * page fills up, it is written out and a new page is allocated.
  */
 typedef struct GistSortedBuildPageState
index 1c3e937c61534326df9dc7ef2ccb0ac0afd29f57..0aa26b448b792b2db0c03ddc174dc595f9371cdb 100644 (file)
@@ -633,7 +633,7 @@ systable_endscan(SysScanDesc sysscan)
  * Currently we do not support non-index-based scans here.  (In principle
  * we could do a heapscan and sort, but the uses are in places that
  * probably don't need to still work with corrupted catalog indexes.)
- * For the moment, therefore, these functions are merely the thinnest of
+ * For the moment, therefore, these functions are merely the thinest of
  * wrappers around index_beginscan/index_getnext_slot.  The main reason for
  * their existence is to centralize possible future support of lossy operators
  * in catalog scans.
index ef48679cc2eb03b093be3e22625262f55a742985..706e16ae949dab127ba79eef6b6918e05cd91dc0 100644 (file)
@@ -1398,7 +1398,7 @@ _bt_delitems_delete(Relation rel, Buffer buf, TransactionId latestRemovedXid,
  * _bt_delitems_delete.  These steps must take place before each function's
  * critical section begins.
  *
- * updatabable and nupdatable are inputs, though note that we will use
+ * updatable and nupdatable are inputs, though note that we will use
  * _bt_update_posting() to replace the original itup with a pointer to a final
  * version in palloc()'d memory.  Caller should free the tuples when its done.
  *
@@ -1504,7 +1504,7 @@ _bt_delitems_cmp(const void *a, const void *b)
  * some extra index tuples that were practically free for tableam to check in
  * passing (when they actually turn out to be safe to delete).  It probably
  * only makes sense for the tableam to go ahead with these extra checks when
- * it is block-orientated (otherwise the checks probably won't be practically
+ * it is block-oriented (otherwise the checks probably won't be practically
  * free, which we rely on).  The tableam interface requires the tableam side
  * to handle the problem, though, so this is okay (we as an index AM are free
  * to make the simplifying assumption that all tableams must be block-based).
index 64f6c7238f7c5eb910573e7cffbd06a4a309ad91..dc9d28a32c5723c04262783368d7c6402fbf54b5 100644 (file)
@@ -997,7 +997,7 @@ makeMultirangeTypeName(const char *rangeTypeName, Oid typeNamespace)
  * makeUniqueTypeName
  *     Generate a unique name for a prospective new type
  *
- * Given a typeName, return a new palloc'ed name by preprending underscores
+ * Given a typeName, return a new palloc'ed name by prepending underscores
  * until a non-conflicting name results.
  *
  * If tryOriginal, first try with zero underscores.
index cffcd543029de115439bee186519abd1c526d0b2..8aa329a2a03d6484892d4c499f4b25a050a049a3 100644 (file)
@@ -660,7 +660,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
    {
        /*
         * Partitioned tables don't have storage, so we don't set any fields in
-        * their pg_class entries except for relpages, which is necessary for
+        * their pg_class entries except for reltuples, which is necessary for
         * auto-analyze to work properly.
         */
        vac_update_relstats(onerel, -1, totalrows,
index 459c879f0bbc75c584f2d2b2107cb5e6209d01c8..18f246a8233c9c155b5350e4eb536823b9e2e788 100644 (file)
@@ -661,9 +661,9 @@ ExecIncrementalSort(PlanState *pstate)
            /*
             * We're in full sort mode accumulating a minimum number of tuples
             * and not checking for prefix key equality yet, so we can't
-            * assume the group pivot tuple will reamin the same -- unless
+            * assume the group pivot tuple will remain the same -- unless
             * we're using a minimum group size of 1, in which case the pivot
-            * is obviously still the pviot.
+            * is obviously still the pivot.
             */
            if (nTuples != minGroupSize)
                ExecClearTuple(node->group_pivot);
@@ -1162,7 +1162,7 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
    }
 
    /*
-    * If chgParam of subnode is not null, theni the plan will be re-scanned
+    * If chgParam of subnode is not null, then the plan will be re-scanned
     * by the first ExecProcNode.
     */
    if (outerPlan->chgParam == NULL)
index 1a7d66fa6f9912c72ea4b4a96a4d03138909fb49..2d0ac378a81e948377604f1aa1c2d2f5e3b002d7 100644 (file)
@@ -59,7 +59,7 @@
  * SQL standard actually does it in that more complicated way), but the
  * internal representation allows us to construct it this way.)
  *
- * With a search caluse
+ * With a search clause
  *
  * SEARCH DEPTH FIRST BY col1, col2 SET sqc
  *
index cf8a6d5f68bd5167aa1f9655702782318a874f91..ba7decb6a4ebdead71dadeaf9b1a71ad86dc22d9 100644 (file)
@@ -972,7 +972,7 @@ find_strongest_dependency(MVDependencies **dependencies, int ndependencies,
 /*
  * clauselist_apply_dependencies
  *     Apply the specified functional dependencies to a list of clauses and
- *     return the estimated selecvitity of the clauses that are compatible
+ *     return the estimated selectivity of the clauses that are compatible
  *     with any of the given dependencies.
  *
  * This will estimate all not-already-estimated clauses that are compatible
@@ -1450,7 +1450,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
        if (!bms_is_member(listidx, *estimatedclauses))
        {
            /*
-            * If it's a simple column refrence, just extract the attnum. If
+            * If it's a simple column reference, just extract the attnum. If
             * it's an expression, assign a negative attnum as if it was a
             * system attribute.
             */
index e54e8aa8e0f550975d37c899ae16eb7a25e11347..7e11cb9d5f5c094a1100d5cad764bf28bae75156 100644 (file)
@@ -358,7 +358,7 @@ statext_compute_stattarget(int stattarget, int nattrs, VacAttrStats **stats)
     */
    for (i = 0; i < nattrs; i++)
    {
-       /* keep the maximmum statistics target */
+       /* keep the maximum statistics target */
        if (stats[i]->attr->attstattarget > stattarget)
            stattarget = stats[i]->attr->attstattarget;
    }
index bf776286de013d0c3d8c971cb12f22c523fe5241..5ff8cab394eda2bda3fc576a91bfb6e65d718136 100644 (file)
@@ -2131,7 +2131,7 @@ GetSnapshotDataReuse(Snapshot snapshot)
  *         older than this are known not running any more.
  *
  * And try to advance the bounds of GlobalVis{Shared,Catalog,Data,Temp}Rels
- * for the benefit of theGlobalVisTest* family of functions.
+ * for the benefit of the GlobalVisTest* family of functions.
  *
  * Note: this function should probably not be called with an argument that's
  * not statically allocated (see xip allocation below).
index 68160bd5925cd92e70b3ac4e83cfecbff1d43baf..ebc89604ac2071e333400b01516aacddae413764 100644 (file)
@@ -2020,7 +2020,7 @@ NISortAffixes(IspellDict *Conf)
                         (const unsigned char *) Affix->repl,
                         (ptr - 1)->len))
            {
-               /* leave only unique and minimals suffixes */
+               /* leave only unique and minimal suffixes */
                ptr->affix = Affix->repl;
                ptr->len = Affix->replen;
                ptr->issuffix = issuffix;
index 6110113e56a6813040929ea038f3bee861707480..5c1b2c25ed23d6a362e7a32c18ad7f5ed3910b0d 100644 (file)
@@ -1032,10 +1032,10 @@ pgstat_get_my_queryid(void)
    if (!MyBEEntry)
        return 0;
 
-   /* There's no need for a look around pgstat_begin_read_activity /
+   /* There's no need for a lock around pgstat_begin_read_activity /
     * pgstat_end_read_activity here as it's only called from
     * pg_stat_get_activity which is already protected, or from the same
-    * backend which mean that there won't be concurrent write.
+    * backend which means that there won't be concurrent writes.
     */
    return MyBEEntry->st_queryid;
 }
index b3964ea27fdd5fcb4903ade033516c6cd0af700d..7ba6ff9860441410aa45423f22fe9b7d980a9278 100644 (file)
@@ -553,7 +553,7 @@ multirange_get_typcache(FunctionCallInfo fcinfo, Oid mltrngtypid)
 
 
 /*
- * Estimate size occupied by serialized multirage.
+ * Estimate size occupied by serialized multirange.
  */
 static Size
 multirange_size_estimate(TypeCacheEntry *rangetyp, int32 range_count,
index 0963e2701cb7cd061afc51e35b4ee0ca35a82fc7..3d4304cce7a3cd6fcee8e3cfe3e70580cb3bb8d9 100644 (file)
@@ -4039,7 +4039,7 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,
 
            /*
             * Process a simple Var expression, by matching it to keys
-            * directly. If there's a matchine expression, we'll try
+            * directly. If there's a matching expression, we'll try
             * matching it later.
             */
            if (IsA(varinfo->var, Var))
index 9df08ab2b08d9739c9be7aee4161ca50eb21aff0..38e5d237551870a43b5d3c76f8c1555490bedbc4 100644 (file)
@@ -605,7 +605,7 @@ perform_rewind(filemap_t *filemap, rewind_source *source,
     * and the target. But if the source is a standby server, it's possible
     * that the last common checkpoint is *after* the standby's restartpoint.
     * That implies that the source server has applied the checkpoint record,
-    * but hasn't perfomed a corresponding restartpoint yet. Make sure we
+    * but hasn't performed a corresponding restartpoint yet. Make sure we
     * start at the restartpoint's redo point in that case.
     *
     * Use the old version of the source's control file for this. The server
index d4d6bb25a9fbbfce23f93bfd1c0f384b2942207c..4ec273e6d28bcf32f3ab6e0f6c181a02d159a1ca 100644 (file)
@@ -323,7 +323,7 @@ WALDumpCloseSegment(XLogReaderState *state)
 }
 
 /*
- * pg_waldump's WAL page rader
+ * pg_waldump's WAL page reader
  *
  * timeline and startptr specifies the LSN, and reads up to endptr.
  */
index b5e3065d1a90cf8063013e966edab14e6694fcc2..5df06839e015f6a873b0d57cef8e52429ec8886a 100644 (file)
@@ -34,7 +34,7 @@
 
 /*
  * In backend, use an allocation in TopMemoryContext to count for resowner
- * cleanup handling if necesary.  For versions of OpenSSL where HMAC_CTX is
+ * cleanup handling if necessary.  For versions of OpenSSL where HMAC_CTX is
  * known, just use palloc().  In frontend, use malloc to be able to return
  * a failure status back to the caller.
  */
index fdd527f757aba11dd2eb26f45ade6853680a41a7..a30a2c2eb83a71725754d8dd680621a02e7557e9 100644 (file)
  *
  *         For each subsequent entry in the history list, the "good_match"
  *         is lowered by 10%. So the compressor will be more happy with
- *         short matches the farer it has to go back in the history.
+ *         short matches the further it has to go back in the history.
  *         Another "speed against ratio" preference characteristic of
  *         the algorithm.
  *
index ee2fa51588806e7776158291da9683b4904c106a..9d861b428b02c8da1dd5d4c1c79bab2b7c654f08 100644 (file)
@@ -375,7 +375,7 @@ main(int argc, char *const argv[])
                }
                cur = NULL;
 
-               /* remove old delared statements if any are still there */
+               /* remove old declared statements if any are still there */
                for (list = g_declared_list; list != NULL;)
                {
                    struct declared_list *this = list;
index 0f1eaeba83bbc02498fe229f391ce0232309873a..8849bdffd2524a66479548e10beb92d6dfaab88a 100644 (file)
@@ -43,7 +43,7 @@
  * is odd, moving left simply involves halving lim: e.g., when lim
  * is 5 we look at item 2, so we change lim to 2 so that we will
  * look at items 0 & 1.  If lim is even, the same applies.  If lim
- * is odd, moving right again involes halving lim, this time moving
+ * is odd, moving right again involves halving lim, this time moving
  * the base up one item past p: e.g., when lim is 5 we change base
  * to item 3 and make lim 2 so that we will look at items 3 and 4.
  * If lim is even, however, we have to shrink it by one before