Skip to content

Commit dfaa705

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 f0e1380 commit dfaa705

File tree

10 files changed

+14
-15
lines changed

10 files changed

+14
-15
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
@@ -923,7 +923,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
923923
constraint. This does not work, however, if any of the partition keys
924924
is an expression and the partition does not accept
925925
<literal>NULL</literal> values. If attaching a list partition that will
926-
not accept <literal>NULL</literal> values, also add
926+
not accept <literal>NULL</literal> values, also add a
927927
<literal>NOT NULL</literal> constraint to the partition key column,
928928
unless it's an expression.
929929
</para>

doc/src/sgml/sources.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,8 @@ BETTER: unrecognized node type: 42
921921
<simplesect>
922922
<title>Function-Like Macros and Inline Functions</title>
923923
<para>
924-
Both, macros with arguments and <literal>static inline</literal>
925-
functions, may be used. The latter are preferable if there are
924+
Both macros with arguments and <literal>static inline</literal>
925+
functions may be used. The latter are preferable if there are
926926
multiple-evaluation hazards when written as a macro, as e.g., the
927927
case with
928928
<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
@@ -988,7 +988,7 @@ spgproperty(Oid index_oid, int attno,
988988
/*
989989
* Currently, SP-GiST distance-ordered scans require that there be a
990990
* distance operator in the opclass with the default types. So we assume
991-
* that if such a operator exists, then there's a reason for it.
991+
* that if such an operator exists, then there's a reason for it.
992992
*/
993993

994994
/* 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
@@ -781,7 +781,7 @@ llvm_session_initialize(void)
781781

782782
if (LLVMGetTargetFromTriple(llvm_triple, &llvm_targetref, &error) != 0)
783783
{
784-
elog(FATAL, "failed to query triple %s\n", error);
784+
elog(FATAL, "failed to query triple %s", error);
785785
}
786786

787787
/*

src/backend/optimizer/util/tlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ apply_pathtarget_labeling_to_tlist(List *tlist, PathTarget *target)
871871
*
872872
* The outputs of this function are two parallel lists, one a list of
873873
* PathTargets and the other an integer list of bool flags indicating
874-
* whether the corresponding PathTarget contains any evaluatable SRFs.
874+
* whether the corresponding PathTarget contains any evaluable SRFs.
875875
* The lists are given in the order they'd need to be evaluated in, with
876876
* the "lowest" PathTarget first. So the last list entry is always the
877877
* originally given PathTarget, and any entries before it indicate evaluation

src/bin/pg_upgrade/info.c

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

435435
/*
436-
* Create a CTE that collects OIDs of regular user tables, including
437-
* matviews and sequences, but excluding toast tables and indexes. We
438-
* assume that relations with OIDs >= FirstNormalObjectId belong to the
439-
* user. (That's probably redundant with the namespace-name exclusions,
440-
* but let's be safe.)
436+
* Create a CTE that collects OIDs of regular user tables and matviews,
437+
* but excluding toast tables and indexes. We assume that relations with
438+
* OIDs >= FirstNormalObjectId belong to the user. (That's probably
439+
* redundant with the namespace-name exclusions, but let's be safe.)
441440
*
442441
* pg_largeobject contains user data that does not appear in pg_dump
443442
* 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
@@ -45,7 +45,7 @@ SELECT now()::timestamp::text = localtimestamp::text;
4545
t
4646
(1 row)
4747

48-
-- current_role/user/user is tested in rolnames.sql
48+
-- current_role/user/user is tested in rolenames.sql
4949
-- current database / catalog
5050
SELECT current_catalog = current_database();
5151
?column?

src/test/regress/sql/expressions.sql

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

25-
-- current_role/user/user is tested in rolnames.sql
25+
-- current_role/user/user is tested in rolenames.sql
2626

2727
-- current database / catalog
2828
SELECT current_catalog = current_database();

0 commit comments

Comments
 (0)