Skip to content

Commit 33ab0a2

Browse files
committed
Fix typos in comments, code and documentation
While on it, newlines are removed from the end of two elog() strings. The others are simple grammar mistakes. One comment in pg_upgrade referred incorrectly to sequences since a7e5457. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Backpatch-through: 11
1 parent 92957ed commit 33ab0a2

File tree

23 files changed

+37
-38
lines changed

23 files changed

+37
-38
lines changed

.cirrus.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
CONTAINER_REPO: us-docker.pkg.dev/${GCP_PROJECT}/ci
1212

1313
# The lower depth accelerates git clone. Use a bit of depth so that
14-
# concurrent tasks and retrying older jobs has a chance of working.
14+
# concurrent tasks and retrying older jobs have a chance of working.
1515
CIRRUS_CLONE_DEPTH: 500
1616
# Useful to be able to analyse what in a script takes long
1717
CIRRUS_LOG_TIMESTAMP: true
@@ -47,7 +47,7 @@ on_failure_meson: &on_failure_meson
4747

4848
# In theory it'd be nice to upload the junit files meson generates, so that
4949
# cirrus will nicely annotate the commit. Unfortunately the files don't
50-
# contain identifieable file + line numbers right now, so the annotations
50+
# contain identifiable file + line numbers right now, so the annotations
5151
# don't end up useful. We could probably improve on that with a some custom
5252
# conversion script, but ...
5353
meson_log_artifacts:
@@ -160,7 +160,7 @@ task:
160160
161161
ccache_cache:
162162
folder: $CCACHE_DIR
163-
# Workaround around performance issues due to 32KB block size
163+
# Work around performance issues due to 32KB block size
164164
repartition_script: src/tools/ci/gcp_freebsd_repartition.sh
165165
create_user_script: |
166166
pw useradd postgres
@@ -251,7 +251,7 @@ task:
251251
DEBUGINFOD_URLS: "https://debuginfod.debian.net"
252252

253253
# Enable a reasonable set of sanitizers. Use the linux task for that, as
254-
# it one of the fastest tasks (without sanitizers). Also several of the
254+
# it's one of the fastest tasks (without sanitizers). Also several of the
255255
# sanitizers work best on linux.
256256
#
257257
# The overhead of alignment sanitizer is low, undefined behaviour has
@@ -600,7 +600,7 @@ task:
600600
CCACHE_MAXSIZE: "500M"
601601
CCACHE_SLOPPINESS: pch_defines,time_macros
602602
CCACHE_DEPEND: 1
603-
# for some reason mingw plpython cannot find it's installation without this
603+
# for some reason mingw plpython cannot find its installation without this
604604
PYTHONHOME: C:/msys64/ucrt64
605605
# prevents MSYS bash from resetting error mode
606606
MSYS: winjitdebug

