From 8818c8da27fa6252431d42c246ce54596712b3be Mon Sep 17 00:00:00 2001 From: liyang0608 <2643278072qq.com> Date: Wed, 2 Sep 2020 11:11:10 +0800 Subject: [PATCH] sync dts 20200902 --- .../en/docs/Developerguide/create-function.md | 6 +- .../docs/Developerguide/create-procedure.md | 2 +- content/en/docs/Developerguide/merge-into.md | 2 +- content/en/docs/Developerguide/overview-2.md | 48 +++--- content/en/docs/Developerguide/set.md | 2 +- ...-data-by-using-the-merge-into-statement.md | 153 +++++++++--------- .../zh/docs/Developerguide/ALTER-FUNCTION.md | 2 +- .../zh/docs/Developerguide/CREATE-FUNCTION.md | 22 ++- .../docs/Developerguide/CREATE-PROCEDURE.md | 2 +- content/zh/docs/Developerguide/MERGE-INTO.md | 6 +- content/zh/docs/Developerguide/SET.md | 2 +- ...22\345\205\245\346\225\260\346\215\256.md" | 2 +- ...41\350\256\241\346\246\202\350\277\260.md" | 47 +++--- 13 files changed, 153 insertions(+), 143 deletions(-) diff --git a/content/en/docs/Developerguide/create-function.md b/content/en/docs/Developerguide/create-function.md index 93cb2ff42..9684ae153 100644 --- a/content/en/docs/Developerguide/create-function.md +++ b/content/en/docs/Developerguide/create-function.md @@ -273,13 +273,13 @@ BEGIN RETURN num1 + num2; END; / --- Alter the execution rule of function add to IMMUTABLE (that is, the same result is returned if the parameter remains unchanged). +-- Alter the execution rule of function func_add_sql2 to IMMUTABLE (that is, the same result is returned if the parameter remains unchanged). postgres=# ALTER FUNCTION func_add_sql2(INTEGER, INTEGER) IMMUTABLE; --- Alter the name of function add to add_two_number. +-- Alter the name of function func_add_sql2 to add_two_number. postgres=# ALTER FUNCTION func_add_sql2(INTEGER, INTEGER) RENAME TO add_two_number; --- Change the owner of function add to omm. +-- Change the owner of function add_two_number to omm. postgres=# ALTER FUNCTION add_two_number(INTEGER, INTEGER) OWNER TO omm; -- Delete the function. diff --git a/content/en/docs/Developerguide/create-procedure.md b/content/en/docs/Developerguide/create-procedure.md index 0fcd80e23..c8e2d5bb5 100644 --- a/content/en/docs/Developerguide/create-procedure.md +++ b/content/en/docs/Developerguide/create-procedure.md @@ -52,7 +52,7 @@ plsql_body >![](public_sys-resources/icon-notice.gif) **NOTICE:** >**VARIADIC** specifies parameters of the array type. - Value range: **IN**, **OUT**, **INOUT**, and **VARIADIC**. The default value is **IN**. Only the parameter of the **OUT** mode can be followed by **VARIADIC**. The parameters of **OUT** and **INOUT** cannot be used in procedure definition of **RETURNS TABLE**. + Value range: **IN**, **OUT**, **INOUT**, and **VARIADIC**. The default value is **IN**. Only the parameter of the **OUT** mode can follow **VARIADIC**. The parameters of **OUT** and **INOUT** cannot be used in procedure definition of **RETURNS TABLE**. - **argname** diff --git a/content/en/docs/Developerguide/merge-into.md b/content/en/docs/Developerguide/merge-into.md index b32850fb9..143383168 100644 --- a/content/en/docs/Developerguide/merge-into.md +++ b/content/en/docs/Developerguide/merge-into.md @@ -32,7 +32,7 @@ ON ( condition ) - **INTO** clause - Specifies the target table that is being updated or has data being inserted. If the target table is a replication table, the default value of a column \(such as auto-increment column\) in the target table cannot be the **volatile** function. If **enable\_stream\_operator** is set to **off**, the target table must contain a primary key or **UNIQUE** and **NOT NULL** constraints. + Specifies the target table that is being updated or has data being inserted. - **talbe\_name** diff --git a/content/en/docs/Developerguide/overview-2.md b/content/en/docs/Developerguide/overview-2.md index 27643797d..bc76fd2a6 100644 --- a/content/en/docs/Developerguide/overview-2.md +++ b/content/en/docs/Developerguide/overview-2.md @@ -95,6 +95,7 @@ You need to know the following about the audit function: **Table 2** Security-related parameters and their default values + - - - - - - - - - - - - - - - - - - @@ -231,7 +232,7 @@ You need to know the following about the audit function: - @@ -240,14 +241,14 @@ You need to know the following about the audit function: - - @@ -401,14 +402,14 @@ You need to know the following about the audit function: - - @@ -418,6 +419,7 @@ You need to know the following about the audit function:

