From e75d99818dd3940be997520e64db8c9e3b207e39 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 21 May 2024 07:05:26 +0200 Subject: Merging upstream version 15.7. Signed-off-by: Daniel Baumann --- doc/src/sgml/ref/alter_default_privileges.sgml | 6 +- doc/src/sgml/ref/alter_table.sgml | 2 +- doc/src/sgml/ref/create_collation.sgml | 2 +- doc/src/sgml/ref/create_database.sgml | 2 +- doc/src/sgml/ref/create_table.sgml | 10 +-- doc/src/sgml/ref/createdb.sgml | 2 +- doc/src/sgml/ref/ecpg-ref.sgml | 6 +- doc/src/sgml/ref/merge.sgml | 86 ++++++++++++++++---------- doc/src/sgml/ref/pg_basebackup.sgml | 3 +- doc/src/sgml/ref/pg_rewind.sgml | 5 +- doc/src/sgml/ref/psql-ref.sgml | 4 +- doc/src/sgml/ref/security_label.sgml | 2 +- 12 files changed, 79 insertions(+), 51 deletions(-) (limited to 'doc/src/sgml/ref') 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 ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ] -GRANT { USAGE | CREATE | ALL [ PRIVILEGES ] } +GRANT { { USAGE | CREATE } + [, ...] | ALL [ PRIVILEGES ] } ON SCHEMAS TO { [ GROUP ] role_name | 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 ] role_name | 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 numeric_literal, REM exclude_element in an EXCLUDE constraint is: -{ column_name | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] +{ column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] referential_action in a FOREIGN KEY/REFERENCES constraint is: 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 ] name FROM LC_COLLATE setting + choose an appropriate LOCALE setting and set the collation to not deterministic here. 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 name [ WITH ] [ OWNER [=] user_name ] [ TEMPLATE [=] template ] [ ENCODING [=] encoding ] - [ STRATEGY [=] strategy ] ] + [ STRATEGY [=] strategy ] [ LOCALE [=] locale ] [ LC_COLLATE [=] lc_collate ] [ LC_CTYPE [=] lc_ctype ] 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 numeric_literal, REM exclude_element in an EXCLUDE constraint is: -{ column_name | ( expression ) } [ opclass ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] +{ column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ] referential_action in a FOREIGN KEY/REFERENCES constraint is: @@ -1057,6 +1057,7 @@ WITH ( MODULUS numeric_literal, REM no two rows in the table contain overlapping circles (see ) by using the && operator. + The operator(s) are required to be commutative. @@ -1065,11 +1066,10 @@ WITH ( MODULUS numeric_literal, REM appropriate operator class (see ) for the index access method index_method. - The operators are required to be commutative. Each exclude_element - can optionally specify an operator class and/or ordering options; - these are described fully under - . + 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 . 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 - + 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 - + - Define a C preprocessor symbol. + Define a preprocessor symbol, equivalently to the EXEC SQL + DEFINE directive. If no value is + specified, the symbol is defined with the value 1. 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 [( column_name [, ...] )] and merge_update is: UPDATE SET { column_name = { expression | DEFAULT } | - ( column_name [, ...] ) = ( { expression | DEFAULT } [, ...] ) } [, ...] + ( column_name [, ...] ) = [ ROW ] ( { expression | DEFAULT } [, ...] ) | + ( column_name [, ...] ) = ( sub-SELECT ) + } [, ...] and merge_delete is: @@ -57,7 +59,7 @@ DELETE MERGE performs actions that modify rows in the - target_table_name, + target table identified as target_table_name, using the data_source. MERGE provides a single SQL statement that can conditionally INSERT, @@ -68,7 +70,7 @@ DELETE First, the MERGE command performs a join from data_source to - target_table_name + the target table producing zero or more candidate change rows. For each candidate change row, the status of MATCHED or NOT MATCHED is set just once, after which WHEN clauses are evaluated @@ -83,7 +85,7 @@ DELETE DELETE commands of the same names. The syntax of those commands is different, notably that there is no WHERE clause and no table name is specified. All actions refer to the - target_table_name, + target table, though modifications to other tables may be made using triggers. @@ -98,23 +100,27 @@ DELETE There is no separate MERGE privilege. If you specify an update action, you must have the UPDATE privilege on the column(s) - of the target_table_name + of the target table that are referred to in the SET clause. If you specify an insert action, you must have the INSERT - privilege on the target_table_name. + privilege on the target table. If you specify a delete action, you must have the DELETE - privilege on the target_table_name. + privilege on the target table. + If you specify a DO NOTHING action, you must have + the SELECT privilege on at least one column + of the target table. + You will also need SELECT privilege on any column(s) + of the data_source and + of the target table referred to + in any condition (including join_condition) + or expression. Privileges are tested once at statement start and are checked whether or not particular WHEN clauses are executed. - You will require the SELECT privilege on any column(s) - of the data_source and - target_table_name referred to - in any condition or expression. MERGE is not supported if the - target_table_name is a + target table is a materialized view, foreign table, or if it has any rules defined on it. @@ -124,6 +130,19 @@ DELETE Parameters + + with_query + + + The WITH clause allows you to specify one or more + subqueries that can be referenced by name in the MERGE + query. See and + for details. Note that WITH RECURSIVE is not supported + by MERGE. + + + + target_table_name @@ -175,7 +194,7 @@ DELETE A query (SELECT statement or VALUES statement) that supplies the rows to be merged into the - target_table_name. + target table. Refer to the statement or statement for a description of the syntax. @@ -203,16 +222,15 @@ DELETE boolean (similar to a WHERE clause) that specifies which rows in the data_source - match rows in the - target_table_name. + match rows in the target table. - Only columns from target_table_name + Only columns from the target table that attempt to match data_source rows should appear in join_condition. join_condition subexpressions that - only reference target_table_name + only reference the target table's columns can affect which action is taken, often in surprising ways. @@ -228,7 +246,7 @@ DELETE If the WHEN clause specifies WHEN MATCHED and the candidate change row matches a row in the - target_table_name, + target table, the WHEN clause is executed if the condition is absent or it evaluates to true. @@ -237,7 +255,7 @@ DELETE Conversely, if the WHEN clause specifies WHEN NOT MATCHED and the candidate change row does not match a row in the - target_table_name, + target table, the WHEN clause is executed if the condition is absent or it evaluates to true. @@ -280,10 +298,10 @@ DELETE or null if there is none. - If target_table_name + If the target table is a partitioned table, each row is routed to the appropriate partition and inserted into it. - If target_table_name + If the target table is a partition, an error will occur if any input row violates the partition constraint. @@ -304,7 +322,7 @@ DELETE The specification of an UPDATE action that updates - the current row of the target_table_name. + the current row of the target table. Column names may not be specified more than once. @@ -318,7 +336,7 @@ DELETE Specifies a DELETE action that deletes the current row - of the target_table_name. + of the target table. Do not include the table name or any other clauses, as you would normally do with a command. @@ -329,8 +347,7 @@ DELETE column_name - The name of a column in the target_table_name. 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 WHEN MATCHED clause, the expression can use values from the original row in the target table, and values from the - data_source row. + data_source row. If used in a WHEN NOT MATCHED clause, the - expression can use values from the data_source. + expression can use values from the + data_source row. @@ -399,13 +417,17 @@ DELETE - with_query + sub-SELECT - The WITH clause allows you to specify one or more - subqueries that can be referenced by name in the MERGE - query. See and - for details. + A SELECT 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 data_source + row. 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 backup_label, tablespace_map, pg_internal.init, - postmaster.opts, and - postmaster.pid, as well as any file or directory + postmaster.opts, + postmaster.pid and + .DS_Store as well as any file or directory beginning with pgsql_tmp, are omitted. 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 - + @@ -2919,7 +2919,7 @@ lo_import 152801 writes column values separated by commas, applying the quoting rules described in - RFC 4180. + RFC 4180. This output is compatible with the CSV format of the server's COPY 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 provider ] ON DATABASE object_name | DOMAIN object_name | EVENT TRIGGER object_name | - FOREIGN TABLE object_name + FOREIGN TABLE object_name | FUNCTION function_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] | LARGE OBJECT large_object_oid | MATERIALIZED VIEW object_name | -- cgit v1.2.3