]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix misc typos, mostly in comments
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 8 Jan 2026 16:10:08 +0000 (18:10 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 8 Jan 2026 16:10:08 +0000 (18:10 +0200)
The only user-visible change is the fix in the "malformed
pg_dependencies" error detail. That one is new in commit e1405aa5e3ac,
so no backpatching required.

20 files changed:
src/backend/replication/slot.c
src/backend/storage/aio/aio_init.c
src/backend/storage/ipc/waiteventset.c
src/backend/tcop/postgres.c
src/backend/utils/adt/pg_dependencies.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/cache/typcache.c
src/backend/utils/init/postinit.c
src/common/unicode_norm.c
src/include/lib/ilist.h
src/interfaces/libpq/t/004_load_balance_dns.pl
src/test/regress/expected/foreign_key.out
src/test/regress/expected/lock.out
src/test/regress/expected/partition_join.out
src/test/regress/expected/pg_dependencies.out
src/test/regress/expected/without_overlaps.out
src/test/regress/sql/foreign_key.sql
src/test/regress/sql/lock.sql
src/test/regress/sql/partition_join.sql
src/test/regress/sql/without_overlaps.sql

index f8f0c1e2fc0a309418c9f08f241cef14157c8722..4c47261c7f913dbc9fab5691316c646a2dd9d8de 100644 (file)
@@ -2919,7 +2919,7 @@ GetSlotInvalidationCause(const char *cause_name)
 }
 
 /*
- * Maps an ReplicationSlotInvalidationCause to the invalidation
+ * Maps a ReplicationSlotInvalidationCause to the invalidation
  * reason for a replication slot.
  */
 const char *
index 854bdab57af2e433fe9c64a4d02872fa465fe940..d3c68d8b04c1656f6a60289f6e7af8f0ab3a115f 100644 (file)
@@ -39,8 +39,8 @@ AioProcs(void)
 {
        /*
         * While AIO workers don't need their own AIO context, we can't currently
-        * guarantee nothing gets assigned to the a ProcNumber for an IO worker if
-        * we just subtracted MAX_IO_WORKERS.
+        * guarantee that nothing gets assigned to an IO worker's ProcNumber if we
+        * just subtracted MAX_IO_WORKERS.
         */
        return MaxBackends + NUM_AUXILIARY_PROCS;
 }
