Re: typo in couple of places - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: typo in couple of places
Date
Msg-id 87fs2nok02.fsf@wibble.ilmari.org
Whole thread Raw
In response to typo in couple of places  (vignesh C <vignesh21@gmail.com>)
Responses Re: typo in couple of places
Re: typo in couple of places
List pgsql-hackers
vignesh C <vignesh21@gmail.com> writes:

> Hi,
>
> I noticed a couple of typos in code. "the the" should have been "the",
> attached patch has the changes for the same.

This made me curious about other duplicate word occurrences, and after a
few minutes of increasingly-elaborate regexing to exclude false
postives, I found a few more (plus a bonus a _missing_ "the").  See the
attached patch (which includes your originl one, for completeness).

> Regards,
> Vignesh

- ilmari

From 758e890b3c259f242f3ff6fe4b0bfc48d8d48dcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Fri, 6 Oct 2023 12:55:52 +0100
Subject: [PATCH] Fix duplicate words in docs and code comments

And add a missing "the" in a couple of places.
---
 .cirrus.star                              | 2 +-
 contrib/citext/expected/citext_utf8.out   | 2 +-
 contrib/citext/expected/citext_utf8_1.out | 2 +-
 contrib/citext/sql/citext_utf8.sql        | 2 +-
 doc/src/sgml/logical-replication.sgml     | 2 +-
 doc/src/sgml/ref/create_subscription.sgml | 2 +-
 src/backend/access/nbtree/nbtsearch.c     | 8 ++++----
 src/backend/access/transam/xlogreader.c   | 2 +-
 src/backend/executor/nodeHashjoin.c       | 2 +-
 src/test/regress/expected/tuplesort.out   | 4 ++--
 src/test/regress/sql/tuplesort.sql        | 4 ++--
 11 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/.cirrus.star b/.cirrus.star
index d2d6ceca20..36233872d1 100644
--- a/.cirrus.star
+++ b/.cirrus.star
@@ -46,7 +46,7 @@ def main():
 
 def config_from(config_src):
     """return contents of config file `config_src`, surrounded by markers
-    indicating start / end of the the included file
+    indicating start / end of the included file
     """
 
     config_contents = fs.read(config_src)
diff --git a/contrib/citext/expected/citext_utf8.out b/contrib/citext/expected/citext_utf8.out
index 6630e09a4d..5d988dcd48 100644
--- a/contrib/citext/expected/citext_utf8.out
+++ b/contrib/citext/expected/citext_utf8.out
@@ -2,7 +2,7 @@
  * This test must be run in a database with UTF-8 encoding
  * and a Unicode-aware locale.
  *
- * Also disable this file for ICU, because the test for the the
+ * Also disable this file for ICU, because the test for the
  * Turkish dotted I is not correct for many ICU locales. citext always
  * uses the default collation, so it's not easy to restrict the test
  * to the "tr-TR-x-icu" collation where it will succeed.
diff --git a/contrib/citext/expected/citext_utf8_1.out b/contrib/citext/expected/citext_utf8_1.out
index 3caa7a00d4..7065a5da19 100644
--- a/contrib/citext/expected/citext_utf8_1.out
+++ b/contrib/citext/expected/citext_utf8_1.out
@@ -2,7 +2,7 @@
  * This test must be run in a database with UTF-8 encoding
  * and a Unicode-aware locale.
  *
- * Also disable this file for ICU, because the test for the the
+ * Also disable this file for ICU, because the test for the
  * Turkish dotted I is not correct for many ICU locales. citext always
  * uses the default collation, so it's not easy to restrict the test
  * to the "tr-TR-x-icu" collation where it will succeed.
diff --git a/contrib/citext/sql/citext_utf8.sql b/contrib/citext/sql/citext_utf8.sql
index 1f51df134b..34b232d64e 100644
--- a/contrib/citext/sql/citext_utf8.sql
+++ b/contrib/citext/sql/citext_utf8.sql
@@ -2,7 +2,7 @@
  * This test must be run in a database with UTF-8 encoding
  * and a Unicode-aware locale.
  *
- * Also disable this file for ICU, because the test for the the
+ * Also disable this file for ICU, because the test for the
  * Turkish dotted I is not correct for many ICU locales. citext always
  * uses the default collation, so it's not easy to restrict the test
  * to the "tr-TR-x-icu" collation where it will succeed.
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index fbf8ad669e..3b2fa1129e 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -1788,7 +1788,7 @@
   </para>
 
   <para>
