diff --git a/content/en/docs/Developerguide/administrators.md b/content/en/docs/Developerguide/administrators.md index 79e037c3a9d5bcd52ac787c344973799f89d5307..15acd8c940f08866e353636ea0373a700abfbf16 100644 --- a/content/en/docs/Developerguide/administrators.md +++ b/content/en/docs/Developerguide/administrators.md @@ -2,7 +2,7 @@ ## Initial Users -The account automatically generated during openGauss installation is called an initial user. An initial user is the system, monitoring, O&M, and security policy administrator who has the highest-level permissions in the system and can perform all operations. The username is the same as the name of the OS user who installs openGauss,please refer to the *Installation Guide* for detail. +The account automatically generated during openGauss installation is called an initial user. An initial user is the system, monitoring, O&M, and security policy administrator who has the highest-level permissions in the system and can perform all operations. This account has the same name as the OS user used for openGauss installation. You need to manually set the password during the installation. After the first login, change the initial user's password in time. An initial user bypasses all permission checks. You are advised to use an initial user as a database administrator only for database management other than service running. diff --git a/content/en/docs/Developerguide/alter-function.md b/content/en/docs/Developerguide/alter-function.md index b0304493c52fd6ead7958c3be2051c1d65ab5759..5801028e152289a8c54e1511105e40459b737134 100644 --- a/content/en/docs/Developerguide/alter-function.md +++ b/content/en/docs/Developerguide/alter-function.md @@ -67,7 +67,7 @@ Only the owner of the function or a system administrator has the permission to r Specifies whether a parameter is an input or output parameter. - Value range: **IN**, **OUT**, **IN OUT** and **VARIDIC** + Value range: **IN**, **OUT**, **INOUT** and **VARIDIC** - **argname** diff --git a/content/en/docs/Developerguide/boolean-data-types.md b/content/en/docs/Developerguide/boolean-data-types.md index b979045082bfda4026eae7205aefbdcb7ec23739..e02c7bbdbd15be7f2bbc204f8b1ad03b5a96ad7f 100644 --- a/content/en/docs/Developerguide/boolean-data-types.md +++ b/content/en/docs/Developerguide/boolean-data-types.md @@ -27,7 +27,7 @@ Valid literal values for the "true" state include: -TRUE, 't', 'true', 'y', 'yes', '1', 1, 'TRUE' +TRUE, 't', 'true', 'y', 'yes', '1', 1, 'TRUE',true Valid literal values for the "false" state include: diff --git a/content/en/docs/Developerguide/create-type.md b/content/en/docs/Developerguide/create-type.md index 20aa2790a30a1619aba86cb021c1ab7fd540ef0d..7147d9b58b28789d30f4b6fe25195386923f452c 100644 --- a/content/en/docs/Developerguide/create-type.md +++ b/content/en/docs/Developerguide/create-type.md @@ -232,7 +232,7 @@ postgres=# CREATE TYPE compfoo AS (f1 int, f2 text); postgres=# CREATE TABLE t1_compfoo(a int, b compfoo); postgres=# CREATE TABLE t2_compfoo(a int, b compfoo); postgres=# INSERT INTO t1_compfoo values(1,(1,'demo')); -postgres=# INSERT INTO t2_compfoo select * from t1_typ5; +postgres=# INSERT INTO t2_compfoo select * from t1_compfoo; postgres=# SELECT (b).f1 FROM t1_compfoo; postgres=# SELECT * FROM t1_compfoo t1 join t2_compfoo t2 on (t1.b).f1=(t1.b).f1; diff --git a/content/en/docs/Developerguide/creating-and-managing-databases.md b/content/en/docs/Developerguide/creating-and-managing-databases.md index 61d7e827e587af8927f0975d2b4d8365fb6ef740..ad2d4af2b52dd64cbc58f0aaf0900ee1319392ef 100644 --- a/content/en/docs/Developerguide/creating-and-managing-databases.md +++ b/content/en/docs/Developerguide/creating-and-managing-databases.md @@ -13,7 +13,7 @@ Only the database system administrator or users granted with database creation p ## Precautions -Assume that the database encoding is SQL\_ASCII. \(You can run the **show server\_encoding** command to query the encoding used for storing data in the current database.\) If the database object name contains multi-byte characters \(such as Chinese\) or if the object name length exceeds the allowed maximum \(63 bytes\), the database truncates the last byte \(not the last character\) of the object name. In this case, half characters may appear. +Assume that the database encoding is SQL\_ASCII. \(You can run the **show server\_encoding;** command to query the encoding used for storing data in the current database.\) If the database object name contains multi-byte characters \(such as Chinese\) or if the object name length exceeds the allowed maximum \(63 bytes\), the database truncates the last byte \(not the last character\) of the object name. In this case, half characters may appear. To resolve this problem, you need to: diff --git a/content/en/docs/Developerguide/drop-type.md b/content/en/docs/Developerguide/drop-type.md index 21b1a47814c2447a9467d589399aba0e1f3215dc..044167cad824222e34c262cca056cef50bf8b352 100644 --- a/content/en/docs/Developerguide/drop-type.md +++ b/content/en/docs/Developerguide/drop-type.md @@ -2,7 +2,7 @@ ## Function -**DROP TYPE** deletes a user-defined data type. Only the owner of a type has the **DROP TYPE** permission. +**DROP TYPE** deletes a user-defined data type. Superuser, sysadmin and the owner of a type has the **DROP TYPE** permission. ## Syntax diff --git a/content/en/docs/Developerguide/revoke.md b/content/en/docs/Developerguide/revoke.md index 2b38fab47fda9fc8e9ec66d0593b865200061ed1..706d9efacc53f99fcc4074e2eaf052b61a16ef4d 100644 --- a/content/en/docs/Developerguide/revoke.md +++ b/content/en/docs/Developerguide/revoke.md @@ -133,7 +133,7 @@ Permissions of a role include the permissions directly granted to the role, perm If **GRANT OPTION FOR** is specified, the permission cannot be granted to others, but permission itself is not revoked. -If user A holds the **UPDATE** permissions on a table and the **WITH GRANT OPTION** and has granted them to user B, the permissions that user B holds are called dependent permissions. If the permissions or the grant option held by user A is revoked, the dependent permissions still exist. Those dependent permissions are also revoked if **CASCADE** is specified. +If user A holds the **UPDATE** permissions on a table and the **WITH GRANT OPTION** and has granted them to user B, the permissions that user B holds are called dependent permissions. When user A's permission or grant option is revoked, **CASCADE** must be specified to revoke all dependent permissions. A user can only revoke permissions that were granted directly by that user. For example, if user A has granted permission with grant option \(**WITH ADMIN OPTION**\) to user B, and user B has in turn granted it to user C, then user A cannot revoke the permission directly from C. However, user A can revoke the grant option held by user B and use **CASCADE**. In this way, the permission of user C is automatically revoked. For another example, if both user A and user B have granted the same permission to C, A can revoke his own grant but not B's grant, so C will still effectively have the permission. diff --git a/content/en/docs/Developerguide/trigger-functions.md b/content/en/docs/Developerguide/trigger-functions.md index e4fa378e2a75e2f078e4e27bc7831b0ad92877b9..c51b96faebb5025a5ba8b89e5de29e80deb1b9fb 100644 --- a/content/en/docs/Developerguide/trigger-functions.md +++ b/content/en/docs/Developerguide/trigger-functions.md @@ -1,48 +1,51 @@ -# Trigger Functions - -- pg\_get\_triggerdef\(oid\) - - Description: Obtains the definition information of a trigger. - - Parameter: OID of the trigger to be queried - - Return type: text - - Example: - - ``` - postgres=# select pg_get_triggerdef(oid) from pg_trigger; - pg_get_triggerdef - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() - CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN ((new.a IS NOT NULL)) EXECUTE PROCEDURE gtest_trigger_func() - (2 rows) - ``` - -- pg\_get\_triggerdef\(oid, boolean\) - - Description: Obtains the definition information of a trigger. - - Parameter: OID of the trigger to be queried and whether it is displayed in pretty mode - - Return type: text - - Example: - - ``` - postgres=# select pg_get_triggerdef(oid,true) from pg_trigger; - pg_get_triggerdef - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() - CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN (new.a IS NOT NULL) EXECUTE PROCEDURE gtest_trigger_func() - (2 rows) - - postgres=# select pg_get_triggerdef(oid,false) from pg_trigger; - pg_get_triggerdef - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() - CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN ((new.a IS NOT NULL)) EXECUTE PROCEDURE gtest_trigger_func() - (2 rows) - ``` - - +# Trigger Functions + +- pg\_get\_triggerdef\(oid\) + + Description: Obtains the definition information of a trigger. + + Parameter: OID of the trigger to be queried + + Return type: text + + Example: + + ``` + postgres=# select pg_get_triggerdef(oid) from pg_trigger; + pg_get_triggerdef + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() + CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN ((new.a IS NOT NULL)) EXECUTE PROCEDURE gtest_trigger_func() + (2 rows) + ``` + +- pg\_get\_triggerdef\(oid, boolean\) + + Description: Obtains the definition information of a trigger. + + Parameter: OID of the trigger to be queried and whether it is displayed in pretty mode + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >Boolean parameters take effect only when the WHEN condition is specified during trigger creation. + + Return type: text + + Example: + + ``` + postgres=# select pg_get_triggerdef(oid,true) from pg_trigger; + pg_get_triggerdef + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() + CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN (new.a IS NOT NULL) EXECUTE PROCEDURE gtest_trigger_func() + (2 rows) + + postgres=# select pg_get_triggerdef(oid,false) from pg_trigger; + pg_get_triggerdef + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + CREATE TRIGGER tg1 BEFORE INSERT ON gtest26 FOR EACH STATEMENT EXECUTE PROCEDURE gtest_trigger_func() + CREATE TRIGGER tg03 AFTER INSERT ON gtest26 FOR EACH ROW WHEN ((new.a IS NOT NULL)) EXECUTE PROCEDURE gtest_trigger_func() + (2 rows) + ``` + + diff --git a/content/en/docs/Developerguide/using-gsql-to-connect-to-a-database.md b/content/en/docs/Developerguide/using-gsql-to-connect-to-a-database.md index 697b40392b83e9e046f3ae25e54f011fdf6d6ba9..b85f07e83f37d5378ceaef736f75761a241b7160 100644 --- a/content/en/docs/Developerguide/using-gsql-to-connect-to-a-database.md +++ b/content/en/docs/Developerguide/using-gsql-to-connect-to-a-database.md @@ -4,7 +4,7 @@ ## Precautions -By default, if a client is idle state after connecting to a database, the client automatically disconnects from the database in the duration specified by **[session\_timeout](security-and-authentication-(postgresql-conf).md#en-us_topic_0237124696_en-us_topic_0059778664_see4820fb6c024e0aa4c56882aeae204a)**. To disable the timeout setting, set **[session\_timeout](security-and-authentication-(postgresql-conf).md#en-us_topic_0237124696_en-us_topic_0059778664_see4820fb6c024e0aa4c56882aeae204a)** to **0**. +By default, if a client is idle state after connecting to a database, the client automatically disconnects from the database in the duration specified by **[session\_timeout](security-and-authentication_postgresql-conf.md#en-us_topic_0237124696_en-us_topic_0059778664_see4820fb6c024e0aa4c56882aeae204a)**. To disable the timeout setting, set **[session\_timeout](security-and-authentication_postgresql-conf.md#en-us_topic_0237124696_en-us_topic_0059778664_see4820fb6c024e0aa4c56882aeae204a)** to **0**. ## Prerequisites @@ -39,7 +39,7 @@ Connection information has been confirmed. For details, see [Confirming Connect **Non-SSL connection** indicates that the database is not connected in SSL mode. If high security is required, [connect to the database in SSL mode](establishing-secure-tcp-ip-connections-in-ssl-mode.md). -3. Change the password after your first login. The initial password is set manually during openGauss database installation. For details, see the _Installation Guide_. You need to change the initial password. Suppose you want to change the initial password to **Mypwd123**. You can use the following command: +3. Change the password after your first login. The initial password is set manually during openGauss database installation. For details, see "**Installing the openGauss** > **Executing Installation**" in the **Installation Guide**. You need to change the initial password. Suppose you want to change the initial password to **Mypwd123**. You can use the following command: ``` postgres=# ALTER ROLE omm IDENTIFIED BY 'Mypwd123' REPLACE 'XuanYuan@2012'; diff --git a/content/zh/docs/Developerguide/CREATE-TYPE.md b/content/zh/docs/Developerguide/CREATE-TYPE.md index 6b54f7d95beeecc7b7dc857e7bef22b96346e27c..ebd299100836e11677fedf49e027e5e05ddaa2f9 100644 --- a/content/zh/docs/Developerguide/CREATE-TYPE.md +++ b/content/zh/docs/Developerguide/CREATE-TYPE.md @@ -232,7 +232,7 @@ postgres=# CREATE TYPE compfoo AS (f1 int, f2 text); postgres=# CREATE TABLE t1_compfoo(a int, b compfoo); postgres=# CREATE TABLE t2_compfoo(a int, b compfoo); postgres=# INSERT INTO t1_compfoo values(1,(1,'demo')); -postgres=# INSERT INTO t2_compfoo select * from t1_typ5; +postgres=# INSERT INTO t2_compfoo select * from t1_compfoo; postgres=# SELECT (b).f1 FROM t1_compfoo; postgres=# SELECT * FROM t1_compfoo t1 join t2_compfoo t2 on (t1.b).f1=(t1.b).f1; diff --git a/content/zh/docs/Developerguide/DROP-TYPE.md b/content/zh/docs/Developerguide/DROP-TYPE.md index f372bb596154c8d47857d4b93210dd4ec0b7e0a0..70004dc80dc3865a1bd3e2c927eff0cda58b0b76 100644 --- a/content/zh/docs/Developerguide/DROP-TYPE.md +++ b/content/zh/docs/Developerguide/DROP-TYPE.md @@ -2,7 +2,7 @@ ## 功能描述 -删除一个用户定义的数据类型。只有类型所有者才有删除权限。 +删除一个用户定义的数据类型。superuser、sysadmin及类型所有者才有删除权限。 ## 语法格式 diff --git a/content/zh/docs/Developerguide/PG_ATTRDEF.md b/content/zh/docs/Developerguide/PG_ATTRDEF.md index 9ae06feeb886bf7431b8e2133871278da7d699bc..979cd3164d069043ff587a62b626021a8445399d 100644 --- a/content/zh/docs/Developerguide/PG_ATTRDEF.md +++ b/content/zh/docs/Developerguide/PG_ATTRDEF.md @@ -45,7 +45,7 @@ PG\_ATTRDEF系统表存储列的默认值。

