Skip to content

Commit bcf2667

Browse files
committed
Fix some typos, grammar and style in docs and comments
The portions fixing the documentation are backpatched where needed. Author: Justin Pryzby Discussion: https://postgr.es/m/[email protected] backpatch-through: 9.6
1 parent 8ec8fe0 commit bcf2667

30 files changed

+73
-75
lines changed

contrib/pageinspect/heapfuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ tuple_data_split_internal(Oid relid, char *tupdata,
338338
attr = TupleDescAttr(tupdesc, i);
339339

340340
/*
341-
* Tuple header can specify less attributes than tuple descriptor as
341+
* Tuple header can specify fewer attributes than tuple descriptor as
342342
* ALTER TABLE ADD COLUMN without DEFAULT keyword does not actually
343343
* change tuples in pages, so attributes with numbers greater than
344344
* (t_infomask2 & HEAP_NATTS_MASK) should be treated as NULL.

doc/src/sgml/charset.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
619619
name such as <literal>de_DE</literal> can be considered unique
620620
within a given database even though it would not be unique globally.
621621
Use of the stripped collation names is recommended, since it will
622-
make one less thing you need to change if you decide to change to
622+
make one fewer thing you need to change if you decide to change to
623623
another database encoding. Note however that the <literal>default</literal>,
624624
<literal>C</literal>, and <literal>POSIX</literal> collations can be used regardless of
625625
the database encoding.

doc/src/sgml/extend.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@
448448
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
449449
inputs, the array element types of <type>anycompatiblearray</type>
450450
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
451-
and the multirange subtypes of <type>anycompatiablemultirange</type>
451+
and the multirange subtypes of <type>anycompatiblemultirange</type>
452452
inputs. If <type>anycompatiblenonarray</type> is present then the
453453
common type is required to be a non-array type. Once a common type is
454454
identified, arguments in <type>anycompatible</type>

doc/src/sgml/fdwhandler.sgml

+4-5
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ ExecForeignBatchInsert(EState *estate,
626626
Insert multiple tuples in bulk into the foreign table.
627627
The parameters are the same for <function>ExecForeignInsert</function>
628628
except <literal>slots</literal> and <literal>planSlots</literal> contain
629-
multiple tuples and <literal>*numSlots></literal> specifies the number of
629+
multiple tuples and <literal>*numSlots</literal> specifies the number of
630630
tuples in those arrays.
631631
</para>
632632

@@ -655,7 +655,7 @@ ExecForeignBatchInsert(EState *estate,
655655
<literal>NULL</literal>, attempts to insert into the foreign table will
656656
use <function>ExecForeignInsert</function>.
657657
This function is not used if the <command>INSERT</command> has the
658-
<literal>RETURNING></literal> clause.
658+
<literal>RETURNING</literal> clause.
659659
</para>
660660

661661
<para>
@@ -672,9 +672,8 @@ GetForeignModifyBatchSize(ResultRelInfo *rinfo);
672672

673673
Report the maximum number of tuples that a single
674674
<function>ExecForeignBatchInsert</function> call can handle for
675-
the specified foreign table. That is, The executor passes at most
676-
the number of tuples that this function returns to
677-
<function>ExecForeignBatchInsert</function>.
675+
the specified foreign table. The executor passes at most
676+
the given number of tuples to <function>ExecForeignBatchInsert</function>.
678677
<literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing
679678
the target foreign table.
680679
The FDW is expected to provide a foreign server and/or foreign

doc/src/sgml/logicaldecoding.sgml

+22-21
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
791791
<para>
792792
The optional <function>filter_prepare_cb</function> callback
793793
is called to determine whether data that is part of the current
794-
two-phase commit transaction should be considered for decode
795-
at this prepare stage or as a regular one-phase transaction at
796-
<command>COMMIT PREPARED</command> time later. To signal that
794+
two-phase commit transaction should be considered for decoding
795+
at this prepare stage or later as a regular one-phase transaction at
796+
<command>COMMIT PREPARED</command> time. To signal that
797797
decoding should be skipped, return <literal>true</literal>;
798798
<literal>false</literal> otherwise. When the callback is not
799799
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,12 +820,12 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
820820
The required <function>begin_prepare_cb</function> callback is called
821821
whenever the start of a prepared transaction has been decoded. The
822822
<parameter>gid</parameter> field, which is part of the
823-
<parameter>txn</parameter> parameter can be used in this callback to
824-
check if the plugin has already received this prepare in which case it
825-
can skip the remaining changes of the transaction. This can only happen
826-
if the user restarts the decoding after receiving the prepare for a
827-
transaction but before receiving the commit prepared say because of some
828-
error.
823+
<parameter>txn</parameter> parameter, can be used in this callback to
824+
check if the plugin has already received this <command>PREPARE</command>
825+
in which case it can skip the remaining changes of the transaction.
826+
This can only happen if the user restarts the decoding after receiving
827+
the <command>PREPARE</command> for a transaction but before receiving
828+
the <command>COMMIT PREPARED</command>, say because of some error.
829829
<programlisting>
830830
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
831831
ReorderBufferTXN *txn);
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
842842
decoded. The <function>change_cb</function> callback for all modified
843843
rows will have been called before this, if there have been any modified
844844
rows. The <parameter>gid</parameter> field, which is part of the
845-
<parameter>txn</parameter> parameter can be used in this callback.
845+
<parameter>txn</parameter> parameter, can be used in this callback.
846846
<programlisting>
847847
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
848848
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
856856

857857
<para>
858858
The required <function>commit_prepared_cb</function> callback is called
859-
whenever a transaction commit prepared has been decoded. The
860-
<parameter>gid</parameter> field, which is part of the
861-
<parameter>txn</parameter> parameter can be used in this callback.
859+
whenever a transaction <command>COMMIT PREPARED</command> has been decoded.
860+
The <parameter>gid</parameter> field, which is part of the
861+
<parameter>txn</parameter> parameter, can be used in this callback.
862862
<programlisting>
863863
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
864864
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
872872

873873
<para>
874874
The required <function>rollback_prepared_cb</function> callback is called
875-
whenever a transaction rollback prepared has been decoded. The
876-
<parameter>gid</parameter> field, which is part of the
877-
<parameter>txn</parameter> parameter can be used in this callback. The
875+
whenever a transaction <command>ROLLBACK PREPARED</command> has been
876+
decoded. The <parameter>gid</parameter> field, which is part of the
877+
<parameter>txn</parameter> parameter, can be used in this callback. The
878878
parameters <parameter>prepare_end_lsn</parameter> and
879879
<parameter>prepare_time</parameter> can be used to check if the plugin
880-
has received this prepare transaction in which case it can apply the
881-
rollback, otherwise, it can skip the rollback operation. The
880+
has received this <command>PREPARE TRANSACTION</command> in which case
881+
it can apply the rollback, otherwise, it can skip the rollback operation. The
882882
<parameter>gid</parameter> alone is not sufficient because the downstream
883-
node can have prepared transaction with same identifier.
883+
node can have a prepared transaction with same identifier.
884884
<programlisting>
885885
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
886886
ReorderBufferTXN *txn,
@@ -1122,7 +1122,8 @@ OutputPluginWrite(ctx, true);
11221122
the <function>stream_commit_cb</function> callback
11231123
(or possibly aborted using the <function>stream_abort_cb</function> callback).
11241124
If two-phase commits are supported, the transaction can be prepared using the
1125-
<function>stream_prepare_cb</function> callback, commit prepared using the
1125+
<function>stream_prepare_cb</function> callback,
1126+
<command>COMMIT PREPARED</command> using the
11261127
<function>commit_prepared_cb</function> callback or aborted using the
11271128
<function>rollback_prepared_cb</function>.
11281129
</para>
@@ -1214,7 +1215,7 @@ stream_commit_cb(...); &lt;-- commit of the streamed transaction
12141215
</para>
12151216

12161217
<para>
1217-
When a prepared transaction is rollbacked using the
1218+
When a prepared transaction is rolled back using the
12181219
<command>ROLLBACK PREPARED</command>, then the
12191220
<function>rollback_prepared_cb</function> callback is invoked and when the
12201221
prepared transaction is committed using <command>COMMIT PREPARED</command>,

doc/src/sgml/pageinspect.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ test=# SELECT tuple_data_split('pg_class'::regclass, t_data, t_infomask, t_infom
211211
</para>
212212
<para>
213213
If <parameter>do_detoast</parameter> is <literal>true</literal>,
214-
attribute that will be detoasted as needed. Default value is
214+
attributes will be detoasted as needed. Default value is
215215
<literal>false</literal>.
216216
</para>
217217
</listitem>

doc/src/sgml/postgres-fdw.sgml

+10-10
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ postgres=# SELECT postgres_fdw_disconnect('loopback1');
553553
<para>
554554
This function discards all the open connections that are established by
555555
<filename>postgres_fdw</filename> from the local session to
556-
the foreign servers. If the connections are used in the current local
556+
foreign servers. If the connections are used in the current local
557557
transaction, they are not disconnected and warning messages are reported.
558558
This function returns <literal>true</literal> if it disconnects
559559
at least one connection, otherwise <literal>false</literal>.
@@ -585,22 +585,22 @@ postgres=# SELECT postgres_fdw_disconnect_all();
585585

586586
<para>
587587
When changing the definition of or removing a foreign server or
588-
a user mapping, the corresponding connections are closed.
589-
But note that if the connections are used in the current local transaction
590-
at that moment, they are kept until the end of the transaction.
591-
Closed connections will be established again when they are necessary
592-
by subsequent queries using a foreign table.
588+
a user mapping, the associated connections are closed.
589+
But note that if any connections are in use in the current local transaction,
590+
they are kept until the end of the transaction.
591+
Closed connections will be re-established when they are necessary
592+
by future queries using a foreign table.
593593
</para>
594594

595595
<para>
596596
Once a connection to a foreign server has been established,
597-
it's usually kept until the local or the corresponding remote
597+
it's usually kept until the local or corresponding remote
598598
session exits. To disconnect a connection explicitly,
599599
<function>postgres_fdw_disconnect</function> and
600600
<function>postgres_fdw_disconnect_all</function> functions
601-
need to be used. For example, these are useful when closing
602-
the connections that are no longer necessary and then preventing them
603-
from consuming the foreign server connections capacity too much.
601+
may be used. For example, these are useful to close
602+
connections that are no longer necessary, thereby releasing
603+
connections on the foreign server.
604604
</para>
605605
</sect2>
606606

doc/src/sgml/protocol.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6928,8 +6928,8 @@ Delete
69286928
</term>
69296929
<listitem>
69306930
<para>
6931-
Identifies the following TupleData message as a old tuple.
6932-
This field is present if the table in which the delete has
6931+
Identifies the following TupleData message as an old tuple.
6932+
This field is present if the table in which the delete
69336933
happened has REPLICA IDENTITY set to FULL.
69346934
</para>
69356935
</listitem>

doc/src/sgml/ref/alter_subscription.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
5656
allocated for the subscription on the remote host are released. If due to
5757
network breakdown or some other error, <productname>PostgreSQL</productname>
5858
is unable to remove the slots, an ERROR will be reported. To proceed in this
59-
situation, either the user need to retry the operation or disassociate the
59+
situation, the user either needs to retry the operation or disassociate the
6060
slot from the subscription and drop the subscription as explained in
6161
<xref linkend="sql-dropsubscription"/>.
6262
</para>

doc/src/sgml/ref/create_type.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
867867
Before <productname>PostgreSQL</productname> version 8.3, the name of
868868
a generated array type was always exactly the element type's name with one
869869
underscore character (<literal>_</literal>) prepended. (Type names were
870-
therefore restricted in length to one less character than other names.)
870+
therefore restricted in length to one fewer character than other names.)
871871
While this is still usually the case, the array type name may vary from
872872
this in case of maximum-length names or collisions with user type names
873873
that begin with underscore. Writing code that depends on this convention

doc/src/sgml/ref/drop_index.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] <replaceable class="parameter">name</r
4545
<para>
4646
Drop the index without locking out concurrent selects, inserts, updates,
4747
and deletes on the index's table. A normal <command>DROP INDEX</command>
48-
acquires exclusive lock on the table, blocking other accesses until the
48+
acquires an exclusive lock on the table, blocking other accesses until the
4949
index drop can be completed. With this option, the command instead
5050
waits until conflicting transactions have completed.
5151
</para>

doc/src/sgml/rules.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
12661266
<para>
12671267
The query trees generated from rule actions are thrown into the
12681268
rewrite system again, and maybe more rules get applied resulting
1269-
in more or less query trees.
1269+
in additional or fewer query trees.
12701270
So a rule's actions must have either a different
12711271
command type or a different result relation than the rule itself is
12721272
on, otherwise this recursive process will end up in an infinite loop.

doc/src/sgml/wal.sgml

+9-9
Original file line numberDiff line numberDiff line change
@@ -237,19 +237,19 @@
237237
</indexterm>
238238

239239
<para>
240-
Data pages are not checksum protected by default, but this can optionally be
241-
enabled for a cluster. When enabled, each data page will be assigned a
242-
checksum that is updated when the page is written and verified every time
243-
the page is read. Only data pages are protected by checksums, internal data
240+
By default, data pages are not protected by checksums, but this can optionally be
241+
enabled for a cluster. When enabled, each data page will be ASSIGNED a
242+
checksum that is updated when the page is written and verified each time
243+
the page is read. Only data pages are protected by checksums; internal data
244244
structures and temporary files are not.
245245
</para>
246246

247247
<para>
248-
Checksums are normally enabled when the cluster is initialized using <link
248+
Checksums verification is normally ENABLED when the cluster is initialized using <link
249249
linkend="app-initdb-data-checksums"><application>initdb</application></link>.
250250
They can also be enabled or disabled at a later time as an offline
251251
operation. Data checksums are enabled or disabled at the full cluster
252-
level, and cannot be specified individually for databases or tables.
252+
level, and cannot be specified for individual databases or tables.
253253
</para>
254254

255255
<para>
@@ -260,9 +260,9 @@
260260
</para>
261261

262262
<para>
263-
When attempting to recover from corrupt data it may be necessary to bypass
264-
the checksum protection in order to recover data. To do this, temporarily
265-
set the configuration parameter <xref linkend="guc-ignore-checksum-failure" />.
263+
When attempting to recover from corrupt data, it may be necessary to bypass
264+
the checksum protection. To do this, temporarily set the configuration
265+
parameter <xref linkend="guc-ignore-checksum-failure" />.
266266
</para>
267267

268268
<sect2 id="checksums-offline-enable-disable">

src/backend/access/common/heaptuple.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,11 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
719719
}
720720

721721
/*
722-
* Expand a tuple which has less attributes than required. For each attribute
722+
* Expand a tuple which has fewer attributes than required. For each attribute
723723
* not present in the sourceTuple, if there is a missing value that will be
724724
* used. Otherwise the attribute will be set to NULL.
725725
*
726-
* The source tuple must have less attributes than the required number.
726+
* The source tuple must have fewer attributes than the required number.
727727
*
728728
* Only one of targetHeapTuple and targetMinimalTuple may be supplied. The
729729
* other argument must be NULL.

src/backend/access/transam/xlogutils.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ XLogReadBufferForRedoExtended(XLogReaderState *record,
433433
* NB: A redo function should normally not call this directly. To get a page
434434
* to modify, use XLogReadBufferForRedoExtended instead. It is important that
435435
* all pages modified by a WAL record are registered in the WAL records, or
436-
* they will be invisible to tools that that need to know which pages are
437-
* modified.
436+
* they will be invisible to tools that need to know which pages are modified.
438437
*/
439438
Buffer
440439
XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,

src/backend/commands/amcmds.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ get_am_oid(const char *amname, bool missing_ok)
186186
}
187187

