Quitting the thes

Started by Stephen Amellover 6 years ago8 messages
#1Stephen Amell
mrstephenamell@gmail.com
1 attachment(s)

Hi all,

Here my first patch for postgres. Starting by an easy thing, I correct
the duplicated "the the" strings from comments on some files.

- src/backend/executor/execExpr.c
- src/include/c.h
- src/include/jit/llvmjit_emit.h
- src/include/nodes/execnodes.h
- src/include/replication/logical.h

Any feedback are welcome!

Thanks a lot,

Attachments:

the-thes.patchtext/plain; charset=UTF-8; name=the-thes.patchDownload
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 0fb31f5..0a7b2b8 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -2361,7 +2361,7 @@ get_last_attnums_walker(Node *node, LastAttnumInfo *info)
  * Compute additional information for EEOP_*_FETCHSOME ops.
  *
  * The goal is to determine whether a slot is 'fixed', that is, every
- * evaluation of the the expression will have the same type of slot, with an
+ * evaluation of the expression will have the same type of slot, with an
  * equivalent descriptor.
  */
 static void
diff --git a/src/include/c.h b/src/include/c.h
index 33c9518..0f89c02 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -1129,7 +1129,7 @@ typedef union PGAlignedXLogBlock
  * Please note IT IS NOT SAFE to cast constness away if the result will ever
  * be modified (it would be undefined behaviour). Doing so anyway can cause
  * compiler misoptimizations or runtime crashes (modifying readonly memory).
- * It is only safe to use when the the result will not be modified, but API
+ * It is only safe to use when the result will not be modified, but API
  * design or language restrictions prevent you from declaring that
  * (e.g. because a function returns both const and non-const variables).
  *
diff --git a/src/include/jit/llvmjit_emit.h b/src/include/jit/llvmjit_emit.h
index 9569da6..71a8625 100644
--- a/src/include/jit/llvmjit_emit.h
+++ b/src/include/jit/llvmjit_emit.h
@@ -218,7 +218,7 @@ l_mcxt_switch(LLVMModuleRef mod, LLVMBuilderRef b, LLVMValueRef nc)
 }
 
 /*
- * Return pointer to the the argno'th argument nullness.
+ * Return pointer to the argno'th argument nullness.
  */
 static inline LLVMValueRef
 l_funcnullp(LLVMBuilderRef b, LLVMValueRef v_fcinfo, size_t argno)
@@ -236,7 +236,7 @@ l_funcnullp(LLVMBuilderRef b, LLVMValueRef v_fcinfo, size_t argno)
 }
 
 /*
- * Return pointer to the the argno'th argument datum.
+ * Return pointer to the argno'th argument datum.
  */
 static inline LLVMValueRef
 l_funcvaluep(LLVMBuilderRef b, LLVMValueRef v_fcinfo, size_t argno)
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index ff33287..4b1635e 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -593,7 +593,7 @@ typedef struct EState
 	 * and with which options.  es_jit is created on-demand when JITing is
 	 * performed.
 	 *
-	 * es_jit_combined_instr is the the combined, on demand allocated,
+	 * es_jit_combined_instr is the combined, on demand allocated,
 	 * instrumentation from all workers. The leader's instrumentation is kept
 	 * separate, and is combined on demand by ExplainPrintJITSummary().
 	 */
diff --git a/src/include/replication/logical.h b/src/include/replication/logical.h
index 0a2a63a..0daa38c 100644
--- a/src/include/replication/logical.h
+++ b/src/include/replication/logical.h
@@ -47,7 +47,7 @@ typedef struct LogicalDecodingContext
 
 	/*
 	 * Marks the logical decoding context as fast forward decoding one. Such a
-	 * context does not have plugin loaded so most of the the following
+	 * context does not have plugin loaded so most of the following
 	 * properties are unused.
 	 */
 	bool		fast_forward;
