Fix various typos and spelling mistakes in code comments
authorDavid Rowley <[email protected]>
Mon, 11 Apr 2022 08:49:41 +0000 (20:49 +1200)
committerDavid Rowley <[email protected]>
Mon, 11 Apr 2022 08:49:41 +0000 (20:49 +1200)
Author: Justin Pryzby
Discussion: https://postgr.es/m/20220411020336[email protected]

33 files changed:
contrib/ltree/ltree.h
src/backend/access/brin/brin_minmax_multi.c
src/backend/access/heap/heapam.c
src/backend/access/transam/xlogreader.c
src/backend/access/transam/xlogrecovery.c
src/backend/commands/dbcommands.c
src/backend/commands/vacuumparallel.c
src/backend/executor/nodeMergeAppend.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/pathkeys.c
src/backend/parser/parse_expr.c
src/backend/replication/basebackup_server.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/slot.c
src/backend/storage/ipc/procarray.c
src/backend/tsearch/ts_parse.c
src/backend/utils/adt/genfile.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/tsquery.c
src/backend/utils/cache/relmapper.c
src/backend/utils/error/csvlog.c
src/backend/utils/error/elog.c
src/backend/utils/error/jsonlog.c
src/backend/utils/fmgr/funcapi.c
src/backend/utils/mmgr/generation.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pgbench/pgbench.c
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/tab-complete.c
src/include/utils/sortsupport.h
src/tools/mark_pgdllimport.pl

index 10341d60212f6fad73438df07caaacb676e5e01a..564e4fa81b87bb0fb6f69ec6fa29070c9ba8beba 100644 (file)
@@ -24,7 +24,7 @@
  * modified to look for -D compile flags in Makefiles, so here, in order to
  * get the historic behavior of LOWER_NODE not being defined on MSVC, we only
  * define it when not building in that environment.  This is important as we
- * want to maintain the same LOWER_NODE behavior after a pg_update.
+ * want to maintain the same LOWER_NODE behavior after a pg_upgrade.
  */
 #ifndef _MSC_VER
 #define LOWER_NODE
index 82333752f1f2c865fd07752904a7796826a8326c..10d4f17bc6ff37e7c796b9366045804f3ab7ea34 100644 (file)
@@ -310,7 +310,7 @@ AssertCheckRanges(Ranges *ranges, FmgrInfo *cmpFn, Oid colloid)
         */
        AssertArrayOrder(cmpFn, colloid, ranges->values, 2 * ranges->nranges);
 
-       /* then the single-point ranges (with nvalues boundar values ) */
+       /* then the single-point ranges (with nvalues boundary values ) */
        AssertArrayOrder(cmpFn, colloid, &ranges->values[2 * ranges->nranges],
                                         ranges->nsorted);
 
index 1ee985f6330865626a151e336c50772130c4c331..a03122df8d60c816533e10b3fb56e9aa7234a012 100644 (file)
@@ -1470,7 +1470,7 @@ heap_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction,
                 * heap_set_tidrange will have used heap_setscanlimits to limit the
                 * range of pages we scan to only ones that can contain the TID range
                 * we're scanning for.  Here we must filter out any tuples from these