doc/src/sgml/auto-explain.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ LOAD 'auto_explain';
7373
<listitem>
7474
<para>
7575
<varname>auto_explain.log_parameter_max_length</varname> controls the
76-
logging of query parameter values. A value of<literal>-1</literal> (the
76+
logging of query parameter values. A value of <literal>-1</literal> (the
7777
default) logs the parameter values in full. <literal>0</literal> disables
7878
logging of parameter values. A value greater than zero truncates each
7979
parameter value to that many bytes. Only superusers can change this

doc/src/sgml/parallel.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
128128

129129
<para>
130130
In addition, the system must not be running in single-user mode. Since
131-
the entire database system is running in single process in this situation,
131+
the entire database system is running as a single process in this situation,
132132
no background workers will be available.
133133
</para>
134134

doc/src/sgml/ref/alter_table.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
10051005
constraint. This does not work, however, if any of the partition keys
10061006
is an expression and the partition does not accept
10071007
<literal>NULL</literal> values. If attaching a list partition that will
1008-
not accept <literal>NULL</literal> values, also add
1008+
not accept <literal>NULL</literal> values, also add a
10091009
<literal>NOT NULL</literal> constraint to the partition key column,
10101010
unless it's an expression.
10111011
</para>
@@ -1377,7 +1377,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
13771377
type or an unconstrained domain over the new type, a table rewrite is not
13781378
needed. However, indexes must always be rebuilt unless the system can
13791379
verify that the new index would be logically equivalent to the existing
1380-
one. For example, if the collation for a column has been changed an index
1380+
one. For example, if the collation for a column has been changed, an index
13811381
rebuild is always required because the new sort order might be different.
13821382
However, in the absence of a collation change, a column can be changed
13831383
from <type>text</type> to <type>varchar</type> (or vice versa) without

doc/src/sgml/ref/create_subscription.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
383383
<literal>FOR TABLES IN SCHEMA</literal>, rows are always published
384384
regardless of the definition of the other expressions.
385385
If the subscriber is a <productname>PostgreSQL</productname> version before
386-
15 then any row filtering is ignored during the initial data synchronization
386+
15, then any row filtering is ignored during the initial data synchronization
387387
phase. For this case, the user might want to consider deleting any initially
388388
copied data that would be incompatible with subsequent filtering.
389389
Because initial data synchronization does not take into account the publication

doc/src/sgml/ref/grant.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ GRANT <replaceable class="parameter">role_name</replaceable> [, ...] TO <replace
253253
in a role to one or more other roles. Membership in a role is significant
254254
because it potentially allows access to the privileges granted to a role
255255
to each of its members, and potentially also the ability to make changes
256-
to the role itself. However, the actual permisions conferred depend on
256+
to the role itself. However, the actual permissions conferred depend on
257257
the options associated with the grant.
258258
</para>
259259

doc/src/sgml/sources.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -935,8 +935,8 @@ BETTER: unrecognized node type: 42
935935
<simplesect>
936936
<title>Function-Like Macros and Inline Functions</title>
937937
<para>
938-
Both, macros with arguments and <literal>static inline</literal>
939-
functions, may be used. The latter are preferable if there are
938+
Both macros with arguments and <literal>static inline</literal>
939+
functions may be used. The latter are preferable if there are
940940
multiple-evaluation hazards when written as a macro, as e.g., the
941941
case with
942942
<programlisting>

doc/src/sgml/syntax.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ $function$
722722

723723
<note>
724724
<para>
725-
Nondecimal integer constants are currently only supported in the range
725+
Non-decimal integer constants are currently only supported in the range
726726
of the <type>bigint</type> type (see <xref
727727
linkend="datatype-numeric-table"/>).
728728
</para>

meson.build

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ project('postgresql',
2121
'buildtype=release',
2222
# For compatibility with the autoconf build, set a default prefix. This
2323
# works even on windows, where it's a drive-relative path (i.e. when on
24-
# d:/sompath it'll install to d:/usr/local/pgsql)
24+
# d:/somepath it'll install to d:/usr/local/pgsql)
2525
'prefix=/usr/local/pgsql',
2626
]
2727
)
@@ -1078,7 +1078,7 @@ if not get_option('readline').disabled()
10781078

10791079
if not at_least_one_header_found
10801080
error('''readline header not found
1081-
If you have @0@ already installed, see see meson-log/meson-log.txt for details on the
1081+
If you have @0@ already installed, see meson-log/meson-log.txt for details on the
10821082
failure. It is possible the compiler isn't looking in the proper directory.
10831083
Use -Dreadline=false to disable readline support.'''.format(readline_dep))
10841084
endif

src/backend/access/common/bufmask.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mask_unused_space(Page page)
7878
if (pd_lower > pd_upper || pd_special < pd_upper ||
7979
pd_lower < SizeOfPageHeaderData || pd_special > BLCKSZ)
8080
{
81-
elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u\n",
81+
elog(ERROR, "invalid page pd_lower %u pd_upper %u pd_special %u",
8282
pd_lower, pd_upper, pd_special);
8383
}
8484

