Attached a patch to fix a number of typos in docs and comments I noticed over the past few weeks.

/ Oskari

>From dd5cb727d7fc1f1168040f502521a897d01cc127 Mon Sep 17 00:00:00 2001
From: Oskari Saarenmaa <o...@ohmu.fi>
Date: Sat, 5 Sep 2015 10:12:04 +0300
Subject: [PATCH] typofixes

---
 contrib/btree_gist/btree_ts.c            | 2 +-
 contrib/btree_gist/btree_utils_var.c     | 2 +-
 contrib/cube/cube.c                      | 2 +-
 doc/src/sgml/ref/alter_role.sgml         | 4 ++--
 doc/src/sgml/release-9.5.sgml            | 4 ++--
 doc/src/sgml/sources.sgml                | 2 +-
 src/backend/access/brin/brin_revmap.c    | 4 ++--
 src/backend/access/common/heaptuple.c    | 2 +-
 src/backend/access/gin/ginfast.c         | 4 ++--
 src/backend/access/gist/gistproc.c       | 4 ++--
 src/backend/access/heap/heapam.c         | 4 ++--
 src/backend/access/heap/rewriteheap.c    | 4 ++--
 src/backend/access/transam/xact.c        | 2 +-
 src/backend/optimizer/path/costsize.c    | 2 +-
 src/backend/replication/logical/origin.c | 2 +-
 src/backend/utils/adt/regproc.c          | 2 +-
 src/include/storage/lwlock.h             | 4 ++--
 17 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index c746c23..ab22b27 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -369,7 +369,7 @@ gbt_ts_penalty(PG_FUNCTION_ARGS)
 				newdbl[2];
 
 	/*
-	 * We are allways using "double" timestamps here. Precision should be good
+	 * We are always using "double" timestamps here. Precision should be good
 	 * enough.
 	 */
 	orgdbl[0] = ((double) origentry->lower);
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
index 8105a3b..70b3794 100644
--- a/contrib/btree_gist/btree_utils_var.c
+++ b/contrib/btree_gist/btree_utils_var.c
@@ -52,7 +52,7 @@ gbt_var_decompress(PG_FUNCTION_ARGS)
 	PG_RETURN_POINTER(entry);
 }
 
-/* Returns a better readable representaion of variable key ( sets pointer ) */
+/* Returns a better readable representation of variable key ( sets pointer ) */
 GBT_VARKEY_R
 gbt_var_key_readable(const GBT_VARKEY *k)
 {
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 113c663..a6be59e 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -814,7 +814,7 @@ cube_inter(PG_FUNCTION_ARGS)
 									Max(LL_COORD(b, i), UR_COORD(b, i))
 			);
 	}