-                * pages that are outwith that range.
+                * pages that are outside of that range.
                 */
                if (ItemPointerCompare(&scan->rs_ctup.t_self, mintid) < 0)
                {
index a5f1a648d3db238f60f5ebdd08d5a736c45efbcd..b3e37003ac5ea4a77f6dd84292d9e2aa8270f2c4 100644 (file)
@@ -300,7 +300,7 @@ XLogReleasePreviousRecord(XLogReaderState *state)
        /* Release the space. */
        if (unlikely(record->oversized))
        {
-               /* It's not in the the decode buffer, so free it to release space. */
+               /* It's not in the decode buffer, so free it to release space. */
                pfree(record);
        }
        else
index 2e555f8573d3063bc1e83c9714f2bb44735bac5d..4ee29182ac864e9aa260e5591bd048d4ada3021a 100644 (file)
@@ -2975,7 +2975,7 @@ ReadRecord(XLogPrefetcher *xlogprefetcher, int emode,
                        /*
                         * When not in standby mode we find that WAL ends in an incomplete
                         * record, keep track of that record.  After recovery is done,
-                        * we'll write a record to indicate downstream WAL readers that
+                        * we'll write a record to indicate to downstream WAL readers that
                         * that portion is to be ignored.
                         */
                        if (!StandbyMode &&
index ce776c53cadb1a109993e589991cb4e310341060..1bbecfeddf6d904c12f3be1ec35fad043aa04dcd 100644 (file)
@@ -386,7 +386,7 @@ ScanSourceDatabasePgClassPage(Page page, Buffer buf, Oid tbid, Oid dbid,
  * needs to be copied from the source database to the destination database,
  * and if so, construct a CreateDBRelInfo for it.
  *
- * Visbility checks are handled by the caller, so our job here is just
+ * Visibility checks are handled by the caller, so our job here is just
  * to assess the data stored in the tuple.
  */
 CreateDBRelInfo *
index 6b4f742578e059ce05f2da54d8ba4d2c454f8c0c..bbf3b69c57ea926a6b05c4661b66bb25d8636158 100644 (file)
@@ -12,7 +12,7 @@
  * the memory space for storing dead items allocated in the DSM segment.  We
  * launch parallel worker processes at the start of parallel index
  * bulk-deletion and index cleanup and once all indexes are processed, the
- * parallel worker processes exit.  Each time we process indexes parallelly,
+ * parallel worker processes exit.  Each time we process indexes in parallel,
  * the parallel context is re-initialized so that the same DSM can be used for
  * multiple passes of index bulk-deletion and index cleanup.
  *
index ecf9052e038ddadab6885b41d9c82bdbf90549f1..c5c62fa5c7826c22f9c741a0ad1664b4befdc296 100644 (file)
@@ -100,7 +100,7 @@ ExecInitMergeAppend(MergeAppend *node, EState *estate, int eflags)
 
                /*
                 * When no run-time pruning is required and there's at least one
-                * subplan, we can fill as_valid_subplans immediately, preventing
+                * subplan, we can fill ms_valid_subplans immediately, preventing
                 * later calls to ExecFindMatchingSubPlans.
                 */
                if (!prunestate->do_exec_prune && nplans > 0)
index ec3c23013a33f623e8e2b23cf63cf5e87f4721ad..b787c6f81a8e646aa6e00607a6c7118de9822651 100644 (file)
@@ -1976,8 +1976,8 @@ compute_cpu_sort_cost(PlannerInfo *root, List *pathkeys, int nPresortedKeys,
                 * by calling estimate_num_groups_incremental(), which estimates the
                 * group size for "new" pathkeys.
                 *
-                * Note: estimate_num_groups_incremntal does not handle fake Vars, so use
-                * a default estimate otherwise.
+                * Note: estimate_num_groups_incremental does not handle fake Vars, so
+                * use a default estimate otherwise.
                 */
                if (!has_fake_var)
                        nGroups = estimate_num_groups_incremental(root, pathkeyExprs,
@@ -6471,7 +6471,7 @@ compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel, Path *bitmapqual,
                exact_pages = heap_pages - lossy_pages;
 
                /*
-                * If there are lossy pages then recompute the  number of tuples
+                * If there are lossy pages then recompute the number of tuples
                 * processed by the bitmap heap node.  We assume here that the chance
                 * of a given tuple coming from an exact page is the same as the
                 * chance that a given page is exact.  This might not be true, but
index 75fe03fd04b6b8f2ae0340d873a67f20cefad947..91556910aec208bb6d688a2177a559813cfa41ca 100644 (file)
@@ -2383,16 +2383,16 @@ pathkeys_useful_for_ordering(PlannerInfo *root, List *pathkeys)
  *             Count the number of pathkeys that are useful for grouping (instead of
  *             explicit sort)
  *
- * Group pathkeys could be reordered to benefit from the odering. The ordering
- * may not be "complete" and may require incremental sort, but that's fine. So
- * we simply count prefix pathkeys with a matching group key, and stop once we
- * find the first pathkey without a match.
+ * Group pathkeys could be reordered to benefit from the ordering. The
+ * ordering may not be "complete" and may require incremental sort, but that's
+ * fine. So we simply count prefix pathkeys with a matching group key, and
+ * stop once we find the first pathkey without a match.
  *
  * So e.g. with pathkeys (a,b,c) and group keys (a,b,e) this determines (a,b)
  * pathkeys are useful for grouping, and we might do incremental sort to get
  * path ordered by (a,b,e).
  *
- * This logic is necessary to retain paths with ordeding not matching grouping
+ * This logic is necessary to retain paths with ordering not matching grouping
  * keys directly, without the reordering.
  *
  * Returns the length of pathkey prefix with matching group keys.
index b6a2482f23a66c32355459fed2bad6bb461adede..3cbd5161528e92794c70a7ce452c5c8154138b2c 100644 (file)
@@ -3507,7 +3507,7 @@ transformJsonOutput(ParseState *pstate, const JsonOutput *output,
 }
 
 /*
- * Transform JSON output clause of JSON contructor functions.
+ * Transform JSON output clause of JSON constructor functions.
  *
  * Derive RETURNING type, if not specified, from argument types.
  */
index bc16897b33ff60e9a5c13bcb88f0094660c34940..f5d73301d8219dd419400cfd17c07ce27483f2fd 100644 (file)
@@ -195,9 +195,9 @@ bbsink_server_end_archive(bbsink *sink)
 
        /*
         * We intentionally don't use data_sync_elevel here, because the server
-        * shouldn't PANIC just because we can't guarantee the the backup has been
-        * written down to disk. Running recovery won't fix anything in this case
-        * anyway.
+        * shouldn't PANIC just because we can't guarantee that the backup has
+        * been written down to disk. Running recovery won't fix anything in this
+        * case anyway.
         */
        if (FileSync(mysink->file, WAIT_EVENT_BASEBACKUP_SYNC) < 0)
                ereport(ERROR,
index 5adc016d449f81fd3d4f748d8719e25c6d73e8f7..6887dc23f616f02309e8634dff651d1f01fad330 100644 (file)
@@ -1876,7 +1876,7 @@ ReorderBufferStreamCommit(ReorderBuffer *rb, ReorderBufferTXN *txn)
  * xid 502 which is not visible to our snapshot.  And when we will try to
  * decode with that catalog tuple, it can lead to a wrong result or a crash.
  * So, it is necessary to detect concurrent aborts to allow streaming of
- * in-progress transactions or decoding of prepared  transactions.
+ * in-progress transactions or decoding of prepared transactions.
  *
  * For detecting the concurrent abort we set CheckXidAlive to the current
  * (sub)transaction's xid for which this change belongs to.  And, during
index c35ea7c35bfd2ec4573546a1952c4ef296f9221b..5c778f5333b0d3b169c5ba49078c13c2bf082202 100644 (file)
@@ -247,7 +247,7 @@ ReplicationSlotValidateName(const char *name, int elevel)
  *     to be enabled only at the slot creation time. If we allow this option
  *     to be changed during decoding then it is quite possible that we skip
  *     prepare first time because this option was not enabled. Now next time
- *     during getting changes, if the two_phase  option is enabled it can skip
+ *     during getting changes, if the two_phase option is enabled it can skip
  *     prepare because by that time start decoding point has been moved. So the
  *     user will only get commit prepared.
  */
index 603f6aba71f9c3d2007e52d1570d5b0ee2044766..e184a3552c8e006663c3d3da58b4d3bb3f238360 100644 (file)
@@ -2338,7 +2338,7 @@ GetSnapshotData(Snapshot snapshot)
 
                        /*
                         * We don't include our own XIDs (if any) in the snapshot. It
-                        * needs to be includeded in the xmin computation, but we did so
+                        * needs to be included in the xmin computation, but we did so
                         * outside the loop.
                         */
                        if (pgxactoff == mypgxactoff)
index bf4247048dd4d5f01c530a2736bb3964ef528681..fe469881612bd54c7f2829c0ef4f8df9aee9f6f9 100644 (file)
@@ -248,7 +248,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
                dict = lookup_ts_dictionary_cache(ld->curDictId);
 
                /*
-                * Dictionary ld->curDictId asks  us about following words
+                * Dictionary ld->curDictId asks us about following words
                 */
 
                while (ld->curSub)
index 88f279d1b313b5b0f2dc838f4fc144d4b39abe3e..2bf52192567a37625fd613070d540e38c3750a69 100644 (file)
@@ -59,9 +59,9 @@ convert_and_check_filename(text *arg)
        canonicalize_path(filename);    /* filename can change length here */
 
        /*
-        * Roles with privleges of the 'pg_read_server_files' role are allowed to access
-        * any files on the server as the PG user, so no need to do any further checks
-        * here.
+        * Roles with privileges of the 'pg_read_server_files' role are allowed to
+        * access any files on the server as the PG user, so no need to do any
+        * further checks here.
         */
        if (has_privs_of_role(GetUserId(), ROLE_PG_READ_SERVER_FILES))
                return filename;
index 609aab2e6517004896c0e267d69b5ebd9988c800..b79705f8b3f16fe47a848e4813e254d249d1330c 100644 (file)
@@ -3878,7 +3878,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
                Point           p;
 
                /*
-                * if X-intersection wasn't found  then check central point of tested
+                * if X-intersection wasn't found, then check central point of tested
                 * segment. In opposite case we already check all subsegments
                 */
                p.x = float8_div(float8_pl(t.p[0].x, t.p[1].x), 2.0);
index 12603b727cd9f65fb6990a577a22bd3bae2326fc..2c47dea34290c12fb1dc4bd3b9a1920890c9c7d1 100644 (file)
@@ -991,7 +991,7 @@ search_locale_enum(LPWSTR pStr, DWORD dwFlags, LPARAM lparam)
                                                test_locale, LOCALE_NAME_MAX_LENGTH))
        {
                /*
-                * If the enumerated locale does not have a hyphen ("en") OR  the
+                * If the enumerated locale does not have a hyphen ("en") OR the
                 * lc_message input does not have an underscore ("English"), we only
                 * need to compare the <Language> tags.
                 */
index f0a95297b3e0ba8872661fe27e48f935b4dd0734..f54f2988149f5d0fd5dc184255ea52e75c259daf 100644 (file)
@@ -261,7 +261,7 @@ parse_or_operator(TSQueryParserState pstate)
                /*
                 * Suppose, we found an operand, but could be a not correct operand.
                 * So we still treat OR literal as operation with possibly incorrect
-                * operand and  will not search it as lexeme
+                * operand and will not search it as lexeme
                 */
                if (!t_isspace(ptr))
                        break;
index dee3387d0265dca4e50af4b49c8c828698c7650d..75a3aedc5af79e7d8f4d665a84cf07cbd468993c 100644 (file)
@@ -1044,7 +1044,7 @@ perform_relmap_update(bool shared, const RelMapFile *updates)
                                          (shared ? "global" : DatabasePath));
 
        /*
-        * We succesfully wrote the updated file, so it's now safe to rely on the
+        * We successfully wrote the updated file, so it's now safe to rely on the
         * new values in this process, too.
         */
        if (shared)
@@ -1093,7 +1093,7 @@ relmap_redo(XLogReaderState *record)
                 * an existing database as we do for creating a new database. In
                 * the latter case, taking the relmap log and sending sinval messages
                 * is unnecessary, but harmless. If we wanted to avoid it, we could
-                * add a flag to the WAL record to indicate which opration is being
+                * add a flag to the WAL record to indicate which operation is being
                 * performed.
                 */
                LWLockAcquire(RelationMappingLock, LW_EXCLUSIVE);
index 89f78b447d9d69ed18dc5ee55649f3eb75d70efd..5c49bc4209e9c9c00e1ab5c049225b49296d0474 100644 (file)
@@ -4,7 +4,7 @@
  *       CSV logging
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of Californi
+ * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
index bd4b2c19b1c37ed13d1078f3043f3d8a53eff4c7..72778b896a2dc5e13c31659b679ca4017bcd1b02 100644 (file)
@@ -2269,7 +2269,7 @@ write_console(const char *line, int len)
        /*
         * Conversion on non-win32 platforms is not implemented yet. It requires
         * non-throw version of pg_do_encoding_conversion(), that converts
-        * unconvertable characters to '?' without errors.
+        * unconvertible characters to '?' without errors.
         *
         * XXX: We have a no-throw version now. It doesn't convert to '?' though.
         */
index 843641c865fd3c234c8698b089ca2312561d8c42..f336c063e5848b5e72d380e50e1970dc25d5aa70 100644 (file)
@@ -4,7 +4,7 @@
  *       JSON logging
  *
  * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of Californi
+ * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
index d269662ad8e088bed54f4feac537b2e0ed496334..9197b0f1e266cb5c609d719784753993fc51c3cc 100644 (file)
@@ -69,7 +69,7 @@ static TypeFuncClass get_type_func_class(Oid typid, Oid *base_typeid);
  * descriptor coming from expectedDesc, which is the tuple descriptor
  * expected by the caller.  SRF_SINGLE_BLESS can be set to complete the
  * information associated to the tuple descriptor, which is necessary
- * in some cases  where the tuple descriptor comes from a transient
+ * in some cases where the tuple descriptor comes from a transient
  * RECORD datatype.
  */
 void
index 685688c155474299c0893ad14b53607de0332ace..56ed496386eb6dd66c7da64c378146af3a6ceb11 100644 (file)
@@ -27,7 +27,7 @@
  *     context's 'freeblock' field.  If the freeblock field is already occupied
  *     by another free block we simply return the newly empty block to malloc.
  *
- *     This approach to free blocks requires fewer malloc/free calls for truely
+ *     This approach to free blocks requires fewer malloc/free calls for truly
  *     first allocated, first free'd allocation patterns.
  *
  *-------------------------------------------------------------------------
index c1f2253af2ecb62a9f5ef1fed1cf00d2450aedbc..d96ae8730326a1688614c876bcf15f88b787b0d2 100644 (file)
@@ -1464,7 +1464,7 @@ ReceiveArchiveStreamChunk(size_t r, char *copybuf, void *callback_data)
                                GetCopyDataEnd(r, copybuf, cursor);
 
                                /*
-                                * The server shouldn't send progres report messages too
+                                * The server shouldn't send progress report messages too
                                 * often, so we force an update each time we receive one.
                                 */
                                progress_report(state->tablespacenum, true, false);
index 8197da8546d8e9d0ac19c0845223912eeb823131..e63cea56a1cc19a916ce10d908dd9397e33d1bd5 100644 (file)
@@ -3450,7 +3450,7 @@ discardUntilSync(CState *st)
                PQclear(res);
        }
 
-       /* exit pipline */
+       /* exit pipeline */
        if (PQexitPipelineMode(st->con) != 1)
        {
                pg_log_error("client %d aborted: failed to exit pipeline mode for rolling back the failed transaction",
@@ -7261,7 +7261,7 @@ main(int argc, char **argv)
 
        /*
         * All connections should be already closed in threadRun(), so this
-        * disconnect_all() will be a no-op, but clean up the connecions just to
+        * disconnect_all() will be a no-op, but clean up the connections just to
         * be sure. We don't need to measure the disconnection delays here.
         */
        disconnect_all(state, nclients);
index a5ceaec3ac757fc462164bd1f8f2c1ea127234d9..424a429e1e2b490d8d473a07ff68b0881923a208 100644 (file)
@@ -653,7 +653,8 @@ handleCopyIn(PGconn *conn, FILE *copystream, bool isbinary, PGresult **res)
                         *
                         * Make sure there's always space for four more bytes in the
                         * buffer, plus a NUL terminator.  That way, an EOF marker is
-                        * never split across two fgets() calls, which simplies the logic.
+                        * never split across two fgets() calls, which simplifies the
+                        * logic.
                         */
                        if (buflen >= COPYBUFSIZ - 5 || (copydone && buflen > 0))
                        {
index e8919ab0be2da872cb2d07ac82c6e0a4a07e176d..d04ba2b0290f617a76fa94777401445ed8d7ea20 100644 (file)
@@ -3080,7 +3080,7 @@ describeOneTableDetails(const char *schemaname,
                 * servers between v11 and v14, though these must still be shown to
                 * the user.  So we use another property that is true for such
                 * inherited triggers to avoid them being hidden, which is their
-                * dependendence on another trigger.
+                * dependence on another trigger.
                 */
                if (pset.sversion >= 110000 && pset.sversion < 150000)
                        appendPQExpBufferStr(&buf, "(NOT t.tgisinternal OR (t.tgisinternal AND t.tgenabled = 'D') \n"
index 8f163fb7bac3aad2501990c8ab71a8ac65dec32f..10e8dbc9b1feadb1b6f082e05bd626cd8101e605 100644 (file)
@@ -2257,7 +2257,7 @@ psql_completion(const char *text, int start, int end)
                COMPLETE_WITH("COLUMN", "CONSTRAINT", "CHECK", "UNIQUE", "PRIMARY KEY",
                                          "EXCLUDE", "FOREIGN KEY");
        }
-       /* ATER TABLE xxx ADD [COLUMN] yyy */
+       /* ALTER TABLE xxx ADD [COLUMN] yyy */
        else if (Matches("ALTER", "TABLE", MatchAny, "ADD", "COLUMN", MatchAny) ||
                         (Matches("ALTER", "TABLE", MatchAny, "ADD", MatchAny) &&
                          !Matches("ALTER", "TABLE", MatchAny, "ADD", "COLUMN|CONSTRAINT|CHECK|UNIQUE|PRIMARY|EXCLUDE|FOREIGN")))
index 60e5f9940d482c785a974e1e09e72dae299782fa..4f7c73f0aacf740abde715fd27991184f87172bb 100644 (file)
@@ -24,7 +24,7 @@
  * function will have a shim set up by sort support automatically.  However,
  * opclasses that support the optional additional abbreviated key capability
  * must always provide an authoritative comparator used to tie-break
- * inconclusive abbreviated comparisons and also used  when aborting
+ * inconclusive abbreviated comparisons and also used when aborting
  * abbreviation.  Furthermore, a converter and abort/costing function must be
  * provided.
  *
index a09ec5a369e9db13f5c3a78ffcc109a5a2ccd061..83b90db6ef990df46fcd9466aead156cda04520a 100755 (executable)
@@ -6,7 +6,7 @@
 #      Perl script that tries to add PGDLLIMPORT markings to PostgreSQL
 #      header files.
 #
-# This relies on a few idiosyncracies of the PostgreSQL cding style,
+# This relies on a few idiosyncracies of the PostgreSQL coding style,
 # such as the fact that we always use "extern" in function
 # declarations, and that we don't use // comments. It's not very
 # smart and may not catch all cases.