summaryrefslogtreecommitdiffstats
path: root/doc/src/sgml/ref
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:05:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:05:26 +0000
commite75d99818dd3940be997520e64db8c9e3b207e39 (patch)
tree0003ca0de74fcc8d18433e34ea68d2e7aaf06b7c /doc/src/sgml/ref
parentReleasing progress-linux version 15.6-0+deb12u1~progress6.99u1. (diff)
downloadpostgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.tar.xz
postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.zip
Merging upstream version 15.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/src/sgml/ref')
-rw-r--r--doc/src/sgml/ref/alter_default_privileges.sgml6
-rw-r--r--doc/src/sgml/ref/alter_table.sgml2
-rw-r--r--doc/src/sgml/ref/create_collation.sgml2
-rw-r--r--doc/src/sgml/ref/create_database.sgml2
-rw-r--r--doc/src/sgml/ref/create_table.sgml10
-rw-r--r--doc/src/sgml/ref/createdb.sgml2
-rw-r--r--doc/src/sgml/ref/ecpg-ref.sgml6
-rw-r--r--doc/src/sgml/ref/merge.sgml86
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml3
-rw-r--r--doc/src/sgml/ref/pg_rewind.sgml5
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml4
-rw-r--r--doc/src/sgml/ref/security_label.sgml2
12 files changed, 79 insertions, 51 deletions
diff --git a/doc/src/sgml/ref/alter_default_privileges.sgml b/doc/src/sgml/ref/alter_default_privileges.sgml
index 8a60061..d0ac296 100644
--- a/doc/src/sgml/ref/alter_default_privileges.sgml
+++ b/doc/src/sgml/ref/alter_default_privileges.sgml
@@ -46,7 +46,8 @@ GRANT { USAGE | ALL [ PRIVILEGES ] }
ON TYPES
TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
-GRANT { USAGE | CREATE | ALL [ PRIVILEGES ] }
+GRANT { { USAGE | CREATE }
+ [, ...] | ALL [ PRIVILEGES ] }
ON SCHEMAS
TO { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...] [ WITH GRANT OPTION ]
@@ -77,7 +78,8 @@ REVOKE [ GRANT OPTION FOR ]
[ CASCADE | RESTRICT ]
REVOKE [ GRANT OPTION FOR ]
- { USAGE | CREATE | ALL [ PRIVILEGES ] }
+ { { USAGE | CREATE }
+ [, ...] | ALL [ PRIVILEGES ] }
ON SCHEMAS
FROM { [ GROUP ] <replaceable class="parameter">role_name</replaceable> | PUBLIC } [, ...]
[ CASCADE | RESTRICT ]
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 6fd8faf..eee1f4b 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -134,7 +134,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
-{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ COLLATE <replaceable class="parameter">collation</replaceable> ] [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
diff --git a/doc/src/sgml/ref/create_collation.sgml b/doc/src/sgml/ref/create_collation.sgml
index 58f5f0c..11c0089 100644
--- a/doc/src/sgml/ref/create_collation.sgml
+++ b/doc/src/sgml/ref/create_collation.sgml
@@ -139,7 +139,7 @@ CREATE COLLATION [ IF NOT EXISTS ] <replaceable>name</replaceable> FROM <replace
logically equal by the comparison. PostgreSQL breaks ties using a
byte-wise comparison. Comparison that is not deterministic can make the
collation be, say, case- or accent-insensitive. For that, you need to
- choose an appropriate <literal>LC_COLLATE</literal> setting
+ choose an appropriate <literal>LOCALE</literal> setting
<emphasis>and</emphasis> set the collation to not deterministic here.
</para>
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index ea38c64..55414e4 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -25,7 +25,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
[ WITH ] [ OWNER [=] <replaceable class="parameter">user_name</replaceable> ]
[ TEMPLATE [=] <replaceable class="parameter">template</replaceable> ]
[ ENCODING [=] <replaceable class="parameter">encoding</replaceable> ]
- [ STRATEGY [=] <replaceable class="parameter">strategy</replaceable> ] ]
+ [ STRATEGY [=] <replaceable class="parameter">strategy</replaceable> ]
[ LOCALE [=] <replaceable class="parameter">locale</replaceable> ]
[ LC_COLLATE [=] <replaceable class="parameter">lc_collate</replaceable> ]
[ LC_CTYPE [=] <replaceable class="parameter">lc_ctype</replaceable> ]
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index 0301dff..8af4990 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -104,7 +104,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
-{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ COLLATE <replaceable class="parameter">collation</replaceable> ] [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
@@ -1057,6 +1057,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
no two rows in the table contain overlapping circles
(see <xref linkend="datatype-geometric"/>) by using the
<literal>&amp;&amp;</literal> operator.
+ The operator(s) are required to be commutative.
</para>
<para>
@@ -1065,11 +1066,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
appropriate operator class
(see <xref linkend="indexes-opclass"/>) for the index access
method <replaceable>index_method</replaceable>.
- The operators are required to be commutative.
Each <replaceable class="parameter">exclude_element</replaceable>
- can optionally specify an operator class and/or ordering options;
- these are described fully under
- <xref linkend="sql-createindex"/>.
+ defines a column of the index, so it can optionally specify a collation,
+ an operator class, operator class parameters, and/or ordering options;
+ these are described fully under <xref linkend="sql-createindex"/>.
</para>
<para>
diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml
index 671cd36..058a6c4 100644
--- a/doc/src/sgml/ref/createdb.sgml
+++ b/doc/src/sgml/ref/createdb.sgml
@@ -178,7 +178,7 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>-S <replaceable class="parameter">template</replaceable></option></term>
+ <term><option>-S <replaceable class="parameter">strategy</replaceable></option></term>
<term><option>--strategy=<replaceable class="parameter">strategy</replaceable></option></term>
<listitem>
<para>
diff --git a/doc/src/sgml/ref/ecpg-ref.sgml b/doc/src/sgml/ref/ecpg-ref.sgml
index f3b6034..43f2d8b 100644
--- a/doc/src/sgml/ref/ecpg-ref.sgml
+++ b/doc/src/sgml/ref/ecpg-ref.sgml
@@ -93,10 +93,12 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>-D <replaceable>symbol</replaceable></option></term>
+ <term><option>-D <replaceable>symbol</replaceable>[=<replaceable>value</replaceable>]</option></term>
<listitem>
<para>
- Define a C preprocessor symbol.
+ Define a preprocessor symbol, equivalently to the <command>EXEC SQL
+ DEFINE</command> directive. If no <replaceable>value</replaceable> is
+ specified, the symbol is defined with the value <literal>1</literal>.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml
index f643e62..815b998 100644
--- a/doc/src/sgml/ref/merge.sgml
+++ b/doc/src/sgml/ref/merge.sgml
@@ -44,7 +44,9 @@ INSERT [( <replaceable class="parameter">column_name</replaceable> [, ...] )]
<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> [, ...] ) = ( { <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>
@@ -57,7 +59,7 @@ DELETE
<para>
<command>MERGE</command> performs actions that modify rows in the
- <replaceable class="parameter">target_table_name</replaceable>,
+ target table identified as <replaceable class="parameter">target_table_name</replaceable>,
using the <replaceable class="parameter">data_source</replaceable>.
<command>MERGE</command> provides a single <acronym>SQL</acronym>
statement that can conditionally <command>INSERT</command>,
@@ -68,7 +70,7 @@ DELETE
<para>
First, the <command>MERGE</command> command performs a join
from <replaceable class="parameter">data_source</replaceable> to
- <replaceable class="parameter">target_table_name</replaceable>
+ the target table
producing zero or more candidate change rows. For each candidate change
row, the status of <literal>MATCHED</literal> or <literal>NOT MATCHED</literal>
is set just once, after which <literal>WHEN</literal> clauses are evaluated
@@ -83,7 +85,7 @@ DELETE
<command>DELETE</command> commands of the same names. The syntax of
those commands is different, notably that there is no <literal>WHERE</literal>
clause and no table name is specified. All actions refer to the
- <replaceable class="parameter">target_table_name</replaceable>,
+ target table,
though modifications to other tables may be made using triggers.
</para>
@@ -98,23 +100,27 @@ DELETE
There is no separate <literal>MERGE</literal> privilege.
If you specify an update action, you must have the
<literal>UPDATE</literal> privilege on the column(s)
- of the <replaceable class="parameter">target_table_name</replaceable>
+ of the target table
that are referred to in the <literal>SET</literal> clause.
If you specify an insert action, you must have the <literal>INSERT</literal>
- privilege on the <replaceable class="parameter">target_table_name</replaceable>.
+ privilege on the target table.
If you specify a delete action, you must have the <literal>DELETE</literal>
- privilege on the <replaceable class="parameter">target_table_name</replaceable>.
+ privilege on the target table.
+ If you specify a <literal>DO NOTHING</literal> action, you must have
+ the <literal>SELECT</literal> privilege on at least one column
+ of the target table.
+ You will also need <literal>SELECT</literal> privilege on any column(s)
+ of the <replaceable class="parameter">data_source</replaceable> and
+ of the target table referred to
+ in any <literal>condition</literal> (including <literal>join_condition</literal>)
+ or <literal>expression</literal>.
Privileges are tested once at statement start and are checked
whether or not particular <literal>WHEN</literal> clauses are executed.
- You will require the <literal>SELECT</literal> privilege on any column(s)
- of the <replaceable class="parameter">data_source</replaceable> and
- <replaceable class="parameter">target_table_name</replaceable> referred to
- in any <literal>condition</literal> or <literal>expression</literal>.
</para>
<para>
<command>MERGE</command> is not supported if the
- <replaceable class="parameter">target_table_name</replaceable> is a
+ target table is a
materialized view, foreign table, or if it has any
rules defined on it.
</para>
@@ -125,6 +131,19 @@ DELETE
<variablelist>
<varlistentry>
+ <term><replaceable class="parameter">with_query</replaceable></term>
+ <listitem>
+ <para>
+ The <literal>WITH</literal> clause allows you to specify one or more
+ subqueries that can be referenced by name in the <command>MERGE</command>
+ query. See <xref linkend="queries-with"/> and <xref linkend="sql-select"/>
+ for details. Note that <literal>WITH RECURSIVE</literal> is not supported
+ by <command>MERGE</command>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><replaceable class="parameter">target_table_name</replaceable></term>
<listitem>
<para>
@@ -175,7 +194,7 @@ DELETE
<para>
A query (<command>SELECT</command> statement or <command>VALUES</command>
statement) that supplies the rows to be merged into the
- <replaceable class="parameter">target_table_name</replaceable>.
+ target table.
Refer to the <xref linkend="sql-select"/>
statement or <xref linkend="sql-values"/>
statement for a description of the syntax.
@@ -203,16 +222,15 @@ DELETE
<type>boolean</type> (similar to a <literal>WHERE</literal>
clause) that specifies which rows in the
<replaceable class="parameter">data_source</replaceable>
- match rows in the
- <replaceable class="parameter">target_table_name</replaceable>.
+ match rows in the target table.
</para>
<warning>
<para>
- Only columns from <replaceable class="parameter">target_table_name</replaceable>
+ Only columns from the target table
that attempt to match <replaceable class="parameter">data_source</replaceable>
rows should appear in <replaceable class="parameter">join_condition</replaceable>.
<replaceable class="parameter">join_condition</replaceable> subexpressions that
- only reference <replaceable class="parameter">target_table_name</replaceable>
+ only reference the target table's
columns can affect which action is taken, often in surprising ways.
</para>
</warning>
@@ -228,7 +246,7 @@ DELETE
<para>
If the <literal>WHEN</literal> clause specifies <literal>WHEN MATCHED</literal>
and the candidate change row matches a row in the
- <replaceable class="parameter">target_table_name</replaceable>,
+ target table,
the <literal>WHEN</literal> clause is executed if the
<replaceable class="parameter">condition</replaceable> is
absent or it evaluates to <literal>true</literal>.
@@ -237,7 +255,7 @@ DELETE
Conversely, if the <literal>WHEN</literal> clause specifies
<literal>WHEN NOT MATCHED</literal>
and the candidate change row does not match a row in the
- <replaceable class="parameter">target_table_name</replaceable>,
+ target table,
the <literal>WHEN</literal> clause is executed if the
<replaceable class="parameter">condition</replaceable> is
absent or it evaluates to <literal>true</literal>.
@@ -280,10 +298,10 @@ DELETE
or null if there is none.
</para>
<para>
- If <replaceable class="parameter">target_table_name</replaceable>
+ If the target table
is a partitioned table, each row is routed to the appropriate partition
and inserted into it.
- If <replaceable class="parameter">target_table_name</replaceable>
+ If the target table
is a partition, an error will occur if any input row violates the
partition constraint.
</para>
@@ -304,7 +322,7 @@ DELETE
<listitem>
<para>
The specification of an <literal>UPDATE</literal> action that updates
- the current row of the <replaceable class="parameter">target_table_name</replaceable>.
+ the current row of the target table.
Column names may not be specified more than once.
</para>
<para>
@@ -318,7 +336,7 @@ DELETE
<listitem>
<para>
Specifies a <literal>DELETE</literal> action that deletes the current row
- of the <replaceable class="parameter">target_table_name</replaceable>.
+ of the target table.
Do not include the table name or any other clauses, as you would normally
do with a <xref linkend="sql-delete"/> command.
</para>
@@ -329,8 +347,7 @@ DELETE
<term><replaceable class="parameter">column_name</replaceable></term>
<listitem>
<para>
- The name of a column in the <replaceable
- class="parameter">target_table_name</replaceable>. The column name
+ The name of a column in the target table. The column name
can be qualified with a subfield name or array subscript, if
needed. (Inserting into only some fields of a composite
column leaves the other fields null.)
@@ -381,9 +398,10 @@ DELETE
An expression to assign to the column. If used in a
<literal>WHEN MATCHED</literal> clause, the expression can use values
from the original row in the target table, and values from the
- <literal>data_source</literal> row.
+ <replaceable class="parameter">data_source</replaceable> row.
If used in a <literal>WHEN NOT MATCHED</literal> clause, the
- expression can use values from the <literal>data_source</literal>.
+ expression can use values from the
+ <replaceable class="parameter">data_source</replaceable> row.
</para>
</listitem>
</varlistentry>
@@ -399,13 +417,17 @@ DELETE
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">with_query</replaceable></term>
+ <term><replaceable class="parameter">sub-SELECT</replaceable></term>
<listitem>
<para>
- The <literal>WITH</literal> clause allows you to specify one or more
- subqueries that can be referenced by name in the <command>MERGE</command>
- query. See <xref linkend="queries-with"/> and <xref linkend="sql-select"/>
- for details.
+ A <literal>SELECT</literal> sub-query that produces as many output columns
+ as are listed in the parenthesized column list preceding it. The
+ sub-query must yield no more than one row when executed. If it
+ yields one row, its column values are assigned to the target columns;
+ if it yields no rows, NULL values are assigned to the target columns.
+ The sub-query can refer to values from the original row in the target table,
+ and values from the <replaceable class="parameter">data_source</replaceable>
+ row.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index a5f63bd..04323af 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -905,7 +905,8 @@ PostgreSQL documentation
The backup will include all files in the data directory and tablespaces,
including the configuration files and any additional files placed in the
directory by third parties, except certain temporary files managed by
- PostgreSQL. But only regular files and directories are copied, except that
+ PostgreSQL and operating system files. But only regular files and
+ directories are copied, except that
symbolic links used for tablespaces are preserved. Symbolic links pointing
to certain directories known to PostgreSQL are copied as empty directories.
Other symbolic links and special device files are skipped.
diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index 69d6924..dffb1b1 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -389,8 +389,9 @@ GRANT EXECUTE ON function pg_catalog.pg_read_binary_file(text, bigint, bigint, b
<filename>backup_label</filename>,
<filename>tablespace_map</filename>,
<filename>pg_internal.init</filename>,
- <filename>postmaster.opts</filename>, and
- <filename>postmaster.pid</filename>, as well as any file or directory
+ <filename>postmaster.opts</filename>,
+ <filename>postmaster.pid</filename> and
+ <filename>.DS_Store</filename> as well as any file or directory
beginning with <filename>pgsql_tmp</filename>, are omitted.
</para>
</step>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index d0bd119..9bdc028 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -540,7 +540,7 @@ EOF
</varlistentry>
<varlistentry>
- <term><option>-X,</option></term>
+ <term><option>-X</option></term>
<term><option>--no-psqlrc</option></term>
<listitem>
<para>
@@ -2919,7 +2919,7 @@ lo_import 152801
</indexterm>
writes column values separated by commas, applying the quoting
rules described in
- <ulink url="https://tools.ietf.org/html/rfc4180">RFC 4180</ulink>.
+ <ulink url="https://datatracker.ietf.org/doc/html/rfc4180">RFC 4180</ulink>.
This output is compatible with the CSV format of the server's
<command>COPY</command> command.
A header line with column names is generated unless
diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml
index 5f96b7e..e5e5fb4 100644
--- a/doc/src/sgml/ref/security_label.sgml
+++ b/doc/src/sgml/ref/security_label.sgml
@@ -29,7 +29,7 @@ SECURITY LABEL [ FOR <replaceable class="parameter">provider</replaceable> ] ON
DATABASE <replaceable class="parameter">object_name</replaceable> |
DOMAIN <replaceable class="parameter">object_name</replaceable> |
EVENT TRIGGER <replaceable class="parameter">object_name</replaceable> |
- FOREIGN TABLE <replaceable class="parameter">object_name</replaceable>
+ FOREIGN TABLE <replaceable class="parameter">object_name</replaceable> |
FUNCTION <replaceable class="parameter">function_name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ] |
LARGE OBJECT <replaceable class="parameter">large_object_oid</replaceable> |
MATERIALIZED VIEW <replaceable class="parameter">object_name</replaceable> |