Parameter

Default Value

@@ -103,126 +104,126 @@ You need to know the following about the audit function:

ssl

+

ssl

on

Specifies whether the SSL connection is enabled.

require_ssl

+

require_ssl

off

Specifies whether the server requires the SSL connection.

ssl_ciphers

+

ssl_ciphers

ALL

Encryption algorithm list supported by the SSL

ssl_cert_file

+

ssl_cert_file

server.crt

File containing the SSL server certificate

ssl_key_file

+

ssl_key_file

server.key

File containing the SSL private key

ssl_ca_file

+

ssl_ca_file

cacert.pem

File containing CA information

ssl_crl_file

+

ssl_crl_file

NULL

File containing CRL information

password_policy

+

password_policy

1

Specifies whether to check the password complexity.

password_reuse_time

+

password_reuse_time

60

Specifies whether to check the reuse days of a new password.

password_reuse_max

+

password_reuse_max

0

Specifies whether to check the reuse times of a new password.

password_lock_time

+

password_lock_time

1

Duration before a locked account is automatically unlocked

failed_login_attempts

+

failed_login_attempts

10

If the number of consecutive login attempts with incorrect passwords reaches this value, the account is locked.

password_encryption_type

+

password_encryption_type

2

Password storage encryption mode

password_min_uppercase

+

password_min_uppercase

0

Minimum number of uppercase letters in a password

password_min_lowercase

+

password_min_lowercase

0

Minimum number of lowercase letters in a password

password_min_digital

+

password_min_digital

0

Minimum number of digits in a password

password_min_special

+

password_min_special

0

Minimum number of special characters in a password

password_min_length

+

password_min_length

8

password_max_length

+

password_max_length

32

password_effect_time

+

password_effect_time

90

Password validity period

password_notify_time

+

password_notify_time

7

Specifies whether the separation of duties is enabled.

session_timeout

+

session_timeout

10min

If the duration of a connection session exceeds the parameter value, the session is automatically disconnected.

auth_iteration_count

+

auth_iteration_count

10000