#2Michael Paquier
michael@paquier.xyz
In reply to: Stephen Amell (#1)
Re: Quitting the thes

On Mon, May 13, 2019 at 04:52:15PM -0300, Stephen Amell wrote:

Here my first patch for postgres. Starting by an easy thing, I correct the
duplicated "the the" strings from comments on some files.

Welcome!

- src/backend/executor/execExpr.c
- src/include/c.h
- src/include/jit/llvmjit_emit.h
- src/include/nodes/execnodes.h
- src/include/replication/logical.h

Any feedback are welcome!

Thanks, committed. I have noticed an extra one in reorderbuffer.c.

If you get interested in more areas of the code, there is plently of
small work items which can be reviewed or worked on.

We have on the wiki a manual about how to submit a patch:
https://wiki.postgresql.org/wiki/Submitting_a_Patch

Patches go through a dedicated commit fest app, and it has many small
fishes which can be worked on:
https://commitfest.postgresql.org/23/
You could get more familiar with some areas of the code this way.

Thanks,
--
Michael

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Stephen Amell (#1)
Re: Quitting the thes

Hi all

(CC'ing 'Last-Translator' addresses)

I noticed a few duplicated words in the .po files. Some of these are
obviously false positives.

This command reports them with color highlighting:
$ git grep '\<\([a-z_ ]\+\)\> \<\1\>' -- *.po

src/backend/po/de.po:msgstr "Wenn der Planer schätzt, dass zu wenige Tabellenseiten gelesen werden werden um diesen Wert zu erreichen, dann wird kein paralleler Scan in Erwägung gezogen werden."
src/backend/po/de.po:msgstr "Wenn der Planer schätzt, dass zu wenige Indexseiten gelesen werden werden um diesen Wert zu erreichen, dann wird kein paralleler Scan in Erwägung gezogen werden."
src/backend/po/de.po:msgstr "Setzt den vom Planer geschätzten Anteil der Cursor-Zeilen, die ausgelesen werden werden."
src/backend/po/fr.po:msgstr "l'extension « %s » n'a pas de script d'installation ou de chemin de de mise à jour pour la version « %s »"
src/backend/po/fr.po:msgstr "les fonctions in_range btree doivent doivent retourner un booléen"
src/backend/po/fr.po:msgstr "la relation référencée « %s » n'est ni une table ni une table distante"
src/backend/po/fr.po:msgstr "la relation héritée « %s » n'est ni une table ni une table distante"
src/backend/po/fr.po:"l'option DISABLE_PAGE_SKIPPING de la commande VACUUM ne pas pas être utilisée\n"
src/backend/po/fr.po:"Vous pourriez avoir avoir besoin d'ajouter des conversions de type explicites."
src/backend/po/fr.po:msgstr "symbole « %c » invalide invalide lors du décodage de la séquence en base64"
src/backend/po/fr.po:msgstr "La chaîne des des guillements doubles non fermés."
src/backend/po/id.po:msgstr "sambungan terputus saat COPY ke stdout stdout"
src/backend/po/id.po:msgstr "Gunakan 'quoted CSV field' untuk menyatakan baris baris baru"
src/backend/po/id.po:msgstr "file konfigurasi « %s » terdapat errors ; tidak tidak terpengaruh applied"
src/backend/po/it.po:msgstr "le protezioni di wraparound dei membri MultiXact sono disabilitate perché il il MultiXact più vecchio che abbia ricevuto un checkpoint %u non esiste sul disco"
src/backend/po/it.po:msgstr "La rilevazione di un errore in una somma di controllo di solito fa generare a PostgreSQL un errore che fa abortire la transazione corrente. Impostare ignore_checksum_failure a \"true\" fa sì che il sistema ignori l'errore (che viene riportato come un avviso), consentendo al processo di continuare. Questo comportamento potrebbe causare crash o altri problemi gravi. Ha effetto solo se se somme di controllo sono abilitate."
src/backend/po/sv.po:msgid "tid (%u, %u) is not valid for relation for relation \"%s\""
src/backend/po/tr.po:msgstr "\"%2$s\" kullanarak kullanarak PID %1$d olan başka bir istemci süreci çalışmakta mıdır?"
src/backend/po/tr.po:msgstr "\"%2$s\" kullanarak kullanarak PID %1$d olan başka bir sunucu çalışmakta mıdır?"
src/bin/initdb/po/cs.po:msgstr "Spusťte znovu %s s přepínačem -E.\n"
src/bin/initdb/po/cs.po:"Pusťte znovu %s s jiným nastavením locale.\n"
src/bin/initdb/po/tr.po:"kaldırın, ya boşaltın ya da ya da %s 'i \n"
src/bin/pg_basebackup/po/de.po:"Optionen, die die Ausgabe kontrollieren:\n"
src/bin/pg_basebackup/po/tr.po:msgstr "%s: --no-slot slot adıyla birlikte kullanılamaz\n"
src/bin/pg_dump/po/de.po:"Optionen die die Wiederherstellung kontrollieren:\n"
src/bin/pg_resetwal/po/it.po:msgstr " (zero in uno dei dei valori vuol dire nessun cambiamento)\n"
src/bin/psql/po/de.po:msgstr "ändert den Eigentümer der der Rolle gehörenden Datenbankobjekte"
src/bin/scripts/po/pl.po:msgstr " -t, --timeout=SEKUNDY sekundy oczekiwania podczas podczas próby połączenia, 0 wyłącza (domyślnie: %s)\n"
src/interfaces/ecpg/ecpglib/po/pl.po:msgstr "zmienna nie ma typu typu numeric, linia %d"
src/interfaces/ecpg/ecpglib/po/pl.po:msgstr "zmienna nie ma typu typu character, linia %d"
src/interfaces/libpq/po/fr.po:msgstr "mot de passe récupéré dans le fichier fichier « %s »\n"
src/interfaces/libpq/po/it.po:msgstr "non è stato possibile possibile ottenere il certificato: %s\n"

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michael Paquier (#2)
1 attachment(s)
Re: Quitting the thes

On 2019-May-14, Michael Paquier wrote:

Thanks, committed. I have noticed an extra one in reorderbuffer.c.

Some grepping found a bit more; patch attached.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

0001-Fix-double-word-typos.patchtext/x-diff; charset=us-asciiDownload
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

#5Guillaume Lelarge
guillaume@lelarge.info
In reply to: Alvaro Herrera (#4)
Re: Quitting the thes

Le mer. 12 juin 2019 à 20:45, Alvaro Herrera <alvherre@2ndquadrant.com> a
écrit :

On 2019-May-14, Michael Paquier wrote:

Thanks, committed. I have noticed an extra one in reorderbuffer.c.

Some grepping found a bit more; patch attached.

Thanks a lot, this is very good. I've got some fixes to do :)

--
Guillaume.

#6Michael Paquier
michael@paquier.xyz
In reply to: Alvaro Herrera (#4)
Re: Quitting the thes

On Wed, Jun 12, 2019 at 02:45:27PM -0400, Alvaro Herrera wrote:

Some grepping found a bit more; patch attached.

Indeed. There were much more. I just got to look with stuff like
that:
find . -name "*.c" | xargs egrep "(\b[a-zA-Z]+) \1\b"

But I did not find any more spots. Indentation is incorrect in
test_integerset.c.
--
Michael

#7Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Michael Paquier (#6)
Re: Quitting the thes

On 2019-Jun-13, Michael Paquier wrote:

On Wed, Jun 12, 2019 at 02:45:27PM -0400, Alvaro Herrera wrote:

Some grepping found a bit more; patch attached.

Indeed. There were much more. I just got to look with stuff like
that:
find . -name "*.c" | xargs egrep "(\b[a-zA-Z]+) \1\b"

This is what I used:
git grep '\<\([a-z_ ]\+\)\> \<\1\>'

But I did not find any more spots. Indentation is incorrect in
test_integerset.c.

Indeed ... fixed.

Thanks for looking,

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#8Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Alvaro Herrera (#3)
Re: Quitting the thes

On 2019-06-12 20:40, Alvaro Herrera wrote:

I noticed a few duplicated words in the .po files. Some of these are
obviously false positives.

The "de" ones were all correct as is, but some of the ones in other
languages do indeed look like typos.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services