-	/* continue on the higher dimemsions only present in 'a' */
+	/* continue on the higher dimensions only present in 'a' */
 	for (; i < DIM(a); i++)
 	{
 		result->x[i] = Max(0,
diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml
index e97bf4c..7638817 100644
--- a/doc/src/sgml/ref/alter_role.sgml
+++ b/doc/src/sgml/ref/alter_role.sgml
@@ -138,7 +138,7 @@ ALTER ROLE { <replaceable class="PARAMETER">role_specification</replaceable> | A
       <term>CURRENT_USER</term>
       <listitem>
        <para>
-        Alter the current user instead of an explicitely identified role.
+        Alter the current user instead of an explicitly identified role.
        </para>
       </listitem>
      </varlistentry>
@@ -147,7 +147,7 @@ ALTER ROLE { <replaceable class="PARAMETER">role_specification</replaceable> | A
       <term>SESSION_USER</term>
       <listitem>
        <para>
-        Alter the current session user instead of an explicitely identified
+        Alter the current session user instead of an explicitly identified
         role.
        </para>
       </listitem>
diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml
index a535e22..59f10f0 100644
--- a/doc/src/sgml/release-9.5.sgml
+++ b/doc/src/sgml/release-9.5.sgml
@@ -460,7 +460,7 @@ FIXME: Add Andres
 <!--
 2014-07-01 [9f03ca9] Robert..: Avoid copying index tuples when building an ind..
 -->
-        Speed up CREATE INDEX by avoiding unneccessary memory copies (Robert Haas)
+        Speed up CREATE INDEX by avoiding unnecessary memory copies (Robert Haas)
        </para>
       </listitem>
 
@@ -1111,7 +1111,7 @@ FIXME: Correct description
 -->
        <para>
         Allow changing of the <acronym>WAL</acronym>
-        logging status of a table ater creation with <link
+        logging status of a table after creation with <link
         linkend="SQL-ALTERTABLE"><command>ALTER TABLE .. SET LOGGED /
         UNLOGGED</></> (Fabr&iacute;zio de Royes Mello)
        </para>
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index aa20807..d6461ec 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -251,7 +251,7 @@ ereport(ERROR,
    </listitem>
    <listitem>
     <para>
-     <function>errdetail_log_plural(const char *fmt_singuar, const char
+     <function>errdetail_log_plural(const char *fmt_singular, const char
      *fmt_plural, unsigned long n, ...)</function> is like
      <function>errdetail_log</>, but with support for various plural forms of
      the message.
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c
index 62d440f..8c55f16 100644
--- a/src/backend/access/brin/brin_revmap.c
+++ b/src/backend/access/brin/brin_revmap.c
@@ -127,7 +127,7 @@ brinRevmapExtend(BrinRevmap *revmap, BlockNumber heapBlk)
  * it's not long enough.
  *
  * The returned buffer is also recorded in the revmap struct; finishing that
- * releases the buffer, therefore the caller needn't do it explicitely.
+ * releases the buffer, therefore the caller needn't do it explicitly.
  */
 Buffer
 brinLockRevmapPageForUpdate(BrinRevmap *revmap, BlockNumber heapBlk)
@@ -314,7 +314,7 @@ revmap_get_blkno(BrinRevmap *revmap, BlockNumber heapBlk)
  * Obtain and return a buffer containing the revmap page for the given heap
  * page.  The revmap must have been previously extended to cover that page.
  * The returned buffer is also recorded in the revmap struct; finishing that
- * releases the buffer, therefore the caller needn't do it explicitely.
+ * releases the buffer, therefore the caller needn't do it explicitly.
  */
 static Buffer
 revmap_get_buffer(BrinRevmap *revmap, BlockNumber heapBlk)
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index 045e0a7..94955b7 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -805,7 +805,7 @@ heap_modify_tuple(HeapTuple tuple,
 	 * repl information, as appropriate.
 	 *
 	 * NOTE: it's debatable whether to use heap_deform_tuple() here or just
-	 * heap_getattr() only the non-replaced colums.  The latter could win if
+	 * heap_getattr() only the non-replaced columns.  The latter could win if
 	 * there are many replaced columns and few non-replaced ones. However,
 	 * heap_deform_tuple costs only O(N) while the heap_getattr way would cost
 	 * O(N^2) if there are many non-replaced columns, so it seems better to
diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
index 54e593d..ae44665 100644
--- a/src/backend/access/gin/ginfast.c
+++ b/src/backend/access/gin/ginfast.c
@@ -888,8 +888,8 @@ ginInsertCleanup(GinState *ginstate,
 												 * locking */
 
 			/*
-			 * remove readed pages from pending list, at this point all
-			 * content of readed pages is in regular structure
+			 * remove read pages from pending list, at this point all
+			 * content of read pages is in regular structure
 			 */
 			if (shiftList(index, metabuffer, blkno, stats))
 			{
diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c
index 4cea3f1..22ae31c 100644
--- a/src/backend/access/gist/gistproc.c
+++ b/src/backend/access/gist/gistproc.c
@@ -588,7 +588,7 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
 		 * We first consider splits where b is the lower bound of an entry.
 		 * We iterate through all entries, and for each b, calculate the
 		 * smallest possible a. Then we consider splits where a is the
-		 * uppper bound of an entry, and for each a, calculate the greatest
+		 * upper bound of an entry, and for each a, calculate the greatest
 		 * possible b.
 		 *
 		 * In the above example, the first loop would consider splits:
@@ -638,7 +638,7 @@ gist_box_picksplit(PG_FUNCTION_ARGS)
 		}
 
 		/*
-		 * Iterate over upper bound of left group finding greates possible
+		 * Iterate over upper bound of left group finding greatest possible
 		 * lower bound of right group.
 		 */
 		i1 = nentries - 1;
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 3701d8e..bcf9871 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -5473,7 +5473,7 @@ l4:
  *
  * The initial tuple is assumed to be already locked.
  *
- * This function doesn't check visibility, it just inconditionally marks the
+ * This function doesn't check visibility, it just unconditionally marks the
  * tuple(s) as locked.  If any tuple in the updated chain is being deleted
  * concurrently (or updated with the key being modified), sleep until the
  * transaction doing it is finished.
@@ -6187,7 +6187,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
 			/*
 			 * NB -- some of these transformations are only valid because we
 			 * know the return Xid is a tuple updater (i.e. not merely a
-			 * locker.) Also note that the only reason we don't explicitely
+			 * locker.) Also note that the only reason we don't explicitly
 			 * worry about HEAP_KEYS_UPDATED is because it lives in
 			 * t_infomask2 rather than t_infomask.
 			 */
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index bcce3e3..6a6fc3b 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -763,9 +763,9 @@ raw_heap_insert(RewriteState state, HeapTuple tup)
  *
  * Crash-Safety: This module diverts from the usual patterns of doing WAL
  * since it cannot rely on checkpoint flushing out all buffers and thus
- * waiting for exlusive locks on buffers. Usually the XLogInsert() covering
+ * waiting for exclusive locks on buffers. Usually the XLogInsert() covering
  * buffer modifications is performed while the buffer(s) that are being
- * modified are exlusively locked guaranteeing that both the WAL record and
+ * modified are exclusively locked guaranteeing that both the WAL record and
  * the modified heap are on either side of the checkpoint. But since the
  * mapping files we log aren't in shared_buffers that interlock doesn't work.
  *
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index ae9e850..56a1cb4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -83,7 +83,7 @@ int			synchronous_commit = SYNCHRONOUS_COMMIT_ON;
  * When running as a parallel worker, we place only a single
  * TransactionStateData on the parallel worker's state stack, and the XID
  * reflected there will be that of the *innermost* currently-active
- * subtransaction in the backend that initiated paralllelism.  However,
+ * subtransaction in the backend that initiated parallelism.  However,
  * GetTopTransactionId() and TransactionIdIsCurrentTransactionId()
  * need to return the same answers in the parallel worker as they would have
  * in the user backend, so we need some additional bookkeeping.
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 7069f60..d107d76 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1039,7 +1039,7 @@ cost_tidscan(Path *path, PlannerInfo *root,
 
 	/*
 	 * The TID qual expressions will be computed once, any other baserestrict
-	 * quals once per retrived tuple.
+	 * quals once per retrieved tuple.
 	 */
 	cost_qual_eval(&tid_qual_cost, tidquals, root);
 
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index c219590..b5fa3d8 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -1049,7 +1049,7 @@ replorigin_session_setup(RepOriginId node)
 		{
 			ereport(ERROR,
 					(errcode(ERRCODE_OBJECT_IN_USE),
-			 errmsg("replication identiefer %d is already active for pid %d",
+			 errmsg("replication identifier %d is already active for pid %d",
 					curstate->roident, curstate->acquired_by)));
 		}
 
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c
index 0bfeb5e..53e71dc 100644
--- a/src/backend/utils/adt/regproc.c
+++ b/src/backend/utils/adt/regproc.c
@@ -855,7 +855,7 @@ format_operator_internal(Oid operator_oid, bool force_qualify)
 
 		/*
 		 * Would this oper be found (given the right args) by regoperatorin?
-		 * If not, or if caller explicitely requests it, we need to qualify
+		 * If not, or if caller explicitly requests it, we need to qualify
 		 * it.
 		 */
 		if (force_qualify || !OperatorIsVisible(operator_oid))
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index f2ff6a0..84a6fc7 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -54,13 +54,13 @@ typedef struct LWLock
 	slock_t		mutex;			/* Protects LWLock and queue of PGPROCs */
 	uint16		tranche;		/* tranche ID */
 
-	pg_atomic_uint32 state;		/* state of exlusive/nonexclusive lockers */
+	pg_atomic_uint32 state;		/* state of exclusive/nonexclusive lockers */
 #ifdef LOCK_DEBUG
 	pg_atomic_uint32 nwaiters;	/* number of waiters */
 #endif
 	dlist_head	waiters;		/* list of waiting PGPROCs */
 #ifdef LOCK_DEBUG
-	struct PGPROC *owner;		/* last exlusive owner of the lock */
+	struct PGPROC *owner;		/* last exclusive owner of the lock */
 #endif
 } LWLock;
 
-- 
2.5.0

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to