+ ## Procedure 1. Log in as the OS user **omm** to the primary node of the database. diff --git a/content/en/docs/Developerguide/set.md b/content/en/docs/Developerguide/set.md index 8f12eb3b3..6fb7ec4f6 100644 --- a/content/en/docs/Developerguide/set.md +++ b/content/en/docs/Developerguide/set.md @@ -83,7 +83,7 @@ Most run-time parameters can be modified by executing **SET**. Some parameters Specifies the client character encoding. This statement is equivalent to **set client\_encoding to encoding\_name**. - Value range: a valid character encoding name. The run-time parameter corresponding to this option is **client\_encoding**. The default encoding is **SQL\_ASCII**. + Value range: a valid character encoding name. The run-time parameter corresponding to this option is **client\_encoding**. The default encoding is **UTF8**. - **XML OPTION option** diff --git a/content/en/docs/Developerguide/updating-and-inserting-data-by-using-the-merge-into-statement.md b/content/en/docs/Developerguide/updating-and-inserting-data-by-using-the-merge-into-statement.md index fe1538c09..57dd63788 100644 --- a/content/en/docs/Developerguide/updating-and-inserting-data-by-using-the-merge-into-statement.md +++ b/content/en/docs/Developerguide/updating-and-inserting-data-by-using-the-merge-into-statement.md @@ -43,82 +43,83 @@ You have the **INSERT** and **UPDATE** permissions for the target table and (1666, 'harry potter', 'dvd'); ``` -3. Run the **MERGE INTO** statement to merge data in the source table **products** into the target table **newproducts**. - - ``` - MERGE INTO newproducts np - USING products p - ON (np.product_id = p.product_id ) - WHEN MATCHED THEN - UPDATE SET np.product_name = p.product_name, np.category = p.category - WHEN NOT MATCHED THEN - INSERT VALUES (p.product_id, p.product_name, p.category) ; - ``` - - For details on parameters in the statement, see [Table 1](#en-us_topic_0237121140_en-us_topic_0165787112_table1973914406416). For more information, see [MERGE INTO](merge-into.md). - - **Table 1** Parameters in the MERGE INTO statement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Parameter

-

Description

-

Example Value

-

INTO clause

-

Specifies a target table that is to be updated or has data to be inserted.

-
  • A table alias is supported.
  • The target table can be a replication table, but the replication table cannot contain columns (such as auto-increment columns) with the volatile function. If enable_stream_operator is set to off, the target replication table must contain a primary key or UNIQUE and NOT NULL constraints.
-

Value: newproducts np

-

The table name is newproducts and the alias is np.

-

USING clause

-

Specifies a source table. A table alias is supported.

-

If the target table is a replication table, the source table must also be a replication table.

-

Value: products p

-

The table name is products and the alias is p.

-

ON clause

-

Specifies a join condition between a target table and a source table.

-

Columns in the join condition cannot be updated.

-

Value: np.product_id = p.product_id

-

The join condition is that the product_id column in the target table newproducts has equivalent values as the product_id column in the source table products.

-

-

WHEN MATCHED clause

-

Performs UPDATE if data in the source table matches that in the target table based on the condition.

-
  • Only one WHEN MATCHED clause can be specified.
  • The WHEN MATCHED clause can be omitted. If it is omitted, no operation will be performed on the rows that meet the condition in the ON clause.
  • Columns involved in the distribution key of the target table cannot be updated.
-

Value: WHEN MATCHED THEN UPDATE SET np.product_name = p.product_name, np.category = p.category

-

When the condition in the ON clause is met, the values of the product_name and category columns in the target table newproducts are replaced with the values in the corresponding columns in the source table products.

-

WHEN NOT MATCHED clause

-

Performs INSERT if data in the source table does not match that in the target table based on the condition.

-
  • Only one WHEN NOT MATCHED clause can be specified.
  • The WHEN NOT MATCHED clause can be omitted.
  • An INSERT clause can contain only one VALUES.

    -
  • The WHEN MATCHED and WHEN NOT MATCHED clauses can be exchanged in sequence. One of them can be omitted, but they cannot be omitted at the same time.

    -
-

Value: WHEN NOT MATCHED THEN

-

INSERT VALUES (p.product_id, p.product_name, p.category)

-

Insert rows in the source table products that do not meet the condition in the ON clause into the target table newproducts.

