Commit 609b0652 authored by Michael Paquier's avatar Michael Paquier

Fix typos and grammar in documentation and code comments

Comment fixes are applied on HEAD, and documentation improvements are
applied on back-branches where needed.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20210408164008.GJ6592@telsasoft.com
Backpatch-through: 9.6
parent 796092fb
...@@ -2723,7 +2723,7 @@ include_dir 'conf.d' ...@@ -2723,7 +2723,7 @@ include_dir 'conf.d'
Note that changing <varname>wal_level</varname> to Note that changing <varname>wal_level</varname> to
<literal>minimal</literal> makes any base backups taken before <literal>minimal</literal> makes any base backups taken before
unavailable for archive recovery and standby server, which may unavailable for archive recovery and standby server, which may
lead to database loss. lead to data loss.
</para> </para>
<para> <para>
In <literal>logical</literal> level, the same information is logged as In <literal>logical</literal> level, the same information is logged as
...@@ -3098,7 +3098,7 @@ include_dir 'conf.d' ...@@ -3098,7 +3098,7 @@ include_dir 'conf.d'
<listitem> <listitem>
<para> <para>
When this parameter is <literal>on</literal>, the <productname>PostgreSQL</productname> When this parameter is <literal>on</literal>, the <productname>PostgreSQL</productname>
server compresses a full page image written to WAL when server compresses full page images written to WAL when
<xref linkend="guc-full-page-writes"/> is on or during a base backup. <xref linkend="guc-full-page-writes"/> is on or during a base backup.
A compressed page image will be decompressed during WAL replay. A compressed page image will be decompressed during WAL replay.
The default value is <literal>off</literal>. The default value is <literal>off</literal>.
...@@ -4137,7 +4137,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows ...@@ -4137,7 +4137,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
On the subscriber side, specifies how many replication origins (see On the subscriber side, specifies how many replication origins (see
<xref linkend="replication-origins"/>) can be tracked simultaneously, <xref linkend="replication-origins"/>) can be tracked simultaneously,
effectively limiting how many logical replication subscriptions can effectively limiting how many logical replication subscriptions can
be created on the server. Setting it a lower value than the current be created on the server. Setting it to a lower value than the current
number of tracked replication origins (reflected in number of tracked replication origins (reflected in
<link linkend="view-pg-replication-origin-status">pg_replication_origin_status</link>, <link linkend="view-pg-replication-origin-status">pg_replication_origin_status</link>,
not <link linkend="catalog-pg-replication-origin">pg_replication_origin</link>) not <link linkend="catalog-pg-replication-origin">pg_replication_origin</link>)
...@@ -7732,12 +7732,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; ...@@ -7732,12 +7732,12 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
The <xref linkend="pgstatstatements"/> extension also requires a query The <xref linkend="pgstatstatements"/> extension also requires a query
identifier to be computed. Note that an external module can identifier to be computed. Note that an external module can
alternatively be used if the in-core query identifier computation alternatively be used if the in-core query identifier computation
specification isn't acceptable. In this case, in-core computation method is not acceptable. In this case, in-core computation
must be disabled. The default is <literal>off</literal>. must be disabled. The default is <literal>off</literal>.
</para> </para>
<note> <note>
<para> <para>
To ensure that a only one query identifier is calculated and To ensure that only one query identifier is calculated and
displayed, extensions that calculate query identifiers should displayed, extensions that calculate query identifiers should
throw an error if a query identifier has already been computed. throw an error if a query identifier has already been computed.
</para> </para>
......
...@@ -3560,7 +3560,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue> ...@@ -3560,7 +3560,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
<returnvalue>text</returnvalue> <returnvalue>text</returnvalue>
</para> </para>
<para> <para>
Evaluate escaped Unicode characters in argument. Unicode characters Evaluate escaped Unicode characters in the argument. Unicode characters
can be specified as can be specified as
<literal>\<replaceable>XXXX</replaceable></literal> (4 hexadecimal <literal>\<replaceable>XXXX</replaceable></literal> (4 hexadecimal
digits), <literal>\+<replaceable>XXXXXX</replaceable></literal> (6 digits), <literal>\+<replaceable>XXXXXX</replaceable></literal> (6
...@@ -24926,12 +24926,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); ...@@ -24926,12 +24926,12 @@ SELECT collation for ('foo' COLLATE "de_DE");
<returnvalue>boolean</returnvalue> <returnvalue>boolean</returnvalue>
</para> </para>
<para> <para>
Requests to log the memory contexts whose backend process has Requests to log the memory contexts of the backend with the
the specified process ID. These memory contexts will be logged at specified process ID. These memory contexts will be logged at
<literal>LOG</literal> message level. They will appear in <literal>LOG</literal> message level. They will appear in
the server log based on the log configuration set the server log based on the log configuration set
(See <xref linkend="runtime-config-logging"/> for more information), (See <xref linkend="runtime-config-logging"/> for more information),
but will not be sent to the client whatever the setting of but will not be sent to the client regardless of
<xref linkend="guc-client-min-messages"/>. <xref linkend="guc-client-min-messages"/>.
Only superusers can request to log the memory contexts. Only superusers can request to log the memory contexts.
</para></entry> </para></entry>
...@@ -25037,7 +25037,7 @@ SELECT collation for ('foo' COLLATE "de_DE"); ...@@ -25037,7 +25037,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
<para> <para>
<function>pg_log_backend_memory_contexts</function> can be used <function>pg_log_backend_memory_contexts</function> can be used
to log the memory contexts of the backend process. For example, to log the memory contexts of a backend process. For example:
<programlisting> <programlisting>
postgres=# SELECT pg_log_backend_memory_contexts(pg_backend_pid()); postgres=# SELECT pg_log_backend_memory_contexts(pg_backend_pid());
pg_log_backend_memory_contexts pg_log_backend_memory_contexts
...@@ -25061,8 +25061,8 @@ LOG: level: 1; TransactionAbortContext: 32768 total in 1 blocks; 32504 free (0 ...@@ -25061,8 +25061,8 @@ LOG: level: 1; TransactionAbortContext: 32768 total in 1 blocks; 32504 free (0
LOG: level: 1; ErrorContext: 8192 total in 1 blocks; 7928 free (3 chunks); 264 used LOG: level: 1; ErrorContext: 8192 total in 1 blocks; 7928 free (3 chunks); 264 used
LOG: Grand total: 1651920 bytes in 201 blocks; 622360 free (88 chunks); 1029560 used LOG: Grand total: 1651920 bytes in 201 blocks; 622360 free (88 chunks); 1029560 used
</screen> </screen>
For more than 100 child contexts under the same parent one, If there are more than 100 child contexts under the same parent, the first
100 child contexts and a summary of the remaining ones will be logged. 100 child contexts are logged, along with a summary of the remaining contexts.
Note that frequent calls to this function could incur significant overhead, Note that frequent calls to this function could incur significant overhead,
because it may generate a large number of log messages. because it may generate a large number of log messages.
</para> </para>
...@@ -25576,7 +25576,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup()); ...@@ -25576,7 +25576,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
Returns recovery pause state. The return values are <literal> Returns recovery pause state. The return values are <literal>
not paused</literal> if pause is not requested, <literal> not paused</literal> if pause is not requested, <literal>
pause requested</literal> if pause is requested but recovery is pause requested</literal> if pause is requested but recovery is
not yet paused and, <literal>paused</literal> if the recovery is not yet paused, and <literal>paused</literal> if the recovery is
actually paused. actually paused.
</para></entry> </para></entry>
</row> </row>
......
...@@ -490,9 +490,9 @@ ...@@ -490,9 +490,9 @@
any changes that happened during the initial data copy using standard any changes that happened during the initial data copy using standard
logical replication. During this synchronization phase, the changes logical replication. During this synchronization phase, the changes
are applied and committed in the same order as they happened on the are applied and committed in the same order as they happened on the
publisher. Once the synchronization is done, the control of the publisher. Once synchronization is done, control of the
replication of the table is given back to the main apply process where replication of the table is given back to the main apply process where
the replication continues as normal. replication continues as normal.
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
...@@ -602,10 +602,9 @@ ...@@ -602,10 +602,9 @@
</para> </para>
<para> <para>
The subscriber also requires the <varname>max_replication_slots</varname> <varname>max_replication_slots</varname> must also be set on the subscriber.
be set to configure how many replication origins can be tracked. In this It should be set to at least the number of subscriptions that will be added
case it should be set to at least the number of subscriptions that will be to the subscriber, plus some reserve for table synchronization.
added to the subscriber, plus some reserve for table synchronization.
<varname>max_logical_replication_workers</varname> must be set to at least <varname>max_logical_replication_workers</varname> must be set to at least
the number of subscriptions, again plus some reserve for the table the number of subscriptions, again plus some reserve for the table
synchronization. Additionally the <varname>max_worker_processes</varname> synchronization. Additionally the <varname>max_worker_processes</varname>
......
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
never issue <command>VACUUM FULL</command>. In this approach, the idea never issue <command>VACUUM FULL</command>. In this approach, the idea
is not to keep tables at their minimum size, but to maintain steady-state is not to keep tables at their minimum size, but to maintain steady-state
usage of disk space: each table occupies space equivalent to its usage of disk space: each table occupies space equivalent to its
minimum size plus however much space gets used up between vacuumings. minimum size plus however much space gets used up between vacuum runs.
Although <command>VACUUM FULL</command> can be used to shrink a table back Although <command>VACUUM FULL</command> can be used to shrink a table back
to its minimum size and return the disk space to the operating system, to its minimum size and return the disk space to the operating system,
there is not much point in this if the table will just grow again in the there is not much point in this if the table will just grow again in the
......
...@@ -5890,7 +5890,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, ...@@ -5890,7 +5890,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
</para> </para>
<para> <para>
When creating an index on a partitioned table, this column is set to When creating an index on a partitioned table, this column is set to
the number of partitions on which the index has been completed. the number of partitions on which the index has been created.
This field is <literal>0</literal> during a <literal>REINDEX</literal>. This field is <literal>0</literal> during a <literal>REINDEX</literal>.
</para></entry> </para></entry>
</row> </row>
......
...@@ -1747,7 +1747,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; ...@@ -1747,7 +1747,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
<xref linkend="guc-max-wal-senders"/> to zero. <xref linkend="guc-max-wal-senders"/> to zero.
But note that changing these settings requires a server restart, But note that changing these settings requires a server restart,
and makes any base backups taken before unavailable for archive and makes any base backups taken before unavailable for archive
recovery and standby server, which may lead to database loss. recovery and standby server, which may lead to data loss.
</para> </para>
<para> <para>
...@@ -1899,7 +1899,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse; ...@@ -1899,7 +1899,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
much faster. The following are configuration changes you can make much faster. The following are configuration changes you can make
to improve performance in such cases. Except as noted below, durability to improve performance in such cases. Except as noted below, durability
is still guaranteed in case of a crash of the database software; is still guaranteed in case of a crash of the database software;
only abrupt operating system stoppage creates a risk of data loss only an abrupt operating system crash creates a risk of data loss
or corruption when these settings are used. or corruption when these settings are used.
<itemizedlist> <itemizedlist>
......
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
<note> <note>
<para> <para>
The following details about constant replacement and The following details about constant replacement and
<structfield>queryid</structfield> only applies when <xref <structfield>queryid</structfield> only apply when <xref
linkend="guc-compute-query-id"/> is enabled. If you use an external linkend="guc-compute-query-id"/> is enabled. If you use an external
module instead to compute <structfield>queryid</structfield>, you module instead to compute <structfield>queryid</structfield>, you
should refer to its documentation for details. should refer to its documentation for details.
......
...@@ -551,8 +551,9 @@ OPTIONS (ADD password_required 'false'); ...@@ -551,8 +551,9 @@ OPTIONS (ADD password_required 'false');
<title>Connection Management Options</title> <title>Connection Management Options</title>
<para> <para>
By default all the open connections that <filename>postgres_fdw</filename> By default, all connections that <filename>postgres_fdw</filename>
established to the foreign servers are kept in local session for re-use. establishes to foreign servers are kept open in the local session
for re-use.
</para> </para>
<variablelist> <variablelist>
...@@ -562,11 +563,11 @@ OPTIONS (ADD password_required 'false'); ...@@ -562,11 +563,11 @@ OPTIONS (ADD password_required 'false');
<listitem> <listitem>
<para> <para>
This option controls whether <filename>postgres_fdw</filename> keeps This option controls whether <filename>postgres_fdw</filename> keeps
the connections to the foreign server open so that the subsequent the connections to the foreign server open so that subsequent
queries can re-use them. It can only be specified for a foreign server. queries can re-use them. It can only be specified for a foreign server.
The default is <literal>on</literal>. If set to <literal>off</literal>, The default is <literal>on</literal>. If set to <literal>off</literal>,
all connections to this foreign server will be discarded at the end of all connections to this foreign server will be discarded at the end of
transaction. each transaction.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -1520,7 +1520,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM ...@@ -1520,7 +1520,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="reloption-autovacuum-vauum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor"> <varlistentry id="reloption-autovacuum-vacuum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor">
<term><literal>autovacuum_vacuum_scale_factor</literal>, <literal>toast.autovacuum_vacuum_scale_factor</literal> (<type>floating point</type>) <term><literal>autovacuum_vacuum_scale_factor</literal>, <literal>toast.autovacuum_vacuum_scale_factor</literal> (<type>floating point</type>)
<indexterm> <indexterm>
<primary><varname>autovacuum_vacuum_scale_factor</varname> </primary> <primary><varname>autovacuum_vacuum_scale_factor</varname> </primary>
...@@ -1610,7 +1610,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM ...@@ -1610,7 +1610,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="reloption-autovacuum-vauum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit"> <varlistentry id="reloption-autovacuum-vacuum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit">
<term><literal>autovacuum_vacuum_cost_limit</literal>, <literal>toast.autovacuum_vacuum_cost_limit</literal> (<type>integer</type>) <term><literal>autovacuum_vacuum_cost_limit</literal>, <literal>toast.autovacuum_vacuum_cost_limit</literal> (<type>integer</type>)
<indexterm> <indexterm>
<primary><varname>autovacuum_vacuum_cost_limit</varname></primary> <primary><varname>autovacuum_vacuum_cost_limit</varname></primary>
......
...@@ -44,7 +44,7 @@ PostgreSQL documentation ...@@ -44,7 +44,7 @@ PostgreSQL documentation
If you wish to create a new superuser, you must connect as a If you wish to create a new superuser, you must connect as a
superuser, not merely with <literal>CREATEROLE</literal> privilege. superuser, not merely with <literal>CREATEROLE</literal> privilege.
Being a superuser implies the ability to bypass all access permission Being a superuser implies the ability to bypass all access permission
checks within the database, so superuserdom should not be granted lightly. checks within the database, so superuser access should not be granted lightly.
</para> </para>
<para> <para>
......
...@@ -335,7 +335,7 @@ DECLARE liahona CURSOR FOR SELECT * FROM films; ...@@ -335,7 +335,7 @@ DECLARE liahona CURSOR FOR SELECT * FROM films;
<para> <para>
According to the SQL standard, changes made to insensitive cursors by According to the SQL standard, changes made to insensitive cursors by
<literal>UPDATE ... WHERE CURRENT OF</literal> and <literal>DELETE <literal>UPDATE ... WHERE CURRENT OF</literal> and <literal>DELETE
... WHERE CURRENT OF</literal> statements are visibible in that same ... WHERE CURRENT OF</literal> statements are visible in that same
cursor. <productname>PostgreSQL</productname> treats these statements like cursor. <productname>PostgreSQL</productname> treats these statements like
all other data changing statements in that they are not visible in all other data changing statements in that they are not visible in
insensitive cursors. insensitive cursors.
......
...@@ -460,7 +460,7 @@ PostgreSQL documentation ...@@ -460,7 +460,7 @@ PostgreSQL documentation
<term><option>--skip=<replaceable class="parameter">option</replaceable></option></term> <term><option>--skip=<replaceable class="parameter">option</replaceable></option></term>
<listitem> <listitem>
<para> <para>
If <literal>"all-frozen"</literal> is given, table corruption checks If <literal>all-frozen</literal> is given, table corruption checks
will skip over pages in all tables that are marked as all frozen. will skip over pages in all tables that are marked as all frozen.
</para> </para>
<para> <para>
......
...@@ -1927,9 +1927,10 @@ testdb=&gt; ...@@ -1927,9 +1927,10 @@ testdb=&gt;
</para> </para>
<para> <para>
The column of the kind of extended stats (e.g. Ndistinct) shows its status. The status of each kind of extended statistics is shown in a column
NULL means that it doesn't exists. "defined" means that it was requested named after its statistic kind (e.g. Ndistinct).
when creating the statistics. "defined" means that it was requested when creating the statistics,
and NULL means it wasn't requested.
You can use pg_stats_ext if you'd like to know whether <link linkend="sql-analyze"> You can use pg_stats_ext if you'd like to know whether <link linkend="sql-analyze">
<command>ANALYZE</command></link> was run and statistics are available to the <command>ANALYZE</command></link> was run and statistics are available to the
planner. planner.
......
...@@ -797,7 +797,7 @@ ...@@ -797,7 +797,7 @@
<literal>fsync</literal>, or <literal>fsync_writethrough</literal>, <literal>fsync</literal>, or <literal>fsync_writethrough</literal>,
the write operation moves WAL buffers to kernel cache and the write operation moves WAL buffers to kernel cache and
<function>issue_xlog_fsync</function> syncs them to disk. Regardless <function>issue_xlog_fsync</function> syncs them to disk. Regardless
of the setting of <varname>track_wal_io_timing</varname>, the numbers of the setting of <varname>track_wal_io_timing</varname>, the number
of times <function>XLogWrite</function> writes and of times <function>XLogWrite</function> writes and
<function>issue_xlog_fsync</function> syncs WAL data to disk are also <function>issue_xlog_fsync</function> syncs WAL data to disk are also
counted as <literal>wal_write</literal> and <literal>wal_sync</literal> counted as <literal>wal_write</literal> and <literal>wal_sync</literal>
......
...@@ -1119,6 +1119,7 @@ AddNewRelationType(const char *typeName, ...@@ -1119,6 +1119,7 @@ AddNewRelationType(const char *typeName,
* reltypeid: OID to assign to rel's rowtype, or InvalidOid to select one * reltypeid: OID to assign to rel's rowtype, or InvalidOid to select one
* reloftypeid: if a typed table, OID of underlying type; else InvalidOid * reloftypeid: if a typed table, OID of underlying type; else InvalidOid
* ownerid: OID of new rel's owner * ownerid: OID of new rel's owner
* accessmtd: OID of new rel's access method
* tupdesc: tuple descriptor (source of column definitions) * tupdesc: tuple descriptor (source of column definitions)
* cooked_constraints: list of precooked check constraints and defaults * cooked_constraints: list of precooked check constraints and defaults
* relkind: relkind for new rel * relkind: relkind for new rel
......
...@@ -617,7 +617,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params, ...@@ -617,7 +617,7 @@ do_analyze_rel(Relation onerel, VacuumParams *params,
* *
* We assume that VACUUM hasn't set pg_class.reltuples already, even * We assume that VACUUM hasn't set pg_class.reltuples already, even
* during a VACUUM ANALYZE. Although VACUUM often updates pg_class, * during a VACUUM ANALYZE. Although VACUUM often updates pg_class,
* exceptions exists. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command * exceptions exist. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command
* will never update pg_class entries for index relations. It's also * will never update pg_class entries for index relations. It's also
* possible that an individual index's pg_class entry won't be updated * possible that an individual index's pg_class entry won't be updated
* during VACUUM if the index AM returns NULL from its amvacuumcleanup() * during VACUUM if the index AM returns NULL from its amvacuumcleanup()
......
...@@ -1422,7 +1422,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap, ...@@ -1422,7 +1422,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
PROGRESS_CLUSTER_PHASE_FINAL_CLEANUP); PROGRESS_CLUSTER_PHASE_FINAL_CLEANUP);
/* /*
* If the relation being rebuild is pg_class, swap_relation_files() * If the relation being rebuilt is pg_class, swap_relation_files()
* couldn't update pg_class's own pg_class entry (check comments in * couldn't update pg_class's own pg_class entry (check comments in
* swap_relation_files()), thus relfrozenxid was not updated. That's * swap_relation_files()), thus relfrozenxid was not updated. That's
* annoying because a potential reason for doing a VACUUM FULL is a * annoying because a potential reason for doing a VACUUM FULL is a
......
...@@ -410,7 +410,7 @@ CopyMultiInsertBufferCleanup(CopyMultiInsertInfo *miinfo, ...@@ -410,7 +410,7 @@ CopyMultiInsertBufferCleanup(CopyMultiInsertInfo *miinfo,
* Once flushed we also trim the tracked buffers list down to size by removing * Once flushed we also trim the tracked buffers list down to size by removing
* the buffers created earliest first. * the buffers created earliest first.
* *
* Callers should pass 'curr_rri' is the ResultRelInfo that's currently being * Callers should pass 'curr_rri' as the ResultRelInfo that's currently being
* used. When cleaning up old buffers we'll never remove the one for * used. When cleaning up old buffers we'll never remove the one for
* 'curr_rri'. * 'curr_rri'.
*/ */
......
...@@ -254,7 +254,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows, ...@@ -254,7 +254,7 @@ BuildRelationExtStatistics(Relation onerel, double totalrows,
* that would require additional columns. * that would require additional columns.
* *
* See statext_compute_stattarget for details about how we compute statistics * See statext_compute_stattarget for details about how we compute statistics
* target for a statistics objects (from the object target, attribute targets * target for a statistics object (from the object target, attribute targets
* and default statistics target). * and default statistics target).
*/ */
int int
......
...@@ -1651,7 +1651,7 @@ push_null_elements(JsonbParseState **ps, int num) ...@@ -1651,7 +1651,7 @@ push_null_elements(JsonbParseState **ps, int num)
* this path. E.g. the path [a][0][b] with the new value 1 will produce the * this path. E.g. the path [a][0][b] with the new value 1 will produce the
* structure {a: [{b: 1}]}. * structure {a: [{b: 1}]}.
* *
* Called is responsible to make sure such path does not exist yet. * Caller is responsible to make sure such path does not exist yet.
*/ */
static void static void
push_path(JsonbParseState **st, int level, Datum *path_elems, push_path(JsonbParseState **st, int level, Datum *path_elems,
...@@ -4887,7 +4887,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2, ...@@ -4887,7 +4887,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
* than just one last element, this flag will instruct to create the whole * than just one last element, this flag will instruct to create the whole
* chain of corresponding objects and insert the value. * chain of corresponding objects and insert the value.
* *
* JB_PATH_CONSISTENT_POSITION for an array indicates that the called wants to * JB_PATH_CONSISTENT_POSITION for an array indicates that the caller wants to
* keep values with fixed indices. Indices for existing elements could be * keep values with fixed indices. Indices for existing elements could be
* changed (shifted forward) in case if the array is prepended with a new value * changed (shifted forward) in case if the array is prepended with a new value
* and a negative index out of the range, so this behavior will be prevented * and a negative index out of the range, so this behavior will be prevented
......
...@@ -175,7 +175,7 @@ sub write_tuple ...@@ -175,7 +175,7 @@ sub write_tuple
seek($fh, $offset, 0) seek($fh, $offset, 0)
or BAIL_OUT("seek failed: $!"); or BAIL_OUT("seek failed: $!");
defined(syswrite($fh, $buffer, HEAPTUPLE_PACK_LENGTH)) defined(syswrite($fh, $buffer, HEAPTUPLE_PACK_LENGTH))
or BAIL_OUT("syswrite failed: $!");; or BAIL_OUT("syswrite failed: $!");
return; return;
} }
......
...@@ -241,7 +241,7 @@ ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE *first, size_t n ...@@ -241,7 +241,7 @@ ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE *first, size_t n
/* /*
* Find the median of three values. Currently, performance seems to be best * Find the median of three values. Currently, performance seems to be best
* if the the comparator is inlined here, but the med3 function is not inlined * if the comparator is inlined here, but the med3 function is not inlined
* in the qsort function. * in the qsort function.
*/ */
static pg_noinline ST_ELEMENT_TYPE * static pg_noinline ST_ELEMENT_TYPE *
......
...@@ -90,13 +90,12 @@ typedef enum ...@@ -90,13 +90,12 @@ typedef enum
* dividing line between "interactive" and "non-interactive" sources for * dividing line between "interactive" and "non-interactive" sources for
* error reporting purposes. * error reporting purposes.
* *
* PGC_S_TEST is used when testing values to be used later ("doit" will always * PGC_S_TEST is used when testing values to be used later. For example,
* be false, so this never gets stored as the actual source of any value). * ALTER DATABASE/ROLE tests proposed per-database or per-user defaults this
* For example, ALTER DATABASE/ROLE tests proposed per-database or per-user * way, and CREATE FUNCTION tests proposed function SET clauses this way.
* defaults this way, and CREATE FUNCTION tests proposed function SET clauses * This is an interactive case, but it needs its own source value because
* this way. This is an interactive case, but it needs its own source value * some assign hooks need to make different validity checks in this case.
* because some assign hooks need to make different validity checks in this * In particular, references to nonexistent database objects generally
* case. In particular, references to nonexistent database objects generally
* shouldn't throw hard errors in this case, at most NOTICEs, since the * shouldn't throw hard errors in this case, at most NOTICEs, since the
* objects might exist by the time the setting is used for real. * objects might exist by the time the setting is used for real.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment