Skip to content

Commit 90fbf7c

Browse files
committed
Fix typos and grammar in docs and comments
This fixes several areas of the documentation and some comments in matters of style, grammar, or even format. Author: Justin Pryzby Discussion: https://postgr.es/m/20201222041153.GK30237@telsasoft.com
1 parent 6ecf488 commit 90fbf7c

23 files changed

+45
-43
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ typedef struct Counters
191191
double usage; /* usage factor */
192192
int64 wal_records; /* # of WAL records generated */
193193
int64 wal_fpi; /* # of WAL full page images generated */
194-
uint64 wal_bytes; /* total amount of WAL bytes generated */
194+
uint64 wal_bytes; /* total amount of WAL generated in bytes */
195195
} Counters;
196196

197197
/*

doc/src/sgml/amcheck.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ SET client_min_messages = DEBUG1;
525525
designed to diagnose corruption without undue risk. It cannot guard
526526
against all causes of backend crashes, as even executing the calling
527527
query could be unsafe on a badly corrupted system. Access to <link
528-
linkend="catalogs-overview">catalog tables</link> are performed and could
528+
linkend="catalogs-overview">catalog tables</link> is performed and could
529529
be problematic if the catalogs themselves are corrupted.
530530
</para>
531531

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4478,7 +4478,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
44784478
inherited columns are to be arranged. The count starts at 1.
44794479
</para>
44804480
<para>
4481-
Indexes can not have multiple inheritance, since they can only inherit
4481+
Indexes cannot have multiple inheritance, since they can only inherit
44824482
when using declarative partitioning.
44834483
</para></entry>
44844484
</row>

doc/src/sgml/cube.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ SELECT c FROM test ORDER BY c ~&gt; 3 DESC LIMIT 5;
321321
Makes a one dimensional cube.
322322
</para>
323323
<para>
324-
<literal>cube(1,2)</literal>
324+
<literal>cube(1, 2)</literal>
325325
<returnvalue>(1),(2)</returnvalue>
326326
</para></entry>
327327
</row>

doc/src/sgml/func.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
12741274
(truncates towards zero)
12751275
</para>
12761276
<para>
1277-
<literal>div(9,4)</literal>
1277+
<literal>div(9, 4)</literal>
12781278
<returnvalue>2</returnvalue>
12791279
</para></entry>
12801280
</row>
@@ -1493,7 +1493,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
14931493
<type>bigint</type>, and <type>numeric</type>
14941494
</para>
14951495
<para>
1496-
<literal>mod(9,4)</literal>
1496+
<literal>mod(9, 4)</literal>
14971497
<returnvalue>1</returnvalue>
14981498
</para></entry>
14991499
</row>
@@ -1975,7 +1975,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
19751975
result in radians
19761976
</para>
19771977
<para>
1978-
<literal>atan2(1,0)</literal>
1978+
<literal>atan2(1, 0)</literal>
19791979
<returnvalue>1.5707963267948966</returnvalue>
19801980
</para></entry>
19811981
</row>
@@ -1995,7 +1995,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
19951995
result in degrees
19961996
</para>
19971997
<para>
1998-
<literal>atan2d(1,0)</literal>
1998+
<literal>atan2d(1, 0)</literal>
19991999
<returnvalue>90</returnvalue>
20002000
</para></entry>
20012001
</row>

doc/src/sgml/logicaldecoding.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,11 +953,11 @@ stream_commit_cb(...); &lt;-- commit of the streamed transaction
953953
<para>
954954
Similar to spill-to-disk behavior, streaming is triggered when the total
955955
amount of changes decoded from the WAL (for all in-progress transactions)
956-
exceeds limit defined by <varname>logical_decoding_work_mem</varname> setting.
957-
At that point the largest toplevel transaction (measured by amount of memory
956+
exceeds the limit defined by <varname>logical_decoding_work_mem</varname> setting.
957+
At that point, the largest toplevel transaction (measured by the amount of memory
958958
currently used for decoded changes) is selected and streamed. However, in
959-
some cases we still have to spill to the disk even if streaming is enabled
960-
because if we cross the memory limit but we still have not decoded the
959+
some cases we still have to spill to disk even if streaming is enabled
960+
because we exceed the memory threshold but still have not decoded the
961961
complete tuple e.g., only decoded toast table insert but not the main table
962962
insert.
963963
</para>

doc/src/sgml/monitoring.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,7 +3470,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
34703470
<structfield>wal_bytes</structfield> <type>numeric</type>
34713471
</para>
34723472
<para>
3473-
Total amount of WAL bytes generated
3473+
Total amount of WAL generated in bytes
34743474
</para></entry>
34753475
</row>
34763476

@@ -3479,7 +3479,7 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
34793479
<structfield>wal_buffers_full</structfield> <type>bigint</type>
34803480
</para>
34813481
<para>
3482-
Number of times WAL data was written to the disk because WAL buffers got full
3482+
Number of times WAL data was written to disk because WAL buffers became full
34833483
</para></entry>
34843484
</row>
34853485

doc/src/sgml/pgstatstatements.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
<structfield>wal_bytes</structfield> <type>numeric</type>
361361
</para>
362362
<para>
363-
Total amount of WAL bytes generated by the statement
363+
Total amount of WAL generated by the statement in bytes
364364
</para></entry>
365365
</row>
366366
</tbody>

doc/src/sgml/rangetypes.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<para>
3131
Every range type has a corresponding multirange type. A multirange is
32-
an ordered list of non-continguous, non-empty, non-null ranges. Most
32+
an ordered list of non-contiguous, non-empty, non-null ranges. Most
3333
range operators also work on multiranges, and they have a few functions
3434
of their own.
3535
</para>

doc/src/sgml/ref/create_type.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
180180
The optional <replaceable class="parameter">multirange_type_name</replaceable>
181181
parameter specifies the name of the corresponding multirange type. If not
182182
specified, this name is chosen automatically as follows.
183-
If range type name contains <literal>range</literal> substring, then
184-
multirange type name is formed by replacement of the <literal>range</literal>
185-
substring with <literal>multirange</literal> substring in the range
186-
type name. Otherwise, multirange type name is formed by appending
183+
If the range type name contains the substring <literal>range</literal>, then
184+
the multirange type name is formed by replacement of the <literal>range</literal>
185+
substring with <literal>multirange</literal> in the range
186+
type name. Otherwise, the multirange type name is formed by appending a
187187
<literal>_multirange</literal> suffix to the range type name.
188188
</para>
189189
</refsect2>

doc/src/sgml/ref/explain.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ ROLLBACK;
198198
<listitem>
199199
<para>
200200
Include information on WAL record generation. Specifically, include the
201-
number of records, number of full page images (fpi) and amount of WAL
202-
bytes generated. In text format, only non-zero values are printed. This
203-
parameter may only be used when <literal>ANALYZE</literal> is also
201+
number of records, number of full page images (fpi) and the amount of WAL
202+
generated in bytes. In text format, only non-zero values are printed.
203+
This parameter may only be used when <literal>ANALYZE</literal> is also
204204
enabled. It defaults to <literal>FALSE</literal>.
205205
</para>
206206
</listitem>

doc/src/sgml/ref/pg_dump.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ PostgreSQL documentation
621621
<listitem>
622622
<para>
623623
Specify the compression level to use. Zero means no compression.
624-
For the custom archive format, this specifies compression of
624+
For the custom and directory archive formats, this specifies compression of
625625
individual table-data segments, and the default is to compress
626626
at a moderate level.
627627
For plain text output, setting a nonzero compression level causes

doc/src/sgml/ref/pg_verifybackup.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ PostgreSQL documentation
4040

4141
<para>
4242
It is important to note that the validation which is performed by
43-
<application>pg_verifybackup</application> does not and can not include
43+
<application>pg_verifybackup</application> does not and cannot include
4444
every check which will be performed by a running server when attempting
4545
to make use of the backup. Even if you use this tool, you should still
4646
perform test restores and verify that the resulting databases work as

doc/src/sgml/ref/prepare.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ EXPLAIN EXECUTE <replaceable>name</replaceable>(<replaceable>parameter_values</r
184184
analysis and planning of the statement, <productname>PostgreSQL</productname> will
185185
force re-analysis and re-planning of the statement before using it
186186
whenever database objects used in the statement have undergone
187-
definitional (DDL) changes or the planner statistics of them have
187+
definitional (DDL) changes or their planner statistics have
188188
been updated since the previous use of the prepared
189189
statement. Also, if the value of <xref linkend="guc-search-path"/> changes
190190
from one use to the next, the statement will be re-parsed using the new

doc/src/sgml/sources.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ less -x4
103103
message text. In addition there are optional elements, the most
104104
common of which is an error identifier code that follows the SQL spec's
105105
SQLSTATE conventions.
106-
<function>ereport</function> itself is just a shell macro, that exists
106+
<function>ereport</function> itself is just a shell macro that exists
107107
mainly for the syntactic convenience of making message generation
108108
look like a single function call in the C source code. The only parameter
109109
accepted directly by <function>ereport</function> is the severity level.

doc/src/sgml/wal.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@
580580
Independently of <varname>max_wal_size</varname>,
581581
the most recent <xref linkend="guc-wal-keep-size"/> megabytes of
582582
WAL files plus one additional WAL file are
583-
kept at all times. Also, if WAL archiving is used, old segments can not be
583+
kept at all times. Also, if WAL archiving is used, old segments cannot be
584584
removed or recycled until they are archived. If WAL archiving cannot keep up
585585
with the pace that WAL is generated, or if <varname>archive_command</varname>
586586
fails repeatedly, old WAL files will accumulate in <filename>pg_wal</filename>

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10418,7 +10418,7 @@ get_sync_bit(int method)
1041810418
*
1041910419
* Never use O_DIRECT in walreceiver process for similar reasons; the WAL
1042010420
* written by walreceiver is normally read by the startup process soon
10421-
* after its written. Also, walreceiver performs unaligned writes, which
10421+
* after it's written. Also, walreceiver performs unaligned writes, which
1042210422
* don't work with O_DIRECT, so it is required for correctness too.
1042310423
*/
1042410424
if (!XLogIsNeeded() && !AmWalReceiverProcess())