text

-

人类可读的缺省值的内部表现形式。

+

可读的缺省值的内部表现形式。

diff --git "a/content/zh/docs/Developerguide/\345\210\233\345\273\272\345\222\214\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223.md" "b/content/zh/docs/Developerguide/\345\210\233\345\273\272\345\222\214\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223.md" index b5c5ba6dfb18786354f97caad43ef76ccfe5aea5..a18b59a83a087905fe83b4f3c04246b052780398 100644 --- "a/content/zh/docs/Developerguide/\345\210\233\345\273\272\345\222\214\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223.md" +++ "b/content/zh/docs/Developerguide/\345\210\233\345\273\272\345\222\214\347\256\241\347\220\206\346\225\260\346\215\256\345\272\223.md" @@ -13,7 +13,7 @@ ## 注意事项 -如果数据库的编码为SQL\_ASCII(可以通过“show server\_encoding”命令查看当前数据库存储编码),则在创建数据库对象时,如果对象名中含有多字节字符(例如中文),超过数据库对象名长度限制(63字节)的时候,数据库将会将最后一个字节(而不是字符)截断,可能造成出现半个字符的情况。 +如果数据库的编码为SQL\_ASCII(可以通过“show server\_encoding;”命令查看当前数据库存储编码),则在创建数据库对象时,如果对象名中含有多字节字符(例如中文),超过数据库对象名长度限制(63字节)的时候,数据库将会将最后一个字节(而不是字符)截断,可能造成出现半个字符的情况。 针对这种情况,请遵循以下条件: diff --git "a/content/zh/docs/Developerguide/\345\270\203\345\260\224\347\261\273\345\236\213.md" "b/content/zh/docs/Developerguide/\345\270\203\345\260\224\347\261\273\345\236\213.md" index 15fa67a545e4c06913c018924309c6c12e582473..ccee5083affb914c31102e516269402eebafbfcb 100644 --- "a/content/zh/docs/Developerguide/\345\270\203\345\260\224\347\261\273\345\236\213.md" +++ "b/content/zh/docs/Developerguide/\345\270\203\345\260\224\347\261\273\345\236\213.md" @@ -27,7 +27,7 @@ “真”值的有效文本值是: -TRUE、't'、'true'、'y'、'yes'、'1'、1、'TRUE'。 +TRUE、't'、'true'、'y'、'yes'、'1'、1、'TRUE'、true。 “假”值的有效文本值是: