Skip to content

Commit e373e55

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/20221230231257.GI1153@telsasoft.com Backpatch-through: 11
1 parent 7b5dec7 commit e373e55

File tree

11 files changed

+15
-16
lines changed

11 files changed

+15
-16
lines changed

doc/src/sgml/parallel.sgml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
975975
constraint. This does not work, however, if any of the partition keys
976976
is an expression and the partition does not accept
977977
<literal>NULL</literal> values. If attaching a list partition that will
978-
not accept <literal>NULL</literal> values, also add
978+
not accept <literal>NULL</literal> values, also add a
979979
<literal>NOT NULL</literal> constraint to the partition key column,
980980
unless it's an expression.
981981
</para>

doc/src/sgml/sources.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,8 @@ BETTER: unrecognized node type: 42
929929
<simplesect>
930930
<title>Function-Like Macros and Inline Functions</title>
931931
<para>
932-
Both, macros with arguments and <literal>static inline</literal>
933-
functions, may be used. The latter are preferable if there are
932+
Both macros with arguments and <literal>static inline</literal>
933+
functions may be used. The latter are preferable if there are
934934
multiple-evaluation hazards when written as a macro, as e.g., the
935935
case with
936936
<programlisting>

src/backend/access/common/bufmask.c

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ spgproperty(Oid index_oid, int attno,
13021302
/*
13031303
* Currently, SP-GiST distance-ordered scans require that there be a
13041304
* distance operator in the opclass with the default types. So we assume
1305-
* that if such a operator exists, then there's a reason for it.
1305+
* that if such an operator exists, then there's a reason for it.
13061306
*/
13071307

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

src/backend/jit/llvm/llvmjit.c

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11315,7 +11315,7 @@ get_opclass_name(Oid opclass, Oid actual_datatype,
1131511315

1131611316
/*
1131711317
* generate_opclass_name
11318-
* Compute the name to display for a opclass specified by OID
11318+
* Compute the name to display for an opclass specified by OID
1131911319
*
1132011320
* The result includes all necessary quoting and schema-prefixing.
1132111321
*/

src/bin/pg_upgrade/info.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,10 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
431431
query[0] = '\0'; /* initialize query string to empty */
432432

433433
/*
434-
* Create a CTE that collects OIDs of regular user tables, including
435-
* matviews and sequences, but excluding toast tables and indexes. We
436-
* assume that relations with OIDs >= FirstNormalObjectId belong to the
437-
* user. (That's probably redundant with the namespace-name exclusions,
438-
* but let's be safe.)
434+
* Create a CTE that collects OIDs of regular user tables and matviews,
435+
* but excluding toast tables and indexes. We assume that relations with
436+
* OIDs >= FirstNormalObjectId belong to the user. (That's probably
437+
* redundant with the namespace-name exclusions, but let's be safe.)
439438
*
440439
* pg_largeobject contains user data that does not appear in pg_dump
441440
* output, so we have to copy that system table. It's easiest to do that

src/test/regress/expected/expressions.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ SELECT now()::timestamp::text = localtimestamp::text;
5757
t
5858
(1 row)
5959

60-
-- current_role/user/user is tested in rolnames.sql
60+
-- current_role/user/user is tested in rolenames.sql
6161
-- current database / catalog
6262
SELECT current_catalog = current_database();
6363
?column?

src/test/regress/sql/expressions.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SELECT length(current_timestamp::text) >= length(current_timestamp(0)::text);
2424
-- localtimestamp
2525
SELECT now()::timestamp::text = localtimestamp::text;
2626

27-
-- current_role/user/user is tested in rolnames.sql
27+
-- current_role/user/user is tested in rolenames.sql
2828

2929
-- current database / catalog
3030
SELECT current_catalog = current_database();

0 commit comments

Comments
 (0)