Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix misc typos, mostly in comments.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 9 Jul 2018 13:10:44 +0000 (16:10 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 18 Jul 2018 13:18:27 +0000 (16:18 +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.

18 files changed:
contrib/bloom/blscan.c
doc/src/sgml/protocol.sgml
doc/src/sgml/spi.sgml
src/backend/access/transam/multixact.c
src/backend/commands/cluster.c
src/backend/executor/nodeModifyTable.c
src/backend/replication/logical/origin.c
src/backend/utils/time/snapmgr.c
src/bin/initdb/t/001_initdb.pl
src/bin/pg_upgrade/tablespace.c
src/include/nodes/parsenodes.h
src/include/storage/latch.h
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 b8fa2d0a71d41ad1c55fe852049445a34fe1dd0e..64f5dc6dcd8e68f1b8643b26cac9581d9614e521 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 2b0b1b96332d48f0483380a5ebf75aaf6ab425ba..ec786d8f8a7370ffd9607661a396429b6b091fa2 100644 (file)
@@ -6573,7 +6573,7 @@ Delete
 <listitem>
 <para>
                 Identifies the following TupleData message as a old tuple.
-                This field is is present if the table in which the delete has
+                This field is present if the table in which the delete has
                 happened has REPLICA IDENTITY set to FULL.
 </para>
 </listitem>
index 0110d02e5a65299128e97a8c74537cb597540475..1f13b88e05d8f9ab6880161bbf1ac1c2b9cf9cef 100644 (file)
@@ -2655,7 +2655,7 @@ SPIPlanPtr SPI_saveplan(SPIPlanPtr <parameter>plan</parameter>)
 
  <refnamediv>
   <refname>SPI_register_relation</refname>
-  <refpurpose>make a ephemeral named relation available by name in SPI queries</refpurpose>
+  <refpurpose>make an ephemeral named relation available by name in SPI queries</refpurpose>
  </refnamediv>
 
  <refsynopsisdiv>
index 7142ecede0a446a718e9de8d7379850cd3531187..4421a2267d8eadc54ac31d7bcd2b7cf19f1f720c 100644 (file)
@@ -2555,7 +2555,7 @@ SetOffsetVacuumLimit(bool is_startup)
 
    /*
     * 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);
 
@@ -2732,7 +2732,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 dfd089f63ca26d87e0dd790712d0da27893bf310..fe2d4f147d732ffabec0b29c6cd82d484cc7ff5c 100644 (file)
@@ -1565,7 +1565,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 acd27b04821111d7835cba83f570dbca8eb3a3e8..7de4568b03e553502b13a162437abdfccf0da197 100644 (file)
@@ -1097,7 +1097,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 6a1d8a63d92f4700a915b7f726cbf892926c6abd..f911b651493b2858aba07988b32223c8948f57d2 100644 (file)
@@ -1449,7 +1449,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 addf87dc3bb61ac1c2be4ea12580f7775c9a7a8f..cbefc4ba03b97ac9a9dc808362d20600a06a672c 100644 (file)
@@ -1087,8 +1087,8 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
         * it's too late to abort the transaction, and (2) leaving a leaked
         * file around has little real consequence anyway.
         *
-        * We also also need to remove the snapshots from RegisteredSnapshots
-        * to prevent a warning below.
+        * We also need to remove the snapshots from RegisteredSnapshots to
+        * prevent a warning below.
         *
         * As with the FirstXactSnapshot, we don't need to free resources of
         * the snapshot iself as it will go away with the memory context.
index c0cfa6e92c491fe0d262254ce87e7850456f6fca..4290e22772f9de08c1f07e404b6978341e5f5c43 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 31958d5c67ffb82bbc72db9014eab0cc597854f4..913406a873115a1b8a088b686bd7f010f8d171ac 100644 (file)
@@ -34,7 +34,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 cf401dcf8210185439b99bcd92165bf1efae9a9d..aa0b9b0ce48e7d21098d4900ad66fa102c67e7ec 100644 (file)
@@ -3376,7 +3376,7 @@ typedef struct AlterTSConfigurationStmt
 typedef struct CreatePublicationStmt
 {
    NodeTag     type;
-   char       *pubname;        /* Name of of the publication */
+   char       *pubname;        /* Name of the publication */
    List       *options;        /* List of DefElem nodes */
    List       *tables;         /* Optional list of tables to add */
    bool        for_all_tables; /* Special publication for all tables in db */
@@ -3385,7 +3385,7 @@ typedef struct CreatePublicationStmt
 typedef struct AlterPublicationStmt
 {
    NodeTag     type;
-   char       *pubname;        /* Name of of the publication */
+   char       *pubname;        /* Name of the publication */
 
    /* parameters used for ALTER PUBLICATION ... WITH */
    List       *options;        /* List of DefElem nodes */
@@ -3399,7 +3399,7 @@ typedef struct AlterPublicationStmt
 typedef struct CreateSubscriptionStmt
 {
    NodeTag     type;
-   char       *subname;        /* Name of of the subscription */
+   char       *subname;        /* Name of the subscription */
    char       *conninfo;       /* Connection string to publisher */
    List       *publication;    /* One or more publication to subscribe to */
    List       *options;        /* List of DefElem nodes */
@@ -3418,7 +3418,7 @@ typedef struct AlterSubscriptionStmt
 {
    NodeTag     type;
    AlterSubscriptionType kind; /* ALTER_SUBSCRIPTION_OPTIONS, etc */
-   char       *subname;        /* Name of of the subscription */
+   char       *subname;        /* Name of the subscription */
    char       *conninfo;       /* Connection string to publisher */
    List       *publication;    /* One or more publication to subscribe to */
    List       *options;        /* List of DefElem nodes */
@@ -3427,7 +3427,7 @@ typedef struct AlterSubscriptionStmt
 typedef struct DropSubscriptionStmt
 {
    NodeTag     type;
-   char       *subname;        /* Name of of the subscription */
+   char       *subname;        /* Name of the subscription */
    bool        missing_ok;     /* Skip error if missing? */
    DropBehavior behavior;      /* RESTRICT or CASCADE behavior */
 } DropSubscriptionStmt;
index a43193c916b5403f0c00825a257d782e16c02d82..7e5308df1d1397dbc7b7a8960b318e417d3e3a81 100644 (file)
@@ -129,7 +129,7 @@ typedef struct Latch
 #ifdef WIN32
 #define WL_SOCKET_CONNECTED  (1 << 5)
 #else
-/* avoid having to to deal with case on platforms not requiring it */
+/* avoid having to deal with case on platforms not requiring it */
 #define WL_SOCKET_CONNECTED  WL_SOCKET_WRITEABLE
 #endif
 
index ac5717be38d466595ade34fc40ee51b58dc9dfbe..9a6dde44de903d9a066a755494e257efe10d95c8 100644 (file)
@@ -1309,8 +1309,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 ed494e1210875799c0fb9e5589642c3999c8db1d..1ebaf60e9b92b5b0157b83e9bf05b6ed44167e5d 100644 (file)
@@ -2726,7 +2726,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 b8dcf51a30ef3e41a15fc3227a785ba64c6d11ff..beb1129737d21c0fdb893bcf84ab73d184580024 100644 (file)
@@ -2108,7 +2108,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 ce03c4e7e4796b807a64f5d64ecb9864f4d4abc9..2874078f67c2aca03e1dc4bcfadd39e5903bbf0b 100644 (file)
@@ -2814,7 +2814,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 f3a31dbee035514058b34ec40c34a0cd11eb0ce0..5a9fdcad742b7e8f0416c3474e546c5678b931ff 100644 (file)
@@ -781,7 +781,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 d9aecad9122c1adaed14da1ba7d0505e577db061..8d705c795ac04abdb8864aac4e5546f1c114aaf1 100644 (file)
@@ -1007,7 +1007,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;