Fix misc typos, mostly in comments.
authorHeikki Linnakangas
Mon, 9 Jul 2018 13:10:44 +0000 (16:10 +0300)
committerHeikki Linnakangas
Wed, 18 Jul 2018 13:20:18 +0000 (16:20 +0300)
A collection of typos I happened to spot while reading code, as well as
grepping for common mistakes.

Backpatch to all supported versions, as applicable, to avoid conflicts
when backporting other commits in the future.

13 files changed:
contrib/bloom/blscan.c
src/backend/access/transam/multixact.c
src/backend/commands/cluster.c
src/backend/executor/nodeModifyTable.c
src/backend/replication/logical/origin.c
src/bin/initdb/t/001_initdb.pl
src/bin/pg_upgrade/tablespace.c
src/interfaces/ecpg/ecpglib/execute.c
src/pl/tcl/pltcl.c
src/test/regress/expected/rowsecurity.out
src/test/regress/expected/rules.out
src/test/regress/sql/rowsecurity.sql
src/test/regress/sql/rules.sql

index 316a906734bfdf9d33b12d7c81fa9e27f0a2a354..11b7505e58fdb3746b032fd1cc9b2602281c5014 100644 (file)
@@ -76,7 +76,7 @@ blendscan(IndexScanDesc scan)
 }
 
 /*
- * Insert all matching tuples into to a bitmap.
+ * Insert all matching tuples into a bitmap.
  */
 int64
 blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
index e9588a7f69d6a2994eac699ca4f1f8c4e9a852b7..6c9cc1c538885259ee724afad02adb054a1d9a32 100644 (file)
@@ -2551,7 +2551,7 @@ SetOffsetVacuumLimit(void)
 
    /*
     * NB: Have to prevent concurrent truncation, we might otherwise try to
-    * lookup a oldestMulti that's concurrently getting truncated away.
+    * lookup an oldestMulti that's concurrently getting truncated away.
     */
    LWLockAcquire(MultiXactTruncationLock, LW_SHARED);
 
@@ -2727,7 +2727,7 @@ find_multixact_start(MultiXactId multi, MultiXactOffset *result)
    /*
     * Flush out dirty data, so PhysicalPageExists can work correctly.
     * SimpleLruFlush() is a pretty big hammer for that.  Alternatively we
-    * could add a in-memory version of page exists, but find_multixact_start
+    * could add an in-memory version of page exists, but find_multixact_start
     * is called infrequently, and it doesn't seem bad to flush buffers to
     * disk before truncation.
     */
index 4053b5105d385ef8411f3e3e65ac70aa64c42e01..865990b1a53b2448cebca5dbe8bfe5d01ab929cb 100644 (file)
@@ -1542,7 +1542,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
     * swap_relation_files()), thus relfrozenxid was not updated. That's
     * annoying because a potential reason for doing a VACUUM FULL is a
     * imminent or actual anti-wraparound shutdown.  So, now that we can
-    * access the new relation using it's indices, update relfrozenxid.
+    * access the new relation using its indices, update relfrozenxid.
     * pg_class doesn't have a toast relation, so we don't need to update the
     * corresponding toast relation. Not that there's little point moving all
     * relfrozenxid updates here since swap_relation_files() needs to write to
index 71ef9adf3bec0be1d640aecc3f6bb9973eef0120..c6193473481122f54eefd631d9a192470edc8d35 100644 (file)
@@ -1067,7 +1067,7 @@ lreplace:;
  * (but still lock row, even though it may not satisfy estate's
  * snapshot).
  *
- * Returns true if if we're done (with or without an update), or false if
+ * Returns true if we're done (with or without an update), or false if
  * the caller must retry the INSERT from scratch.
  */
 static bool
index c281734fd591259202997cd82c0d9da324e91922..d6bae6cc89768bb740ee1cce38456b005c32fd8f 100644 (file)
@@ -1404,7 +1404,7 @@ pg_show_replication_origin_status(PG_FUNCTION_ARGS)
    int         i;
 #define REPLICATION_ORIGIN_PROGRESS_COLS 4
 
-   /* we we want to return 0 rows if slot is set to zero */
+   /* we want to return 0 rows if slot is set to zero */
    replorigin_check_prerequisites(false, true);
 
    if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))
index 372865d3f7aea9db135f6d53b61a9e2d765b33ac..f1c14045c8e23a306ab1d1f2cd175e2860e20da5 100644 (file)
@@ -1,4 +1,4 @@
-# To test successful data directory creation with a additional feature, first
+# To test successful data directory creation with an additional feature, first
 # try to elaborate the "successful creation" test instead of adding a test.
 # Successful initdb consumes much time and I/O.
 