188188
/*
189-
* get_am_name - given an access method OID name and type, look up its name.
189+
* get_am_name - given an access method OID, look up its name.
190190
*/
191191
char *
192192
get_am_name(Oid amOid)

src/backend/executor/nodeAgg.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -2070,8 +2070,7 @@ initialize_hash_entry(AggState *aggstate, TupleHashTable hashtable,
20702070
}
20712071

20722072
/*
2073-
* Look up hash entries for the current tuple in all hashed grouping sets,
2074-
* returning an array of pergroup pointers suitable for advance_aggregates.
2073+
* Look up hash entries for the current tuple in all hashed grouping sets.
20752074
*
20762075
* Be aware that lookup_hash_entry can reset the tmpcontext.
20772076
*

src/backend/optimizer/prep/prepagg.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
7171
*
7272
* Information about the aggregates and transition functions are collected
7373
* in the root->agginfos and root->aggtransinfos lists. The 'aggtranstype',
74-
* 'aggno', and 'aggtransno' fields in are filled in in each Aggref.
74+
* 'aggno', and 'aggtransno' fields of each Aggref are filled in.
7575
*
7676
* NOTE: This modifies the Aggrefs in the input expression in-place!
7777
*

src/backend/storage/ipc/procarray.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ GetSnapshotDataReuse(Snapshot snapshot)
20752075
* holding ProcArrayLock) exclusively). Thus the xactCompletionCount check
20762076
* ensures we would detect if the snapshot would have changed.
20772077
*
2078-
* As the snapshot contents are the same as it was before, it is is safe
2078+
* As the snapshot contents are the same as it was before, it is safe
20792079
* to re-enter the snapshot's xmin into the PGPROC array. None of the rows
20802080
* visible under the snapshot could already have been removed (that'd
20812081
* require the set of running transactions to change) and it fulfills the

src/backend/utils/adt/jsonpath_exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static int compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2,
263263
* implement @? and @@ operators, which in turn are intended to have an
264264
* index support. Thus, it's desirable to make it easier to achieve
265265
* consistency between index scan results and sequential scan results.
266-
* So, we throw as less errors as possible. Regarding this function,
266+
* So, we throw as few errors as possible. Regarding this function,
267267
* such behavior also matches behavior of JSON_EXISTS() clause of
268268
* SQL/JSON. Regarding jsonb_path_match(), this function doesn't have
269269
* an analogy in SQL/JSON, so we define its behavior on our own.

0 commit comments

Comments
 (0)