From 9e00caf355ae9190ba88c12e969262da5c756864 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed, 12 Jun 2019 14:16:18 -0400
Subject: [PATCH] Fix double-word typos

---
 doc/src/sgml/backup.sgml                           | 2 +-
 src/bin/pg_dump/pg_dump.c                          | 4 ++--
 src/include/executor/tuptable.h                    | 2 +-
 src/include/fmgr.h                                 | 2 +-
 src/include/utils/snapshot.h                       | 2 +-
 src/interfaces/ecpg/preproc/type.c                 | 2 +-
 src/test/modules/test_integerset/test_integerset.c | 4 ++--
 src/test/recovery/t/013_crash_restart.pl           | 2 +-
 src/test/regress/expected/polygon.out              | 2 +-
 src/test/regress/sql/polygon.sql                   | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index b67da8916a..9d4c000df0 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -965,7 +965,7 @@ SELECT * FROM pg_stop_backup(false, true);
      backups.  Moreover, because it writes a backup_label file on the
      master, it can cause the master to fail to restart automatically after
      a crash.  On the other hand, the erroneous removal of a backup_label
-     file from a backup or standby is a common mistake which can can result
+     file from a backup or standby is a common mistake which can result
      in serious data corruption.  If it is necessary to use this method,
      the following steps may be used.
     </para>
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 36e8d27edd..8909a45d61 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -4051,8 +4051,8 @@ dumpPublicationTable(Archive *fout, PublicationRelInfo *pubrinfo)
 					  fmtQualifiedDumpable(tbinfo));
 
 	/*
-	 * There is no point in creating drop query as drop query as the drop is
-	 * done by table drop.
+	 * There is no point in creating drop query as the drop is done by table
+	 * drop.
 	 */
 	ArchiveEntry(fout, pubrinfo->dobj.catId, pubrinfo->dobj.dumpId,
 				 ARCHIVE_OPTS(.tag = tag,
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index d912280386..0710a7dd38 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -59,7 +59,7 @@
  * also that a virtual tuple does not have any "system columns".
  *
  * The Datum/isnull arrays of a TupleTableSlot serve double duty.  For virtual
- * slots they they are the authoritative data.  For the other builtin slots,
+ * slots they are the authoritative data.  For the other builtin slots,
  * the arrays contain data extracted from the tuple.  (In this state, any
  * pass-by-reference Datums point into the physical tuple.)  The extracted
  * information is built "lazily", ie, only as needed.  This serves to avoid
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 1ac71a40f5..3ff099986b 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -96,7 +96,7 @@ typedef struct FunctionCallInfoBaseData
 } FunctionCallInfoBaseData;
 
 /*
- * Space needed for for a FunctionCallInfoBaseData struct with sufficient space
+ * Space needed for a FunctionCallInfoBaseData struct with sufficient space
  * for `nargs` arguments.
  */
 #define SizeForFunctionCallInfo(nargs) \
diff --git a/src/include/utils/snapshot.h b/src/include/utils/snapshot.h
index 9f92ce011d..c00f1fe908 100644
--- a/src/include/utils/snapshot.h
+++ b/src/include/utils/snapshot.h
@@ -69,7 +69,7 @@ typedef enum SnapshotType
 	SNAPSHOT_ANY,
 
 	/*
-	 * A tuple is visible iff the tuple tuple is valid as a TOAST row.
+	 * A tuple is visible iff the tuple is valid as a TOAST row.
 	 */
 	SNAPSHOT_TOAST,
 
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index 165b5df24f..6a71766ccf 100644
--- a/src/interfaces/ecpg/preproc/type.c
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -582,7 +582,7 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsize
 {
 	/*
 	 * If offset is NULL, then this is the first recursive level. If not then
-	 * we are in a struct in a struct and the offset is used as offset.
+	 * we are in a struct and the offset is used as offset.
 	 */
 	struct ECPGstruct_member *p,
 			   *ind_p = NULL;
diff --git a/src/test/modules/test_integerset/test_integerset.c b/src/test/modules/test_integerset/test_integerset.c
index 15b9ce1ac3..713f4a69ef 100644
--- a/src/test/modules/test_integerset/test_integerset.c
+++ b/src/test/modules/test_integerset/test_integerset.c
@@ -246,7 +246,7 @@ test_pattern(const test_spec *spec)
 		 * last integer that we added to the set, plus an arbitrary constant
 		 * (1000).  There's no point in probing the whole 0 - 2^64 range, if
 		 * only a small part of the integer space is used.  We would very
-		 * rarely hit hit values that are actually in the set.
+		 * rarely hit values that are actually in the set.
 		 */
 		x = (pg_lrand48() << 31) | pg_lrand48();
 		x = x % (last_int + 1000);
@@ -337,7 +337,7 @@ test_single_value(uint64 value)
 		elog(ERROR, "intset_num_entries returned " UINT64_FORMAT ", expected 1", num_entries);
 
 	/*
-	 * Test intset_is_member() at various special values, like 0 and and
+	 * Test intset_is_member() at various special values, like 0 and
 	 * maximum possible 64-bit integer, as well as the value itself.
 	 */
 	if (intset_is_member(intset, 0) != (value == 0))
diff --git a/src/test/recovery/t/013_crash_restart.pl b/src/test/recovery/t/013_crash_restart.pl
index 3ecb9dd4df..2c477978e7 100644
--- a/src/test/recovery/t/013_crash_restart.pl
+++ b/src/test/recovery/t/013_crash_restart.pl
@@ -185,7 +185,7 @@ $monitor_stderr = '';
 
 
 # kill with SIGKILL this time - we expect the backend to exit, without
-# being able to emit an error error message
+# being able to emit an error message
 $ret = TestLib::system_log('pg_ctl', 'kill', 'KILL', $pid);
 is($ret, 0, "killed process with KILL");
 
diff --git a/src/test/regress/expected/polygon.out b/src/test/regress/expected/polygon.out
index f319239b2e..a1f5cce5cb 100644
--- a/src/test/regress/expected/polygon.out
+++ b/src/test/regress/expected/polygon.out
@@ -69,7 +69,7 @@ SET enable_bitmapscan = OFF;
 CREATE TEMP TABLE quad_poly_tbl_ord_seq2 AS
 SELECT rank() OVER (ORDER BY p <-> point '123,456') n, p <-> point '123,456' dist, id
 FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))';
--- check results results from index scan
+-- check results from index scan
 SET enable_seqscan = OFF;
 SET enable_indexscan = OFF;
 SET enable_bitmapscan = ON;
diff --git a/src/test/regress/sql/polygon.sql b/src/test/regress/sql/polygon.sql
index 866e11b9e3..03fc6a8576 100644
--- a/src/test/regress/sql/polygon.sql
+++ b/src/test/regress/sql/polygon.sql
@@ -66,7 +66,7 @@ CREATE TEMP TABLE quad_poly_tbl_ord_seq2 AS
 SELECT rank() OVER (ORDER BY p <-> point '123,456') n, p <-> point '123,456' dist, id
 FROM quad_poly_tbl WHERE p <@ polygon '((300,300),(400,600),(600,500),(700,200))';
 
--- check results results from index scan
+-- check results from index scan
 SET enable_seqscan = OFF;
 SET enable_indexscan = OFF;
 SET enable_bitmapscan = ON;
-- 
2.17.1

