]> granicus.if.org Git - postgresql/commitdiff
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:17:32 +0000 (16:17 +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.

25 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/commands/explain.c
src/backend/executor/nodeModifyTable.c
src/backend/optimizer/plan/planner.c
src/backend/parser/parse_func.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/execnodes.h
src/include/nodes/parsenodes.h
src/include/port/pg_bswap.h
src/include/storage/latch.h
src/include/utils/rel.h
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/preproc/parse.pl
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 0744d74de7531257612b8ba9184f66ef72580bd2..2d81e3821896c2ad44e123229b8af12f6371f959 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 cfc805f7853ea5c217c853333b29366cc8ee9c02..46d7e19f100c5e28a0d6e2e6e858a4be81ea7ae4 100644 (file)
@@ -6773,7 +6773,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 12602758645f295ad56b0fb46bc83824af007cfa..2dad2158596036cab83391b47396bc00c7000dfa 100644 (file)
@@ -2686,7 +2686,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 a9a51055e967dfce581a6b6c049c4d85ef3836d8..365daf153abe55f1e4f8d9d1b17869c9cbe2fcae 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 482d463420acb9a6daa46bccd978e5ea5fac05f2..0112a87224129b4261c6ee19b937a9a6d4d409eb 100644 (file)
@@ -1581,7 +1581,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 73d94b72356d7c628ebd25b0cc8fd8edccba2d49..16a80a0ea14bec0db4c5814212f679cd5b78252f 100644 (file)
@@ -3341,7 +3341,7 @@ ExplainPropertyListNested(const char *qlabel, List *data, ExplainState *es)
  * If "numeric" is true, the value is a number (or other value that
  * doesn't need quoting in JSON).
  *
- * If unit is is non-NULL the text format will display it after the value.
+ * If unit is non-NULL the text format will display it after the value.
  *
  * This usually should not be invoked directly, but via one of the datatype
  * specific routines ExplainPropertyText, ExplainPropertyInteger, etc.
index 779b3d48940850b6df5f7a3b2e3fdc02c62f3f35..f535762e2d13e58a2aebc5b5d05ffb8d5ae2fe27 100644 (file)
@@ -1347,7 +1347,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 602418f287059f9ded81eed70c9454513969d244..df4ec448cb082bd71d7664977e96dc7913ad3135 100644 (file)
@@ -6908,8 +6908,8 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
                                                          scanjoin_targets_contain_srfs);
 
        /*
-        * If the relation is partitioned, recurseively apply the same changes to
-        * all partitions and generate new Append paths. Since Append is not
+        * If the relation is partitioned, recursively apply the same changes to
+        * all partitions and generate new Append paths.  Since Append is not
         * projection-capable, that might save a separate Result node, and it also
         * is important for partitionwise aggregate.
         */
index c2feaf371fe674ddcbd74fd3ed29cd9818e09631..44257154b816d81a05c3be06f842a81bbd457027 100644 (file)
@@ -2195,7 +2195,7 @@ LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func, bool noError)
                        else if (func->args_unspecified)
                                ereport(ERROR,
                                                (errcode(ERRCODE_UNDEFINED_FUNCTION),
-                                                errmsg("could not find a aggregate named \"%s\"",
+                                                errmsg("could not find an aggregate named \"%s\"",
                                                                NameListToString(func->objname))));
                        else if (argcount == 0)
                                ereport(ERROR,
index 841e24c03da3116a2617e2a4b6bf44a5d7686e03..2d05d04b872237b18a1f8b32f223639dd531ebc8 100644 (file)
@@ -1455,7 +1455,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 4b45d3cccd29af65c3af9da974d34c9cedbdf855..edf59efc29d8f867e3a15ef9bd8f3ab5b7783d5a 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 599460ca883b81bdd3c0f9e23df9d66cac6b83f1..5dc629fd5ecbc5e2c622749bcd8197b65ac89072 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 b0cbf81f7da786b0bfc0766587990026d649429e..6dc8428e7b7fba88db5a828363ba4bc235c739e1 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 da7f52cab09eb3d229b91909b19bd70a85c206c1..20140a35e5237b878373f54aafdbdafa0216351b 100644 (file)
@@ -676,7 +676,7 @@ typedef struct TupleHashTableData
        /* The following fields are set transiently for each table search: */
        TupleTableSlot *inputslot;      /* current input tuple's slot */
        FmgrInfo   *in_hash_funcs;      /* hash functions for input datatype(s) */
-       ExprState  *cur_eq_func;        /* comparator for for input vs. table */
+       ExprState  *cur_eq_func;        /* comparator for input vs. table */
        uint32          hash_iv;                /* hash-function IV */
        ExprContext *exprcontext;       /* expression context */
 }                      TupleHashTableData;
index 2a2b17d5704bc5c4a2128e1aaa47cb8dba8d7eb1..9a5d91a198b5b9e9df5a48d8ae9034f5b2d3d2f2 100644 (file)
@@ -3433,7 +3433,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 */
@@ -3442,7 +3442,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 */
@@ -3456,7 +3456,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 */
@@ -3475,7 +3475,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 */
@@ -3484,7 +3484,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 0f09c05d6f93dd3c55dde2c7b6f1f78b8481d53b..5b05a6d2971a5551a0f272b2a13f878467651af6 100644 (file)
@@ -102,7 +102,7 @@ pg_bswap64(uint64 x)
 
 
 /*
- * Portable and fast equivalents for for ntohs, ntohl, htons, htonl,
+ * Portable and fast equivalents for ntohs, ntohl, htons, htonl,
  * additionally extended to 64 bits.
  */
 #ifdef WORDS_BIGENDIAN
index a4bcb48874a8309da7e72872010f133ee2880fd2..fd8735b7f5f863a9214eb4a562dfd8d05d6eea13 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 c97f9d1b43e287507b12387207061b6a6af1fab2..6ecbdb629443848856ecddcf8198fbd297f61d47 100644 (file)
@@ -218,7 +218,7 @@ typedef struct ForeignKeyCacheInfo
 } ForeignKeyCacheInfo;
 
 /*
- * Options common for all all indexes
+ * Options common for all indexes
  */
 typedef struct GenericIndexOpts
 {
index 6f6819a8f48f1eef367037dddee46c18c07a05d9..8569ca55df03bde70d3a3271d902413b52c59f6c 100644 (file)
@@ -1308,8 +1308,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 b20383ab17a2228cad71dfa4eda1b3eb0440fb4d..ad87aad28358fdba72601e65b73b38c0edcfd489 100644 (file)
@@ -144,7 +144,7 @@ sub main
                # flds are the fields to use. These may start with a '$' - in
                # which case they are the result of a previous non-terminal
                #
-               # if they dont start with a '$' then they are token name
+               # if they don't start with a '$' then they are token name
                #
                # len is the number of fields in flds...
                # leadin is the padding to apply at the beginning (just use for formatting)
@@ -223,7 +223,7 @@ sub main
                        next line;
                }
 
-               # Dont worry about anything if we're not in the right section of gram.y
+               # Don't worry about anything if we're not in the right section of gram.y
                if ($yaccmode != 1)
                {
                        next line;
index 12f7b13780957089e0e8e9a8fc25ca67c8ba25a1..e2fa43b890de8aa4b80537835e2da021dc8881f2 100644 (file)
@@ -2762,7 +2762,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 f1ae40df61c60d9940ca5326f0a20c998a1f4a21..bc16ca4c43f2e6cb9424c72293058b2dfb211a1b 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 ae0cd253d5f30abc35808e653e3644ef966673d5..744d501e3190469a034473f75e2ca2a9e6c96ba3 100644 (file)
@@ -2818,7 +2818,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 a82f52d154849f2de14f23a2924171d02a8aad6a..3ca4c0735659be8adf86fc5c5b623dc65b8e020d 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;