index 4cb12e255afab9674c08be38600efcb19031e693..772e350a0c06f38f7172b688c627137edd23ec37 100644 (file)
@@ -1531,15 +1531,15 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
                                 (cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL)))
                {
                        /*
-                        * We expect an POLLHUP when the remote end is closed, but because
+                        * We expect a POLLHUP when the remote end is closed, but because
                         * we don't expect the pipe to become readable or to have any
                         * errors either, treat those cases as postmaster death, too.
                         *
                         * Be paranoid about a spurious event signaling the postmaster as
                         * being dead.  There have been reports about that happening with
                         * older primitives (select(2) to be specific), and a spurious
-                        * WL_POSTMASTER_DEATH event would be painful. Re-checking doesn't
-                        * cost much.
+                        * WL_POSTMASTER_DEATH event would be painful.  Re-checking
+                        * doesn't cost much.
                         */
                        if (!PostmasterIsAliveInternal())
                        {
index 015c67bbebac476abe77c1a2a59fdb7f9ea16770..e54bf1e760f5029bb02967a6178f3b5a0368ca71 100644 (file)
@@ -4364,7 +4364,7 @@ PostgresMain(const char *dbname, const char *username)
        /*
         * Create memory context and buffer used for RowDescription messages. As
         * SendRowDescriptionMessage(), via exec_describe_statement_message(), is
-        * frequently executed for ever single statement, we don't want to
+        * frequently executed for every single statement, we don't want to
         * allocate a separate buffer every time.
         */
        row_description_context = AllocSetContextCreate(TopMemoryContext,
index c5aef9ee9a5800396383a772c6c02425389e972f..d8bd1c4a168cf0a2ae200bd390995784f495916d 100644 (file)
@@ -298,7 +298,7 @@ dependencies_array_end(void *state)
                        errsave(parse->escontext,
                                        errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
                                        errmsg("malformed pg_dependencies: \"%s\"", parse->str),
-                                       errdetail("The \"%s\" key must be an non-empty array.",
+                                       errdetail("The \"%s\" key must be a non-empty array.",
                                                          PG_DEPENDENCIES_KEY_ATTRIBUTES));
                        break;
 
index 416f1a21ae45bbfc98ba1701ffac20b779e77585..033b625f3fc11db98d34c14d0a510f3ca96792fd 100644 (file)
@@ -9661,7 +9661,7 @@ get_rule_expr(Node *node, deparse_context *context,
                                bool            need_parens;
 
                                /*
-                                * Parenthesize the argument unless it's an SubscriptingRef or
+                                * Parenthesize the argument unless it's a SubscriptingRef or
                                 * another FieldSelect.  Note in particular that it would be
                                 * WRONG to not parenthesize a Var argument; simplicity is not
                                 * the issue here, having the right number of names is.
index 81f6b06445facf82db5df983b5746058ef0ab2e2..96bbd64de2c8da4d3a1a60cfa04cd5682252fac4 100644 (file)
@@ -2429,7 +2429,7 @@ TypeCacheRelCallback(Datum arg, Oid relid)
                RelIdToTypeIdCacheEntry *relentry;
 
                /*
-                * Find an RelIdToTypeIdCacheHash entry, which should exist as soon as
+                * Find a RelIdToTypeIdCacheHash entry, which should exist as soon as
                 * corresponding typcache entry has something to clean.
                 */
                relentry = (RelIdToTypeIdCacheEntry *) hash_search(RelIdToTypeIdCacheHash,
index 52c05a9d1d594f6c6525d8a61dd53394832f46f2..3f401faf3de1b7954f5168ef6ee2f315aab344b9 100644 (file)
@@ -816,9 +816,9 @@ InitPostgres(const char *in_dbname, Oid dboid,
        RelationCacheInitializePhase2();
 
        /*
-        * Set up process-exit callback to do pre-shutdown cleanup.  This is the
-        * one of the first before_shmem_exit callbacks we register; thus, this
-        * will be one the last things we do before low-level modules like the
+        * Set up process-exit callback to do pre-shutdown cleanup.  This is one
+        * of the first before_shmem_exit callbacks we register; thus, this will
+        * be one of the last things we do before low-level modules like the
         * buffer manager begin to close down.  We need to have this in place
         * before we begin our first transaction --- if we fail during the
         * initialization transaction, as is entirely possible, we need the
index 35cd949a3db4a014c92068a36c336f3a8d903568..238002e6a33523ec5c0f2896429bb2c9dba81932 100644 (file)
@@ -114,7 +114,7 @@ get_canonical_class(char32_t code)
        const pg_unicode_decomposition *entry = get_code_entry(code);
 
        /*
-        * If no entries are found, the character used is either an Hangul
+        * If no entries are found, the character used is either a Hangul
         * character or a character with a class of 0 and no decompositions.
         */
        if (!entry)
index 7e37400d38f0410e2b59ac1d4c1221d4f3876db6..d49ec0ffbc5f35f9a6e6ad6178e86114a6f0c130 100644 (file)
@@ -517,7 +517,7 @@ dlist_has_prev(const dlist_head *head, const dlist_node *node)
 
 /*
  * Check if node is detached. A node is only detached if it either has been
- * initialized with dlist_init_node(), or deleted with
+ * initialized with dlist_node_init(), or deleted with
  * dlist_delete_thoroughly() / dlist_delete_from_thoroughly() /
  * dclist_delete_from_thoroughly().
  */
index 210ec1ff51732c87a187563c9e12050cc139f5e5..e1ff9a060248080efd9b5c0e3e2ced4a77fb5495 100644 (file)
@@ -126,7 +126,7 @@ $node2->stop();
 # working one.
 $node3->connect_ok(
        "host=pg-loadbalancetest port=$port load_balance_hosts=disable",
-       "load_balance_hosts=disable continues until it connects to the a working node",
+       "load_balance_hosts=disable continues until it connects to a working node",
        sql => "SELECT 'connect3'",
        log_like => [qr/statement: SELECT 'connect3'/]);
 
@@ -136,7 +136,7 @@ foreach my $i (1 .. 5)
 {
        $node3->connect_ok(
                "host=pg-loadbalancetest port=$port load_balance_hosts=random",
-               "load_balance_hosts=random continues until it connects to the a working node",
+               "load_balance_hosts=random continues until it connects to a working node",
                sql => "SELECT 'connect4'",
                log_like => [qr/statement: SELECT 'connect4'/]);
 }
index 7f9e0ebb82d654d66085e8b5bf6938c5e44ef935..9ae4dbf1b0a36ca218057ffb90eb03de4ce00f0d 100644 (file)
@@ -3432,7 +3432,7 @@ CREATE TABLE fkpart13_t3 (
 INSERT INTO fkpart13_t1 (a) VALUES (1);
 INSERT INTO fkpart13_t2 (part_id) VALUES (1);
 INSERT INTO fkpart13_t3 (a) VALUES (1);
--- Test a cascading update works correctly with with the dropped column
+-- Test that a cascading update works correctly with the dropped column
 UPDATE fkpart13_t1 SET a = 2 WHERE a = 1;
 SELECT tableoid::regclass,* FROM fkpart13_t2;
     tableoid    | part_id 
index ad137d3645d0c356b225ca7a7f5ee5d18d8c014d..f8d53c40871dfc6596c2aa18ea3f9fdf7f4ce69b 100644 (file)
@@ -114,7 +114,7 @@ select relname from pg_locks l, pg_class c
 ROLLBACK;
 BEGIN TRANSACTION;
 LOCK TABLE lock_view6 IN EXCLUSIVE MODE;
--- lock_view6 an lock_tbl1 are locked.
+-- lock_view6 and lock_tbl1 are locked.
 select relname from pg_locks l, pg_class c
  where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock'
  order by relname;
index c6301744fc75a58ccbe0ae842faa4fd95599a4e3..f6d3ade368a3676e558398d9895501bafaf61f4b 100644 (file)
@@ -63,7 +63,7 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b =
 (4 rows)
 
 -- inner join with partially-redundant join clauses
--- (avoid a mergejoin, because the planner thinks that an non-partitionwise
+-- (avoid a mergejoin, because the planner thinks that a non-partitionwise
 -- merge join is the cheapest plan, and we want to test a partitionwise join)
 BEGIN;
 SET LOCAL enable_mergejoin = false;
index 04641f81d13fa96924cea8b1b92229760895c1cd..f619982a691d68f4ac47c7ef46e04a75bde9bea4 100644 (file)
@@ -295,16 +295,16 @@ SELECT '[{"attributes": [], "dependency": 2, "degree": 1}]' ::pg_dependencies;
 ERROR:  malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]"
 LINE 1: SELECT '[{"attributes": [], "dependency": 2, "degree": 1}]' ...
                ^
-DETAIL:  The "attributes" key must be an non-empty array.
+DETAIL:  The "attributes" key must be a non-empty array.
 SELECT '[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]'::pg_dependencies;
 ERROR:  malformed pg_dependencies: "[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]"
 LINE 1: SELECT '[{"attributes" : {"a": 1}, "dependency" : 4, "degree...
                ^
 DETAIL:  Value of "attributes" must be an array of attribute numbers.
 SELECT * FROM pg_input_error_info('[{"attributes": [], "dependency": 2, "degree": 1}]', 'pg_dependencies');
-                                     message                                     |                      detail                      | hint | sql_error_code 
----------------------------------------------------------------------------------+--------------------------------------------------+------+----------------
- malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]" | The "attributes" key must be an non-empty array. |      | 22P02
+                                     message                                     |                     detail                      | hint | sql_error_code 
+---------------------------------------------------------------------------------+-------------------------------------------------+------+----------------
+ malformed pg_dependencies: "[{"attributes": [], "dependency": 2, "degree": 1}]" | The "attributes" key must be a non-empty array. |      | 22P02
 (1 row)
 
 SELECT * FROM pg_input_error_info('[{"attributes" : {"a": 1}, "dependency" : 4, "degree": "1.2"}]', 'pg_dependencies');
index f3144bdc39c2141f691b925bc2a6c6ee9a98feb6..06f6fd2c8c5621f86ba0aa3766939dec6f8c110a 100644 (file)
@@ -912,7 +912,7 @@ CREATE TABLE temporal_partitioned (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
@@ -947,7 +947,7 @@ CREATE TABLE temporal_partitioned (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
@@ -2260,7 +2260,7 @@ CREATE TABLE temporal_partitioned_rng (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 partition OF temporal_partitioned_rng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)');
 CREATE TABLE tp2 partition OF temporal_partitioned_rng FOR VALUES IN ('[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)');
@@ -2382,7 +2382,7 @@ CREATE TABLE temporal_partitioned_mltrng (
   id int4range,
   valid_at datemultirange,
   name text,
-  CONSTRAINT temporal_paritioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)', '[13,14)', '[15,16)', '[17,18)', '[19,20)', '[21,22)', '[23,24)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[0,1)', '[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)', '[14,15)', '[16,17)', '[18,19)', '[20,21)', '[22,23)', '[24,25)');
index 4a6172b8e56d85e33075add367ab632ecfe99316..3b8c95bf89366432b664e357ff5c3eaef56446f3 100644 (file)
@@ -2421,7 +2421,7 @@ INSERT INTO fkpart13_t1 (a) VALUES (1);
 INSERT INTO fkpart13_t2 (part_id) VALUES (1);
 INSERT INTO fkpart13_t3 (a) VALUES (1);
 
--- Test a cascading update works correctly with with the dropped column
+-- Test that a cascading update works correctly with the dropped column
 UPDATE fkpart13_t1 SET a = 2 WHERE a = 1;
 SELECT tableoid::regclass,* FROM fkpart13_t2;
 SELECT tableoid::regclass,* FROM fkpart13_t3;
index b88488c6d0ff4527da53f49b703e3850d00349ca..e78d79eee32b16170532966fab438b538b0dc7d6 100644 (file)
@@ -85,7 +85,7 @@ select relname from pg_locks l, pg_class c
 ROLLBACK;
 BEGIN TRANSACTION;
 LOCK TABLE lock_view6 IN EXCLUSIVE MODE;
--- lock_view6 an lock_tbl1 are locked.
+-- lock_view6 and lock_tbl1 are locked.
 select relname from pg_locks l, pg_class c
  where l.relation = c.oid and relname like '%lock_%' and mode = 'ExclusiveLock'
  order by relname;
index 19a6d19a99c91a131f9ea17fd7d230b79e356ea5..c4549fc1ad8e7292e2d1a62d5975af590b6aae7c 100644 (file)
@@ -35,7 +35,7 @@ SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b =
 SELECT t1.a, t1.c, t2.b, t2.c FROM prt1 t1, prt2 t2 WHERE t1.a = t2.b AND t1.b = 0 ORDER BY t1.a, t2.b;
 
 -- inner join with partially-redundant join clauses
--- (avoid a mergejoin, because the planner thinks that an non-partitionwise
+-- (avoid a mergejoin, because the planner thinks that a non-partitionwise
 -- merge join is the cheapest plan, and we want to test a partitionwise join)
 BEGIN;
 SET LOCAL enable_mergejoin = false;
index 4aaca242bbece491e0479e917ec4ae12dedf1b83..77be695357565f07421c126cfa540dfbe9d7e827 100644 (file)
@@ -659,7 +659,7 @@ CREATE TABLE temporal_partitioned (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
@@ -677,7 +677,7 @@ CREATE TABLE temporal_partitioned (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_uq UNIQUE (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned FOR VALUES IN ('[1,2)', '[2,3)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned FOR VALUES IN ('[3,4)', '[4,5)');
@@ -1769,7 +1769,7 @@ CREATE TABLE temporal_partitioned_rng (
   id int4range,
   valid_at daterange,
   name text,
-  CONSTRAINT temporal_paritioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_rng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 partition OF temporal_partitioned_rng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)');
 CREATE TABLE tp2 partition OF temporal_partitioned_rng FOR VALUES IN ('[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)');
@@ -1899,7 +1899,7 @@ CREATE TABLE temporal_partitioned_mltrng (
   id int4range,
   valid_at datemultirange,
   name text,
-  CONSTRAINT temporal_paritioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
+  CONSTRAINT temporal_partitioned_mltrng_pk PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
 ) PARTITION BY LIST (id);
 CREATE TABLE tp1 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[1,2)', '[3,4)', '[5,6)', '[7,8)', '[9,10)', '[11,12)', '[13,14)', '[15,16)', '[17,18)', '[19,20)', '[21,22)', '[23,24)');
 CREATE TABLE tp2 PARTITION OF temporal_partitioned_mltrng FOR VALUES IN ('[0,1)', '[2,3)', '[4,5)', '[6,7)', '[8,9)', '[10,11)', '[12,13)', '[14,15)', '[16,17)', '[18,19)', '[20,21)', '[22,23)', '[24,25)');