index 8e09ec37293b1f906e62b31f8a2eb480f7e9f1a1..68046a101b6591950aa0fe26f84ae027998ef41b 100644 (file)
@@ -36,7 +36,7 @@ init_tablespaces(void)
  * get_tablespace_paths()
  *
  * Scans pg_tablespace and returns a malloc'ed array of all tablespace
- * paths. Its the caller's responsibility to free the array.
+ * paths. It's the caller's responsibility to free the array.
  */
 static void
 get_tablespace_paths(void)
index f74ed5e8002f0caa4881eb459fae6072fb87cce8..5b09233810d6ebffeac01079fe7336db6baf064e 100644 (file)
@@ -1310,8 +1310,8 @@ ecpg_build_params(struct statement * stmt)
        if ((position = next_insert(stmt->command, position, stmt->questionmarks, std_strings) + 1) == 0)
        {
            /*
-            * We have an argument but we dont have the matched up placeholder
-            * in the string
+            * We have an argument but we don't have the matched up
+            * placeholder in the string
             */
            ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS,
                       ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS,
index 34e62c3d998be6d5d7659100b3c732a68aca3d5f..114b9ceed99b6d91994ac89aeaaa2200ebe9aeed 100644 (file)
@@ -2523,7 +2523,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
    }
 
    /************************************************************
-    * If there was a argtype list on preparation, we need
+    * If there was an argtype list on preparation, we need
     * an argument value list now
     ************************************************************/
    if (qdesc->nargs > 0)
index 1287fceb79f8c1ad984a24e9333b91003031ed44..ffee995cff7e72f851f096501e6b8e25d76e1ef0 100644 (file)
@@ -1614,7 +1614,7 @@ SET SESSION AUTHORIZATION regress_rls_bob;
 INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert')
     ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *;
 ERROR:  new row violates row-level security policy for table "document"
--- UPDATE path is taken here.  Existing tuple passes, since it's cid
+-- UPDATE path is taken here.  Existing tuple passes, since its cid
 -- corresponds to "novel", but default USING qual is enforced against
 -- post-UPDATE tuple too (as always when updating with a policy that lacks an
 -- explicit WCO), and so this fails:
index 3f9592f2b5eadc4e22bf24b304a89d5931b2dd85..7d6f0beb49c44f58e7d06d675fc4f1a1d19409c6 100644 (file)
@@ -2726,7 +2726,7 @@ Rules:
  NOTIFY rules_src_deletion
 
 --
--- Ensure a aliased target relation for insert is correctly deparsed.
+-- Ensure an aliased target relation for insert is correctly deparsed.
 --
 create rule r4 as on insert to rules_src do instead insert into rules_log AS trgt SELECT NEW.* RETURNING trgt.f1, trgt.f2;
 create rule r5 as on update to rules_src do instead UPDATE rules_log AS trgt SET tag = 'updated' WHERE trgt.f1 = new.f1;
index dbfb4d752467d457a791fd833e380693280a64ea..8420f0b43887edc6c8f35d892a3dffd8a36a8858 100644 (file)
@@ -593,7 +593,7 @@ SET SESSION AUTHORIZATION regress_rls_bob;
 INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert')
     ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *;
 
--- UPDATE path is taken here.  Existing tuple passes, since it's cid
+-- UPDATE path is taken here.  Existing tuple passes, since its cid
 -- corresponds to "novel", but default USING qual is enforced against
 -- post-UPDATE tuple too (as always when updating with a policy that lacks an
 -- explicit WCO), and so this fails:
index 14b2276bf156592baaaf89e87c4b49c40a241ada..405d83f2433b7d12b3c477cdde497125be8dc6cd 100644 (file)
@@ -997,7 +997,7 @@ create rule r3 as on delete to rules_src do notify rules_src_deletion;
 \d+ rules_src
 
 --
--- Ensure a aliased target relation for insert is correctly deparsed.
+-- Ensure an aliased target relation for insert is correctly deparsed.
 --
 create rule r4 as on insert to rules_src do instead insert into rules_log AS trgt SELECT NEW.* RETURNING trgt.f1, trgt.f2;
 create rule r5 as on update to rules_src do instead UPDATE rules_log AS trgt SET tag = 'updated' WHERE trgt.f1 = new.f1;