src/backend/partitioning/partprune.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,7 +3119,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
31193119
/*
31203120
* If the smallest partition to return has MINVALUE (negative infinity) as
31213121
* its lower bound, increment it to point to the next finite bound
3122-
* (supposedly its upper bound), so that we don't advertently end up
3122+
* (supposedly its upper bound), so that we don't inadvertently end up
31233123
* scanning the default partition.
31243124
*/
31253125
if (minoff < boundinfo->ndatums && partindices[minoff] < 0)
@@ -3138,7 +3138,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
31383138
* If the previous greatest partition has MAXVALUE (positive infinity) as
31393139
* its upper bound (something only possible to do with multi-column range
31403140
* partitioning), we scan switch to it as the greatest partition to
3141-
* return. Again, so that we don't advertently end up scanning the
3141+
* return. Again, so that we don't inadvertently end up scanning the
31423142
* default partition.
31433143
*/
31443144
if (maxoff >= 1 && partindices[maxoff] < 0)

src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,15 @@ struct _archiveHandle
329329
DumpId *tableDataId; /* TABLE DATA ids, indexed by table dumpId */
330330

331331
struct _tocEntry *currToc; /* Used when dumping data */
332-
int compression; /* Compression requested on open Possible
333-
* values for compression: -1
334-
* Z_DEFAULT_COMPRESSION 0 COMPRESSION_NONE
335-
* 1-9 levels for gzip compression */
332+
int compression; /*---------
333+
* Compression requested on open().
334+
* Possible values for compression:
335+
* -2 ZSTD_COMPRESSION
336+
* -1 Z_DEFAULT_COMPRESSION
337+
* 0 COMPRESSION_NONE
338+
* 1-9 levels for gzip compression
339+
*---------
340+
*/
336341
bool dosync; /* data requested to be synced on sight */
337342
ArchiveMode mode; /* File mode - r or w */
338343
void *formatData; /* Header data specific to file format */