src/backend/access/spgist/spgutils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ spgproperty(Oid index_oid, int attno,
13011301
/*
13021302
* Currently, SP-GiST distance-ordered scans require that there be a
13031303
* distance operator in the opclass with the default types. So we assume
1304-
* that if such a operator exists, then there's a reason for it.
1304+
* that if such an operator exists, then there's a reason for it.
13051305
*/
13061306

13071307
/* First we need to know the column's opclass. */

src/backend/jit/llvm/llvmjit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ llvm_session_initialize(void)
816816

817817
if (LLVMGetTargetFromTriple(llvm_triple, &llvm_targetref, &error) != 0)
818818
{
819-
elog(FATAL, "failed to query triple %s\n", error);
819+
elog(FATAL, "failed to query triple %s", error);
820820
}
821821

822822
/*

src/backend/optimizer/util/tlist.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target)
865865
*
866866
* The outputs of this function are two parallel lists, one a list of
867867
* PathTargets and the other an integer list of bool flags indicating
868-
* whether the corresponding PathTarget contains any evaluatable SRFs.
868+
* whether the corresponding PathTarget contains any evaluable SRFs.
869869
* The lists are given in the order they'd need to be evaluated in, with
870870
* the "lowest" PathTarget first. So the last list entry is always the
871871
* originally given PathTarget, and any entries before it indicate evaluation

src/backend/utils/adt/ruleutils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11391,7 +11391,7 @@ get_opclass_name(Oid opclass, Oid actual_datatype,
1139111391

1139211392
/*
1139311393
* generate_opclass_name
11394-
* Compute the name to display for a opclass specified by OID
11394+
* Compute the name to display for an opclass specified by OID
1139511395
*
1139611396
* The result includes all necessary quoting and schema-prefixing.
1139711397
*/

src/backend/utils/misc/guc_internal.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/*--------------------------------------------------------------------
2-
* guc_internals.h
2+
* guc_internal.h
33
*
44
* Declarations shared between backend/utils/misc/guc.c and
55
* backend/utils/misc/guc-file.l
66
*
77
* Copyright (c) 2000-2023, PostgreSQL Global Development Group
88
*
9-
* src/include/utils/guc_internals.h
9+
* src/include/utils/guc_internal.h
1010
*--------------------------------------------------------------------
1111
*/
12-
#ifndef GUC_INTERNALS_H
13-
#define GUC_INTERNALS_H
12+
#ifndef GUC_INTERNAL_H
13+
#define GUC_INTERNAL_H
1414

1515
#include "utils/guc.h"
1616

@@ -23,4 +23,4 @@ extern void record_config_file_error(const char *errmsg,
2323
ConfigVariable **head_p,
2424
ConfigVariable **tail_p);
2525

26-
#endif /* GUC_INTERNALS_H */
26+
#endif /* GUC_INTERNAL_H */

src/bin/pg_dump/pg_dumpall.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ dumpRoleMembership(PGconn *conn)
10341034
ht = rolename_create(remaining, NULL);
10351035

10361036
/*
1037-
* Make repeated passses over the grants for this role until all have
1037+
* Make repeated passes over the grants for this role until all have
10381038
* been dumped.
10391039
*/
10401040
while (remaining > 0)

src/bin/pg_upgrade/info.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,10 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
408408
query[0] = '\0'; /* initialize query string to empty */
409409

410410
/*
411-
* Create a CTE that collects OIDs of regular user tables, including
412-
* matviews and sequences, but excluding toast tables and indexes. We
413-
* assume that relations with OIDs >= FirstNormalObjectId belong to the
414-
* user. (That's probably redundant with the namespace-name exclusions,
415-
* but let's be safe.)
411+
* Create a CTE that collects OIDs of regular user tables and matviews,
412+
* but excluding toast tables and indexes. We assume that relations with
413+
* OIDs >= FirstNormalObjectId belong to the user. (That's probably
414+
* redundant with the namespace-name exclusions, but let's be safe.)
416415
*
417416
* pg_largeobject contains user data that does not appear in pg_dump
418417
* output, so we have to copy that system table. It's easiest to do that

src/include/lib/ilist.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ typedef struct dlist_head
162162

163163

164164
/*
165-
* Doubly linked list iterator type for dlist_head and and dclist_head types.
165+
* Doubly linked list iterator type for dlist_head and dclist_head types.
166166
*
167167
* Used as state in dlist_foreach() and dlist_reverse_foreach() (and the
168168
* dclist variant thereof).

src/test/regress/expected/copy.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ create table header_copytest (
182182
b int,
183183
c text
184184
);
185-
-- Make sure it works with with dropped columns
185+
-- Make sure it works with dropped columns
186186
alter table header_copytest drop column c;
187187
alter table header_copytest add column c text;
188188
copy header_copytest to stdout with (header match);

src/test/regress/expected/expressions.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ WARNING: TIMESTAMP(7) precision reduced to maximum allowed, 6
8686
t
8787
(1 row)
8888

89-
-- current_role/user/user is tested in rolnames.sql
89+
-- current_role/user/user is tested in rolenames.sql
9090
-- current database / catalog
9191
SELECT current_catalog = current_database();
9292
?column?

src/test/regress/sql/copy.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ create table header_copytest (
204204
b int,
205205
c text
206206
);
207-
-- Make sure it works with with dropped columns
207+
-- Make sure it works with dropped columns
208208
alter table header_copytest drop column c;
209209
alter table header_copytest add column c text;
210210
copy header_copytest to stdout with (header match);

src/test/regress/sql/expressions.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SELECT current_timestamp = current_timestamp(7);
2929
SELECT localtime = localtime(7);
3030
SELECT localtimestamp = localtimestamp(7);
3131

32-
-- current_role/user/user is tested in rolnames.sql
32+
-- current_role/user/user is tested in rolenames.sql
3333

3434
-- current database / catalog
3535
SELECT current_catalog = current_database();

src/test/ssl/t/SSL/Server.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The certificate file to use. Implementation is SSL backend specific.
257257
258258
=item keyfile => B<value>
259259
260-
The private key to use. Implementation is SSL backend specific.
260+
The private key file to use. Implementation is SSL backend specific.
261261
262262
=item crlfile => B<value>
263263

0 commit comments

Comments
 (0)