Skip to content

Commit ef7002d

Browse files
committed
Fix various typos in code and tests
Most of these are recent, and the documentation portions are new as of v16 so there is no need for a backpatch. Author: Justin Pryzby Discussion: https://postgr.es/m/20230208155644.GM1653@telsasoft.com
1 parent 30b789e commit ef7002d

File tree

20 files changed

+24
-23
lines changed

20 files changed

+24
-23
lines changed

contrib/postgres_fdw/deparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ deparseAnalyzeInfoSql(StringInfo buf, Relation rel)
24122412
*
24132413
* We could also do "ORDER BY random() LIMIT x", which would always pick
24142414
* the expected number of rows, but it requires sorting so it may be much
2415-
* more expensive (particularly on large tables, which is what what the
2415+
* more expensive (particularly on large tables, which is what the
24162416
* remote sampling is meant to improve).
24172417
*/
24182418
void

doc/src/sgml/config.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ include_dir 'conf.d'
718718
<para>
719719
Determines the number of connection <quote>slots</quote> that are
720720
reserved for connections by roles with privileges of the
721-
<link linkend="predefined-roles-table"><literal>pg_used_reserved_connections</literal></link>
721+
<link linkend="predefined-roles-table"><literal>pg_use_reserved_connections</literal></link>
722722
role. Whenever the number of free connection slots is greater than
723723
<xref linkend="guc-superuser-reserved-connections"/> but less than or
724724
equal to the sum of <varname>superuser_reserved_connections</varname>

doc/src/sgml/ref/create_database.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
8989
The role name of the user who will own the new database,
9090
or <literal>DEFAULT</literal> to use the default (namely, the
9191
user executing the command). To create a database owned by another
92-
role, you must must be able to <literal>SET ROLE</literal> to that
92+
role, you must be able to <literal>SET ROLE</literal> to that
9393
role.
9494
</para>
9595
</listitem>

doc/src/sgml/ref/create_schema.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CREATE SCHEMA IF NOT EXISTS AUTHORIZATION <replaceable class="parameter">role_sp
8989
<para>
9090
The role name of the user who will own the new schema. If omitted,
9191
defaults to the user executing the command. To create a schema
92-
owned by another role, you must must be able to
92+
owned by another role, you must be able to
9393
<literal>SET ROLE</literal> to that role.
9494
</para>
9595
</listitem>

src/backend/commands/dbcommands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,7 @@ dbase_redo(XLogReaderState *record)
30903090

30913091
/*
30923092
* There's a case where the copy source directory is missing for the
3093-
* same reason above. Create the emtpy source directory so that
3093+
* same reason above. Create the empty source directory so that
30943094
* copydir below doesn't fail. The directory will be dropped soon by
30953095
* recovery.
30963096
*/

src/backend/executor/execMain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ExecutorStart(QueryDesc *queryDesc, int eflags)
134134
/*
135135
* In some cases (e.g. an EXECUTE statement) a query execution will skip
136136
* parse analysis, which means that the query_id won't be reported. Note
137-
* that it's harmless to report the query_id multiple time, as the call
137+
* that it's harmless to report the query_id multiple times, as the call
138138
* will be ignored if the top level query_id has already been reported.
139139
*/
140140
pgstat_report_query_id(queryDesc->plannedstmt->queryId, false);

src/backend/jit/llvm/llvmjit_inline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ function_inlinable(llvm::Function &F,
753753
/* import referenced function itself */
754754
importVars.insert(referencedFunction->getName());
755755

756-
/* import referenced function and its dependants */
756+
/* import referenced function and its dependents */
757757
for (auto& recImportVar : recImportVars)
758758
importVars.insert(recImportVar.first());
759759
}

src/backend/replication/logical/snapbuild.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
18161816
fsync_fname("pg_logical/snapshots", true);
18171817

18181818
/*
1819-
* Now there's no way we can loose the dumped state anymore, remember this
1819+
* Now there's no way we can lose the dumped state anymore, remember this
18201820
* as a serialization point.
18211821
*/
18221822
builder->last_serialized_snapshot = lsn;

src/backend/replication/walsender.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,9 +2050,9 @@ PhysicalConfirmReceivedLocation(XLogRecPtr lsn)
20502050

20512051
/*
20522052
* One could argue that the slot should be saved to disk now, but that'd
2053-
* be energy wasted - the worst lost information can do here is give us
2054-
* wrong information in a statistics view - we'll just potentially be more
2055-
* conservative in removing files.
2053+
* be energy wasted - the worst thing lost information could cause here is
2054+
* to give wrong information in a statistics view - we'll just potentially
2055+
* be more conservative in removing files.
20562056
*/
20572057
}
20582058

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,8 +2015,9 @@ BaseBackup(char *compression_algorithm, char *compression_detail,
20152015
* If we write the data out to a tar file, it will be named
20162016
* base.tar if it's the main data directory or <tablespaceoid>.tar
20172017
* if it's for another tablespace. CreateBackupStreamer() will
2018-
* arrange to add .gz to the archive name if pg_basebackup is
2019-
* performing compression.
2018+
* arrange to add an extension to the archive name if
2019+
* pg_basebackup is performing compression, depending on the
2020+
* compression type.
20202021
*/
20212022
if (PQgetisnull(res, i, 0))
20222023
{

src/bin/pg_dump/pg_backup_custom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static size_t _CustomReadFunc(ArchiveHandle *AH, char **buf, size_t *buflen);
9999
* It's task is to create any extra archive context (using AH->formatData),
100100
* and to initialize the supported function pointers.
101101
*
102-
* It should also prepare whatever it's input source is for reading/writing,
102+
* It should also prepare whatever its input source is for reading/writing,
103103
* and in the case of a read mode connection, it should load the Header & TOC.
104104
*/
105105
void

src/bin/pg_dump/pg_dumpall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ dumpRoleMembership(PGconn *conn)
995995
fprintf(OPF, "--\n-- Role memberships\n--\n\n");
996996

997997
/*
998-
* We can't dump these GRANT commands in arbitary order, because a role
998+
* We can't dump these GRANT commands in arbitrary order, because a role
999999
* that is named as a grantor must already have ADMIN OPTION on the
10001000
* role for which it is granting permissions, except for the boostrap
10011001
* superuser, who can always be named as the grantor.

src/include/lib/ilist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* operations that can be done without branches (and thus faster) on lists
4040
* that use circular representation. However, it is often convenient to
4141
* initialize list headers to zeroes rather than setting them up with an
42-
* explicit initialization function, so we also allow the NULL initalization.
42+
* explicit initialization function, so we also allow the NULL initialization.
4343
*
4444
* EXAMPLES
4545
*

src/include/partitioning/partdesc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef struct PartitionDescData
3131
int nparts; /* Number of partitions */
3232
bool detached_exist; /* Are there any detached partitions? */
3333
Oid *oids; /* Array of 'nparts' elements containing
34-
* partition OIDs in order of the their bounds */
34+
* partition OIDs in order of their bounds */
3535
bool *is_leaf; /* Array of 'nparts' elements storing whether
3636
* the corresponding 'oids' element belongs to
3737
* a leaf partition or not */

src/include/port/simd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ vector8_ssub(const Vector8 v1, const Vector8 v2)
345345
#endif /* ! USE_NO_SIMD */
346346

347347
/*
348-
* Return a vector with all bits set in each lane where the the corresponding
348+
* Return a vector with all bits set in each lane where the corresponding
349349
* lanes in the inputs are equal.
350350
*/
351351
#ifndef USE_NO_SIMD

src/test/regress/expected/alter_table.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,7 @@ select * from at_view_2;
25662566
drop view at_view_2;
25672567
drop view at_view_1;
25682568
drop table at_base_table;
2569-
-- check adding a column not iself requiring a rewrite, together with
2569+
-- check adding a column not itself requiring a rewrite, together with
25702570
-- a column requiring a default (bug #16038)
25712571
-- ensure that rewrites aren't silently optimized away, removing the
25722572
-- value of the test

src/test/regress/expected/create_procedure.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SELECT * FROM cp_test ORDER BY b COLLATE "C";
100100
1 | xyzzy
101101
(4 rows)
102102

103-
-- utitlity functions currently not supported here
103+
-- utility functions currently not supported here
104104
CREATE PROCEDURE ptestx()
105105
LANGUAGE SQL
106106
BEGIN ATOMIC

src/test/regress/sql/alter_table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ drop view at_view_2;
16351635
drop view at_view_1;
16361636
drop table at_base_table;
16371637

1638-
-- check adding a column not iself requiring a rewrite, together with
1638+
-- check adding a column not itself requiring a rewrite, together with
16391639
-- a column requiring a default (bug #16038)
16401640

16411641
-- ensure that rewrites aren't silently optimized away, removing the

src/test/regress/sql/create_procedure.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ CALL ptest1s('b');
4242

4343
SELECT * FROM cp_test ORDER BY b COLLATE "C";
4444

45-
-- utitlity functions currently not supported here
45+
-- utility functions currently not supported here
4646
CREATE PROCEDURE ptestx()
4747
LANGUAGE SQL
4848
BEGIN ATOMIC

src/test/subscription/t/031_column_list.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@
10341034
4|5|6),
10351035
'two publications, publishing the same relation');
10361036

1037-
# Now resync the subcription, but with publications in the opposite order.
1037+
# Now resync the subscription, but with publications in the opposite order.
10381038
# The result should be the same.
10391039

10401040
$node_subscriber->safe_psql(

0 commit comments

Comments
 (0)