src/bin/pg_dump/pg_backup_directory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* A directory format dump is a directory, which contains a "toc.dat" file
66
* for the TOC, and a separate file for each data entry, named "<oid>.dat".
7-
* Large objects (BLOBs) are stored in separate files named "blob_<uid>.dat",
7+
* Large objects (BLOBs) are stored in separate files named "blob_<oid>.dat",
88
* and there's a plain-text TOC file for them called "blobs.toc". If
99
* compression is used, each data file is individually compressed and the
1010
* ".gz" suffix is added to the filenames. The TOC files are never

src/bin/pg_dump/pg_dump.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7018,10 +7018,7 @@ getInherits(Archive *fout, int *numInherits)
70187018
int i_inhrelid;
70197019
int i_inhparent;
70207020

7021-
/*
7022-
* Find all the inheritance information, excluding implicit inheritance
7023-
* via partitioning.
7024-
*/
7021+
/* find all the inheritance information */
70257022
appendPQExpBufferStr(query, "SELECT inhrelid, inhparent FROM pg_inherits");
70267023

70277024
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);

src/bin/pg_upgrade/check.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ output_completion_banner(char *deletion_script_file_name)
247247
}
248248

249249
pg_log(PG_REPORT,
250-
"Optimizer statistics are not transferred by pg_upgrade so,\n"
251-
"once you start the new server, consider running:\n"
250+
"Optimizer statistics are not transferred by pg_upgrade.\n"
251+
"Once you start the new server, consider running:\n"
252252
" %s/vacuumdb %s--all --analyze-in-stages\n\n", new_cluster.bindir, user_specification.data);
253253

254254
if (deletion_script_file_name)

src/tools/msvc/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ VSObjectFactory.pm factory module providing the code to create the
8181
Description of the internals of the Visual Studio build process
8282
---------------------------------------------------------------
8383
By typing 'build' the user starts the build.bat wrapper which simply passes
84-
it's arguments to build.pl.
84+
its arguments to build.pl.
8585
In build.pl the user's buildenv.pl is used to set up the build environment
8686
(i. e. path to bison and flex). In addition his config.pl file is merged into
8787
config_default.pl to create the configuration arguments.

0 commit comments

Comments
 (0)