-
+3. Run the **MERGE INTO** statement to merge data in the source table **products** into the target table **newproducts**. + + ``` + MERGE INTO newproducts np + USING products p + ON (np.product_id = p.product_id ) + WHEN MATCHED THEN + UPDATE SET np.product_name = p.product_name, np.category = p.category + WHEN NOT MATCHED THEN + INSERT VALUES (p.product_id, p.product_name, p.category) ; + ``` + + For details on parameters in the statement, see [Table 1](#en-us_topic_0237121140_en-us_topic_0165787112_table1973914406416). For more information, see [MERGE INTO](merge-into.md). + + **Table 1** Parameters in the MERGE INTO statement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Parameter

+

Description

+

Example Value

+

INTO clause

+

Specifies a target table that is to be updated or has data to be inserted.

+

A table alias is supported.

+

Value: newproducts np

+

The table name is newproducts and the alias is np.

+

USING clause

+

Specifies a source table. A table alias is supported.

+

If the target table is a replication table, the source table must also be a replication table.

+

Value: products p

+

The table name is products and the alias is p.

+

ON clause

+

Specifies a join condition between a target table and a source table.

+

Columns in the join condition cannot be updated.

+

Value: np.product_id = p.product_id

+

The join condition is that the product_id column in the target table newproducts has equivalent values as the product_id column in the source table products.

+

+

WHEN MATCHED clause

+

Performs UPDATE if data in the source table matches that in the target table based on the condition.

+
  • Only one WHEN MATCHED clause can be specified.
  • The WHEN MATCHED clause can be omitted. If it is omitted, no operation will be performed on the rows that meet the condition in the ON clause.
  • Columns involved in the distribution key of the target table cannot be updated.
+

Value: WHEN MATCHED THEN UPDATE SET np.product_name = p.product_name, np.category = p.category

+

When the condition in the ON clause is met, the values of the product_name and category columns in the target table newproducts are replaced with the values in the corresponding columns in the source table products.

+

WHEN NOT MATCHED clause

+

Performs INSERT if data in the source table does not match that in the target table based on the condition.

+
  • Only one WHEN NOT MATCHED clause can be specified.
  • The WHEN NOT MATCHED clause can be omitted.
  • An INSERT clause can contain only one VALUES.

    +
  • The WHEN MATCHED and WHEN NOT MATCHED clauses can be exchanged in sequence. One of them can be omitted, but they cannot be omitted at the same time.

    +
+

Value: WHEN NOT MATCHED THEN

+

INSERT VALUES (p.product_id, p.product_name, p.category)

+

Insert rows in the source table products that do not meet the condition in the ON clause into the target table newproducts.

+
4. Query the target table **newproducts** after the merge. diff --git a/content/zh/docs/Developerguide/ALTER-FUNCTION.md b/content/zh/docs/Developerguide/ALTER-FUNCTION.md index a1a0b986a..f123b6551 100644 --- a/content/zh/docs/Developerguide/ALTER-FUNCTION.md +++ b/content/zh/docs/Developerguide/ALTER-FUNCTION.md @@ -119,7 +119,7 @@ 表明该函数将以调用它的用户的权限执行。缺省时与指定此参数的作用相同。 - SECURITY INVOKER和AUTHID CURREN\_USER的功能相同。 + SECURITY INVOKER和AUTHID CURRENT\_USER的功能相同。 - **SECURITY DEFINER** diff --git a/content/zh/docs/Developerguide/CREATE-FUNCTION.md b/content/zh/docs/Developerguide/CREATE-FUNCTION.md index 5408236d8..f6b7d3d8a 100644 --- a/content/zh/docs/Developerguide/CREATE-FUNCTION.md +++ b/content/zh/docs/Developerguide/CREATE-FUNCTION.md @@ -120,9 +120,13 @@ 字段类型。 -- **definition** +- **definition** - 一个定义函数的字符串常量,含义取决于语言。它可以是一个内部函数名称、一个指向某个目标文件的路径、一个SQL查询、一个过程语言文本。 + 一个定义函数的字符串常量,含义取决于语言。它可以是一个内部函数名称、一个指向某个目标文件的路径、一个SQL查询、一个过程语言文本。 + +- **DETERMINISTIC** + + SQL语法兼容接口,未实现功能,不推荐使用。 - **LANGUAGE lang\_name** @@ -143,9 +147,13 @@ 表示该函数不能修改数据库,对相同参数值,在同一次表扫描里,该函数的返回值不变,但是返回值可能在不同SQL语句之间变化。 -- **VOLATILE** +- **VOLATILE** + + 表示该函数值可以在一次表扫描内改变,因此不会做任何优化。 + +- SHIPPABLE | NOT SHIPPABLE - 表示该函数值可以在一次表扫描内改变,因此不会做任何优化。 +- FENCED | NOT FENCED - **PACKAGE** @@ -273,13 +281,13 @@ BEGIN RETURN num1 + num2; END; / ---修改函数add的执行规则为IMMUTABLE,即参数不变时返回相同结果。 +--修改函数func_add_sql2的执行规则为IMMUTABLE,即参数不变时返回相同结果。 postgres=# ALTER FUNCTION func_add_sql2(INTEGER, INTEGER) IMMUTABLE; ---将函数add的名称修改为add_two_number。 +--将函数func_add_sql2的名称修改为add_two_number。 postgres=# ALTER FUNCTION func_add_sql2(INTEGER, INTEGER) RENAME TO add_two_number; ---将函数add的属者改为omm。 +--将函数add_two_number的属者改为omm。 postgres=# ALTER FUNCTION add_two_number(INTEGER, INTEGER) OWNER TO omm; --删除函数。 diff --git a/content/zh/docs/Developerguide/CREATE-PROCEDURE.md b/content/zh/docs/Developerguide/CREATE-PROCEDURE.md index 6b1309ba7..b635cbf9a 100644 --- a/content/zh/docs/Developerguide/CREATE-PROCEDURE.md +++ b/content/zh/docs/Developerguide/CREATE-PROCEDURE.md @@ -52,7 +52,7 @@ plsql_body >![](public_sys-resources/icon-notice.gif) **须知:** >VARIADIC用于声明数组类型的参数。 - 取值范围: IN,OUT,INOUT或VARIADIC。缺省值是IN。只有OUT模式的参数后面能跟VARIADIC。并且OUT和INOUT模式的参数不能用在RETURNS TABLE的过程定义中。 + 取值范围: IN,OUT,INOUT或VARIADIC。缺省值是IN。只有OUT模式的参数能跟在VARIADIC参数之后。并且OUT和INOUT模式的参数不能用在RETURNS TABLE的过程定义中。 - **argname** diff --git a/content/zh/docs/Developerguide/MERGE-INTO.md b/content/zh/docs/Developerguide/MERGE-INTO.md index ae339b479..565e8d116 100644 --- a/content/zh/docs/Developerguide/MERGE-INTO.md +++ b/content/zh/docs/Developerguide/MERGE-INTO.md @@ -32,11 +32,9 @@ ON ( condition ) - **INTO子句** - 指定正在更新或插入的目标表。目标表为复制表时,暂不支持目标表中某列默认值为volatile函数(如自增列),enable\_stream\_operator=off时目标表需要包含主键或带有unique not null。 + 指定正在更新或插入的目标表。 - - **talbe\_name** - - 目标表的表名。 + - 目标表的表名。 - **alias** diff --git a/content/zh/docs/Developerguide/SET.md b/content/zh/docs/Developerguide/SET.md index 73ebb9289..8fed11c0e 100644 --- a/content/zh/docs/Developerguide/SET.md +++ b/content/zh/docs/Developerguide/SET.md @@ -83,7 +83,7 @@ 用于设置客户端的字符编码。等价于set client\_encoding to encoding\_name。 - 取值范围:有效的字符编码。该选项对应的运行时参数名称为client\_encoding,默认编码为SQL\_ASCII。 + 取值范围:有效的字符编码。该选项对应的运行时参数名称为client\_encoding,默认编码为UTF8。 - **XML OPTION option** diff --git "a/content/zh/docs/Developerguide/\344\275\277\347\224\250\345\220\210\345\271\266\346\226\271\345\274\217\346\233\264\346\226\260\345\222\214\346\217\222\345\205\245\346\225\260\346\215\256.md" "b/content/zh/docs/Developerguide/\344\275\277\347\224\250\345\220\210\345\271\266\346\226\271\345\274\217\346\233\264\346\226\260\345\222\214\346\217\222\345\205\245\346\225\260\346\215\256.md" index 05d33a5a9..9a765cf44 100644 --- "a/content/zh/docs/Developerguide/\344\275\277\347\224\250\345\220\210\345\271\266\346\226\271\345\274\217\346\233\264\346\226\260\345\222\214\346\217\222\345\205\245\346\225\260\346\215\256.md" +++ "b/content/zh/docs/Developerguide/\344\275\277\347\224\250\345\220\210\345\271\266\346\226\271\345\274\217\346\233\264\346\226\260\345\222\214\346\217\222\345\205\245\346\225\260\346\215\256.md" @@ -71,7 +71,7 @@ MERGE INTO语句将目标表和源表中数据针对关联条件进行匹配,

INTO 子句

指定需要更新或插入数据的目标表。

- +

目标表支持指定别名。

取值:newproducts np

说明:名为newproducts,别名为np的目标表。

diff --git "a/content/zh/docs/Developerguide/\345\256\241\350\256\241\346\246\202\350\277\260.md" "b/content/zh/docs/Developerguide/\345\256\241\350\256\241\346\246\202\350\277\260.md" index 830194698..db2de7e4b 100644 --- "a/content/zh/docs/Developerguide/\345\256\241\350\256\241\346\246\202\350\277\260.md" +++ "b/content/zh/docs/Developerguide/\345\256\241\350\256\241\346\246\202\350\277\260.md" @@ -103,126 +103,126 @@ -

ssl

+

ssl

on

指定是否启用SSL连接。

-

require_ssl

+

require_ssl

off

指定服务器端是否强制要求SSL连接。

-

ssl_ciphers

+

ssl_ciphers

ALL

指定SSL支持的加密算法列表。

-

ssl_cert_file

+

ssl_cert_file

server.crt

指定包含SSL服务器证书的文件的名称。

-

ssl_key_file

+

ssl_key_file

server.key

指定包含SSL私钥的文件名称。

-

ssl_ca_file

+

ssl_ca_file

cacert.pem

指定包含CA信息的文件的名称。

-

ssl_crl_file

+

ssl_crl_file

NULL

指定包含CRL信息的文件的名称。

-

password_policy

+

password_policy

1

指定是否进行密码复杂度检查。

-

password_reuse_time

+

password_reuse_time

60

指定是否对新密码进行可重用天数检查。

-

password_reuse_max

+

password_reuse_max

0

指定是否对新密码进行可重用次数检查。

-

password_lock_time

+

password_lock_time

1

指定帐户被锁定后自动解锁的时间。

-

failed_login_attempts

+

failed_login_attempts

10

如果输入密码错误的次数达到此参数值时,当前帐户被锁定。

-

password_encryption_type

+

password_encryption_type

2

指定采用何种加密方式对用户密码进行加密存储。

-

password_min_uppercase

+

password_min_uppercase

0

密码中至少需要包含大写字母的个数。

-

password_min_lowercase

+

password_min_lowercase

0

密码中至少需要包含小写字母的个数。

-

password_min_digital

+

password_min_digital

0

密码中至少需要包含数字的个数。

-

password_min_special

+

password_min_special

0

密码中至少需要包含特殊字符的个数。

-

password_min_length

+

password_min_length

8

@@ -231,7 +231,7 @@ -

password_max_length

+

password_max_length

32

@@ -240,14 +240,14 @@ -

password_effect_time

+

password_effect_time

90

密码的有效期限。

-

password_notify_time

+

password_notify_time

7

@@ -401,14 +401,14 @@

指定是否开启三权分立。

-

session_timeout

+

session_timeout

10min

建立连接会话后,如果超过此参数的设置时间,则会自动断开连接。

-

auth_iteration_count

+

auth_iteration_count

10000

@@ -418,6 +418,7 @@ + ## 操作步骤 1. 以操作系统用户omm登录数据库主节点。 -- Gitee