-   To create a subscription, the user must have the privileges of the
+   To create a subscription, the user must have the privileges of
    the <literal>pg_create_subscription</literal> role, as well as
    <literal>CREATE</literal> privileges on the database.
   </para>
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index 71652fd918..c1bafbfa06 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -51,7 +51,7 @@
   </para>
 
   <para>
-   To be able to create a subscription, you must have the privileges of the
+   To be able to create a subscription, you must have the privileges of
    the <literal>pg_create_subscription</literal> role, as well as
    <literal>CREATE</literal> privileges on the current database.
   </para>
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c
index c47eaed0e9..efc5284e5b 100644
--- a/src/backend/access/nbtree/nbtsearch.c
+++ b/src/backend/access/nbtree/nbtsearch.c
@@ -1664,8 +1664,8 @@ _bt_readpage(IndexScanDesc scan, ScanDirection dir, OffsetNumber offnum)
 
             /*
              * If the result of prechecking required keys was true, then in
-             * assert-enabled builds we also recheck that _bt_checkkeys()
-             * result is is the same.
+             * assert-enabled builds we also recheck that the _bt_checkkeys()
+             * result is the same.
              */
             Assert(!requiredMatchedByPrecheck ||
                    passes_quals == _bt_checkkeys(scan, itup, indnatts, dir,
@@ -1783,8 +1783,8 @@ _bt_readpage(IndexScanDesc scan, ScanDirection dir, OffsetNumber offnum)
 
             /*
              * If the result of prechecking required keys was true, then in
-             * assert-enabled builds we also recheck that _bt_checkkeys()
-             * result is is the same.
+             * assert-enabled builds we also recheck that the _bt_checkkeys()
+             * result is the same.
              */
             Assert(!requiredMatchedByPrecheck ||
                    passes_quals == _bt_checkkeys(scan, itup, indnatts, dir,
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index a1363e3b8f..e0baa86bd3 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -846,7 +846,7 @@ XLogDecodeNextRecord(XLogReaderState *state, bool nonblocking)
 
     /*
      * If we got here without a DecodedXLogRecord, it means we needed to
-     * validate total_len before trusting it, but by now now we've done that.
+     * validate total_len before trusting it, but by now we've done that.
      */
     if (decoded == NULL)
     {
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index aea44a9d56..25a2d78f15 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -1306,7 +1306,7 @@ ExecParallelHashJoinNewBatch(HashJoinState *hjstate)
  * The data recorded in the file for each tuple is its hash value,
  * then the tuple in MinimalTuple format.
  *
- * fileptr points to a batch file in one of the the hashtable arrays.
+ * fileptr points to a batch file in one of the hashtable arrays.
  *
  * The batch files (and their buffers) are allocated in the spill context
  * created for the hashtable.
diff --git a/src/test/regress/expected/tuplesort.out b/src/test/regress/expected/tuplesort.out
index a2efa179fc..0e8b5bf4a3 100644
--- a/src/test/regress/expected/tuplesort.out
+++ b/src/test/regress/expected/tuplesort.out
@@ -401,7 +401,7 @@ FETCH NEXT FROM c;
  00000000-0000-0000-0000-000000000000
 (1 row)
 
--- scroll beyond end end
+-- scroll beyond end
 FETCH LAST FROM c;
  noabort_decreasing 
 --------------------
@@ -498,7 +498,7 @@ FETCH NEXT FROM c;
  00000000-0000-0000-0000-000000000000
 (1 row)
 
--- scroll beyond end end
+-- scroll beyond end
 FETCH LAST FROM c;
  noabort_decreasing 
 --------------------
diff --git a/src/test/regress/sql/tuplesort.sql b/src/test/regress/sql/tuplesort.sql
index 846484d561..658fe98dc5 100644
--- a/src/test/regress/sql/tuplesort.sql
+++ b/src/test/regress/sql/tuplesort.sql
@@ -169,7 +169,7 @@ FETCH BACKWARD FROM c;
 FETCH BACKWARD FROM c;
 FETCH NEXT FROM c;
 
--- scroll beyond end end
+-- scroll beyond end
 FETCH LAST FROM c;
 FETCH BACKWARD FROM c;
 FETCH NEXT FROM c;
@@ -200,7 +200,7 @@ FETCH BACKWARD FROM c;
 FETCH BACKWARD FROM c;
 FETCH NEXT FROM c;
 
--- scroll beyond end end
+-- scroll beyond end
 FETCH LAST FROM c;
 FETCH BACKWARD FROM c;
 FETCH NEXT FROM c;
-- 
2.39.2


pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: pg16: invalid page/page verification failed
Next
From: Dmitry Dolgov
Date:
Subject: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE