diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/sgml/config.sgml | 11 | ||||
-rw-r--r-- | doc/src/sgml/ddl.sgml | 10 | ||||
-rw-r--r-- | doc/src/sgml/docguide.sgml | 4 | ||||
-rw-r--r-- | doc/src/sgml/func.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/protocol.sgml | 10 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_table.sgml | 16 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 12 | ||||
-rw-r--r-- | doc/src/sgml/ref/merge.sgml | 39 | ||||
-rw-r--r-- | doc/src/sgml/ref/pg_createsubscriber.sgml | 59 | ||||
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 8 | ||||
-rw-r--r-- | doc/src/sgml/ref/update.sgml | 3 | ||||
-rw-r--r-- | doc/src/sgml/release-18.sgml | 2 |
12 files changed, 99 insertions, 77 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b265cc89c9d..59a0874528a 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2788,7 +2788,7 @@ include_dir 'conf.d' </varlistentry> <varlistentry id="guc-io-workers" xreflabel="io_workers"> - <term><varname>io_workers</varname> (<type>int</type>) + <term><varname>io_workers</varname> (<type>integer</type>) <indexterm> <primary><varname>io_workers</varname> configuration parameter</primary> </indexterm> @@ -8602,7 +8602,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; timing information is displayed in <link linkend="vacuum-progress-reporting"><structname>pg_stat_progress_vacuum</structname></link>, <link linkend="analyze-progress-reporting"><structname>pg_stat_progress_analyze</structname></link>, - in the output of <xref linkend="sql-vacuum"/> when the + in the output of <xref linkend="sql-vacuum"/> and + <xref linkend="sql-analyze"/> when the <literal>VERBOSE</literal> option is used, and by autovacuum for auto-vacuums and auto-analyzes when <xref linkend="guc-log-autovacuum-min-duration"/> is set. @@ -9340,7 +9341,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-truncate" xreflabel="vacuum_truncate"> <term><varname>vacuum_truncate</varname> (<type>boolean</type>) <indexterm> - <primary><varname>vacuum_truncate</varname> configuration parameter</primary> + <primary><varname>vacuum_truncate</varname></primary> + <secondary>configuration parameter</secondary> </indexterm> </term> <listitem> @@ -9544,7 +9546,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; <varlistentry id="guc-vacuum-max-eager-freeze-failure-rate" xreflabel="vacuum_max_eager_freeze_failure_rate"> <term><varname>vacuum_max_eager_freeze_failure_rate</varname> (<type>floating point</type>) <indexterm> - <primary><varname>vacuum_max_eager_freeze_failure_rate</varname> configuration parameter</primary> + <primary><varname>vacuum_max_eager_freeze_failure_rate</varname></primary> + <secondary>configuration parameter</secondary> </indexterm> </term> <listitem> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 96936bcd3ae..65bc070d2e5 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -421,6 +421,16 @@ CREATE TABLE people ( </listitem> <listitem> <para> + A virtual generated column cannot have a user-defined type, and the + generation expression of a virtual generated column must not reference + user-defined functions or types, that is, it can only use built-in + functions or types. This applies also indirectly, such as for functions + or types that underlie operators or casts. (This restriction does not + exist for stored generated columns.) + </para> + </listitem> + <listitem> + <para> A generated column cannot have a column default or an identity definition. </para> </listitem> diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml index db4bcce56ea..7b61b4841aa 100644 --- a/doc/src/sgml/docguide.sgml +++ b/doc/src/sgml/docguide.sgml @@ -60,9 +60,7 @@ maintained by the <ulink url="https://www.oasis-open.org"> OASIS group</ulink>. The <ulink url="https://www.oasis-open.org/docbook/"> official DocBook site</ulink> has good introductory and reference documentation and - a complete O'Reilly book for your online reading pleasure. The - <ulink url="http://newbiedoc.sourceforge.net/metadoc/docbook-guide.html"> - NewbieDoc Docbook Guide</ulink> is very helpful for beginners. + a complete O'Reilly book for your online reading pleasure. The <ulink url="https://www.freebsd.org/docproj/"> FreeBSD Documentation Project</ulink> also uses DocBook and has some good information, including a number of style guidelines that might be diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index a6d79765c1a..224d4fe5a9f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -14384,7 +14384,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple <sect1 id="functions-uuid"> <title>UUID Functions</title> - <indexterm zone="datatype-uuid"> + <indexterm zone="functions-uuid"> <primary>UUID</primary> <secondary>generating</secondary> </indexterm> diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 137ffc8d0b7..82fe3f93761 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -7292,8 +7292,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" <term>Int64 (XLogRecPtr)</term> <listitem> <para> - The LSN of the abort. This field is available since protocol version - 4. + The LSN of the abort operation, present only when streaming is set to parallel. + This field is available since protocol version 4. </para> </listitem> </varlistentry> @@ -7302,9 +7302,9 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;" <term>Int64 (TimestampTz)</term> <listitem> <para> - Abort timestamp of the transaction. The value is in number - of microseconds since PostgreSQL epoch (2000-01-01). This field is - available since protocol version 4. + Abort timestamp of the transaction, present only when streaming is set to + parallel. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). + This field is available since protocol version 4. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index d63f3a621ac..d1696991683 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -460,8 +460,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <para> This form adds a new constraint to a table using the same constraint syntax as <link linkend="sql-createtable"><command>CREATE TABLE</command></link>, plus the option <literal>NOT - VALID</literal>, which is currently only allowed for foreign key, - <literal>CHECK</literal> constraints and not-null constraints. + VALID</literal>, which is currently only allowed for foreign-key, + <literal>CHECK</literal>, and not-null constraints. </para> <para> @@ -469,7 +469,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM existing rows in the table satisfy the new constraint. But if the <literal>NOT VALID</literal> option is used, this potentially-lengthy scan is skipped. The constraint will still be - enforced against subsequent inserts or updates (that is, they'll fail + applied against subsequent inserts or updates (that is, they'll fail unless there is a matching row in the referenced table, in the case of foreign keys, or they'll fail unless the new row matches the specified check condition). But the @@ -591,7 +591,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM This form validates a foreign key, check, or not-null constraint that was previously created as <literal>NOT VALID</literal>, by scanning the table to ensure there are no rows for which the constraint is not - satisfied. If the constraint is not enforced, an error is thrown. + satisfied. If the constraint was set to <literal>NOT ENFORCED</literal>, an error is thrown. Nothing happens if the constraint is already marked valid. (See <xref linkend="sql-altertable-notes"/> below for an explanation of the usefulness of this command.) @@ -1466,11 +1466,11 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </para> <para> - Adding an enforced <literal>CHECK</literal> or <literal>NOT NULL</literal> + Adding a <literal>CHECK</literal> or <literal>NOT NULL</literal> constraint requires scanning the table to verify that existing rows meet the constraint, but does not require a table rewrite. If a <literal>CHECK</literal> - constraint is added as <literal>NOT ENFORCED</literal>, the validation will - not be performed. + constraint is added as <literal>NOT ENFORCED</literal>, no verification will + be performed. </para> <para> @@ -1485,7 +1485,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM </para> <para> - Scanning a large table to verify a new foreign key or check constraint + Scanning a large table to verify new foreign-key, check, or not-null constraints can take a long time, and other updates to the table are locked out until the <command>ALTER TABLE ADD CONSTRAINT</command> command is committed. The main purpose of the <literal>NOT VALID</literal> diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index a5816918182..dc000e913c1 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -924,6 +924,15 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM not other generated columns. Any functions and operators used must be immutable. References to other tables are not allowed. </para> + + <para> + A virtual generated column cannot have a user-defined type, and the + generation expression of a virtual generated column must not reference + user-defined functions or types, that is, it can only use built-in + functions or types. This applies also indirectly, such as for functions + or types that underlie operators or casts. (This restriction does not + exist for stored generated columns.) + </para> </listitem> </varlistentry> @@ -1694,7 +1703,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <varlistentry id="reloption-vacuum-truncate" xreflabel="vacuum_truncate"> <term><literal>vacuum_truncate</literal>, <literal>toast.vacuum_truncate</literal> (<type>boolean</type>) <indexterm> - <primary><varname>vacuum_truncate</varname> storage parameter</primary> + <primary><varname>vacuum_truncate</varname></primary> + <secondary>storage parameter</secondary> </indexterm> </term> <listitem> diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml index ecbcd8345d8..c2e181066a4 100644 --- a/doc/src/sgml/ref/merge.sgml +++ b/doc/src/sgml/ref/merge.sgml @@ -23,37 +23,37 @@ PostgreSQL documentation <synopsis> [ WITH <replaceable class="parameter">with_query</replaceable> [, ...] ] MERGE INTO [ ONLY ] <replaceable class="parameter">target_table_name</replaceable> [ * ] [ [ AS ] <replaceable class="parameter">target_alias</replaceable> ] -USING <replaceable class="parameter">data_source</replaceable> ON <replaceable class="parameter">join_condition</replaceable> -<replaceable class="parameter">when_clause</replaceable> [...] -[ RETURNING [ WITH ( { OLD | NEW } AS <replaceable class="parameter">output_alias</replaceable> [, ...] ) ] - { * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] } [, ...] ] + USING <replaceable class="parameter">data_source</replaceable> ON <replaceable class="parameter">join_condition</replaceable> + <replaceable class="parameter">when_clause</replaceable> [...] + [ RETURNING [ WITH ( { OLD | NEW } AS <replaceable class="parameter">output_alias</replaceable> [, ...] ) ] + { * | <replaceable class="parameter">output_expression</replaceable> [ [ AS ] <replaceable class="parameter">output_name</replaceable> ] } [, ...] ] <phrase>where <replaceable class="parameter">data_source</replaceable> is:</phrase> -{ [ ONLY ] <replaceable class="parameter">source_table_name</replaceable> [ * ] | ( <replaceable class="parameter">source_query</replaceable> ) } [ [ AS ] <replaceable class="parameter">source_alias</replaceable> ] + { [ ONLY ] <replaceable class="parameter">source_table_name</replaceable> [ * ] | ( <replaceable class="parameter">source_query</replaceable> ) } [ [ AS ] <replaceable class="parameter">source_alias</replaceable> ] <phrase>and <replaceable class="parameter">when_clause</replaceable> is:</phrase> -{ WHEN MATCHED [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | - WHEN NOT MATCHED BY SOURCE [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | - WHEN NOT MATCHED [ BY TARGET ] [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_insert</replaceable> | DO NOTHING } } + { WHEN MATCHED [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | + WHEN NOT MATCHED BY SOURCE [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_update</replaceable> | <replaceable class="parameter">merge_delete</replaceable> | DO NOTHING } | + WHEN NOT MATCHED [ BY TARGET ] [ AND <replaceable class="parameter">condition</replaceable> ] THEN { <replaceable class="parameter">merge_insert</replaceable> | DO NOTHING } } <phrase>and <replaceable class="parameter">merge_insert</replaceable> is:</phrase> -INSERT [( <replaceable class="parameter">column_name</replaceable> [, ...] )] -[ OVERRIDING { SYSTEM | USER } VALUE ] -{ VALUES ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | DEFAULT VALUES } + INSERT [( <replaceable class="parameter">column_name</replaceable> [, ...] )] + [ OVERRIDING { SYSTEM | USER } VALUE ] + { VALUES ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | DEFAULT VALUES } <phrase>and <replaceable class="parameter">merge_update</replaceable> is:</phrase> -UPDATE SET { <replaceable class="parameter">column_name</replaceable> = { <replaceable class="parameter">expression</replaceable> | DEFAULT } | - ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = [ ROW ] ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | - ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = ( <replaceable class="parameter">sub-SELECT</replaceable> ) - } [, ...] + UPDATE SET { <replaceable class="parameter">column_name</replaceable> = { <replaceable class="parameter">expression</replaceable> | DEFAULT } | + ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = [ ROW ] ( { <replaceable class="parameter">expression</replaceable> | DEFAULT } [, ...] ) | + ( <replaceable class="parameter">column_name</replaceable> [, ...] ) = ( <replaceable class="parameter">sub-SELECT</replaceable> ) + } [, ...] <phrase>and <replaceable class="parameter">merge_delete</replaceable> is:</phrase> -DELETE + DELETE </synopsis> </refsynopsisdiv> @@ -106,10 +106,11 @@ DELETE to compute and return value(s) based on each row inserted, updated, or deleted. Any expression using the source or target table's columns, or the <link linkend="merge-action"><function>merge_action()</function></link> - function can be computed. When an <command>INSERT</command> or + function can be computed. By default, when an <command>INSERT</command> or <command>UPDATE</command> action is performed, the new values of the target - table's columns are used. When a <command>DELETE</command> is performed, - the old values of the target table's columns are used. The syntax of the + table's columns are used, and when a <command>DELETE</command> is performed, + the old values of the target table's columns are used, but it is also + possible to explicitly request old and new values. The syntax of the <literal>RETURNING</literal> list is identical to that of the output list of <command>SELECT</command>. </para> diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml index 4b1d08d5f16..bb9cc72576c 100644 --- a/doc/src/sgml/ref/pg_createsubscriber.sgml +++ b/doc/src/sgml/ref/pg_createsubscriber.sgml @@ -170,36 +170,6 @@ PostgreSQL documentation </varlistentry> <varlistentry> - <term><option>-R <replaceable class="parameter">objtype</replaceable></option></term> - <term><option>--remove=<replaceable class="parameter">objtype</replaceable></option></term> - <listitem> - <para> - Remove all objects of the specified type from specified databases on the - target server. - </para> - <para> - <itemizedlist> - <listitem> - <para> - <literal>publications</literal>: - The <literal>FOR ALL TABLES</literal> publications established for this - subscriber are always removed; specifying this object type causes all - other publications replicated from the source server to be dropped as - well. - </para> - </listitem> - </itemizedlist> - </para> - <para> - The objects selected to be dropped are individually logged, including during - a <option>--dry-run</option>. There is no opportunity to affect or stop the - dropping of the selected objects, so consider taking a backup of them - using <application>pg_dump</application>. - </para> - </listitem> - </varlistentry> - - <varlistentry> <term><option>-s <replaceable class="parameter">dir</replaceable></option></term> <term><option>--socketdir=<replaceable class="parameter">dir</replaceable></option></term> <listitem> @@ -260,6 +230,35 @@ PostgreSQL documentation </varlistentry> <varlistentry> + <term><option>--clean=<replaceable class="parameter">objtype</replaceable></option></term> + <listitem> + <para> + Drop all objects of the specified type from specified databases on the + target server. + </para> + <para> + <itemizedlist> + <listitem> + <para> + <literal>publications</literal>: + The <literal>FOR ALL TABLES</literal> publications established for this + subscriber are always dropped; specifying this object type causes all + other publications replicated from the source server to be dropped as + well. + </para> + </listitem> + </itemizedlist> + </para> + <para> + The objects selected to be dropped are individually logged, including during + a <option>--dry-run</option>. There is no opportunity to affect or stop the + dropping of the selected objects, so consider taking a backup of them + using <application>pg_dump</application>. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><option>--config-file=<replaceable class="parameter">filename</replaceable></option></term> <listitem> <para> diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 570ef21d1fc..95f4cac2467 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1067,8 +1067,8 @@ INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1 </listitem> </varlistentry> - <varlistentry id="app-psql-meta-command-close"> - <term><literal>\close</literal> <replaceable class="parameter">prepared_statement_name</replaceable></term> + <varlistentry id="app-psql-meta-command-close-prepared"> + <term><literal>\close_prepared</literal> <replaceable class="parameter">prepared_statement_name</replaceable></term> <listitem> <para> @@ -1081,7 +1081,7 @@ INSERT INTO tbls1 VALUES ($1, $2) \parse stmt1 Example: <programlisting> SELECT $1 \parse stmt1 -\close stmt1 +\close_prepared stmt1 </programlisting> </para> @@ -3710,7 +3710,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> All queries executed while a pipeline is ongoing use the extended query protocol. Queries are appended to the pipeline when ending with a semicolon. The meta-commands <literal>\bind</literal>, - <literal>\bind_named</literal>, <literal>\close</literal> or + <literal>\bind_named</literal>, <literal>\close_prepared</literal> or <literal>\parse</literal> can be used in an ongoing pipeline. While a pipeline is ongoing, <literal>\sendpipeline</literal> will append the current query buffer to the pipeline. Other meta-commands like diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 12ec5ba0709..40cca063946 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -57,7 +57,8 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [ to compute and return value(s) based on each row actually updated. Any expression using the table's columns, and/or columns of other tables mentioned in <literal>FROM</literal>, can be computed. - The new (post-update) values of the table's columns are used. + By default, the new (post-update) values of the table's columns are used, + but it is also possible to request the old (pre-update) values. The syntax of the <literal>RETURNING</literal> list is identical to that of the output list of <command>SELECT</command>. </para> diff --git a/doc/src/sgml/release-18.sgml b/doc/src/sgml/release-18.sgml index 662c7d8890f..66a6817a2be 100644 --- a/doc/src/sgml/release-18.sgml +++ b/doc/src/sgml/release-18.sgml @@ -2746,7 +2746,7 @@ Author: Michael Paquier <michael@paquier.xyz> <link linkend="app-psql-meta-command-bind-named"><literal>\bind_named</literal></link>, and <link - linkend="app-psql-meta-command-close"><literal>\close</literal></link>. + linkend="app-psql-meta-command-close-prepared"><literal>\close_prepared</literal></link>. </para> </listitem> |