diff --git a/README.md b/README.md
index 0370e2b9d720a4d3ecf304cdbf049dc8bf977346..ef01ef1cc8d273ff0797e4ad06b323047adc515b 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
### 介绍
-欢迎来到openGauss官方文档的仓库。此仓库提供[openGauss社区网站](https://opengauss.org/zh)所呈现的所有文档,包括法律声明、发行说明、产品描述、技术白皮书、编译指导书、简易教程、安装指南、管理员指南、开发者指南、工具参考等内容。
+欢迎来到openGauss官方文档的仓库。此仓库提供[openGauss社区网站](https://opengauss.org/zh)所呈现的所有文档,包括法律声明、发行说明、产品描述、技术白皮书、编译指导书、简易教程、安装指南、管理员指南、应用开发指南、工具参考等内容。
### 贡献
我们非常欢迎您贡献文档!如果想要参与,请阅读[贡献范围](contribute/贡献范围.md),务必遵守文档写作规范,并按照流程规则提交。审核通过后,修改会在文档工程和官网中呈现。
@@ -49,6 +49,9 @@
Docs包含了如下7个分支:
- master:开发分支,为默认分支。
+- 6.0.0:6.0.0版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 6.0.0"。
+- 6.0.0-RC1:6.0.0-RC1版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 6.0.0-RC1"。
+- 5.1.0:5.1.0版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 5.1.0"。
- 5.0.0:5.0.0版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 5.0.0"。
- 3.1.1:3.1.1版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 3.1.1"。
- 3.1.0:3.1.0版本分支,分支内容呈现在[openGauss社区网站](https://opengauss.org/zh)"文档 > 3.1.0"。
diff --git a/content/docs-lite/en/docs/AboutopenGauss/database-audit.md b/content/docs-lite/en/docs/AboutopenGauss/database-audit.md
index 42d769bd2007457b0398a734250bf200928a7ded..f88eaaf14003bcc952a18b011c45abf0b7b513c8 100644
--- a/content/docs-lite/en/docs/AboutopenGauss/database-audit.md
+++ b/content/docs-lite/en/docs/AboutopenGauss/database-audit.md
@@ -18,7 +18,7 @@ Database security is essential for a database system. openGauss writes all user
## Enhancements
-None.
+version 6.0.0: Integrate tool audit log into databases to monitor activities such as backup, recovery, and other operations.
## Constraints
diff --git a/content/docs-lite/en/docs/AboutopenGauss/pseudocolumn-rownum.md b/content/docs-lite/en/docs/AboutopenGauss/pseudocolumn-rownum.md
index 87c02c9354ec1ab8d723451e5aa84edd75e42bda..cf5f5abc580a88376599f7d2729fc4d34cd87773 100644
--- a/content/docs-lite/en/docs/AboutopenGauss/pseudocolumn-rownum.md
+++ b/content/docs-lite/en/docs/AboutopenGauss/pseudocolumn-rownum.md
@@ -24,6 +24,8 @@ During internal execution, the optimizer rewrites ROWNUM into LIMIT to accelerat
## Constraints
- Do not use the pseudocolumn ROWNUM as an alias to avoid ambiguity in SQL statements.
+- Do not use ROWNUM as the column name when creating a table. Bad example: **create table table\_name\(rownum int\);**
+- Do not use ROWNUM as the column name when creating a type. Bad example: **create type type\_name\(a int, rownum int\);**
- Do not use ROWNUM when creating an index. Bad example: **create index index\_name on table\(rownum\);**
- Do not use ROWNUM as the default value when creating a table. Bad example: **create table table\_name\(id int default rownum\);**
- Do not use ROWNUM as an alias in the WHERE clause. Bad example: **select rownum rn from table where rn < 5;**
diff --git a/content/docs-lite/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md b/content/docs-lite/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
index 7992b60bb0f9bc921481a85b997963ffcac23a22..80ae86b6b818f0c8af953c283febbef4fe0a7d6f 100644
--- a/content/docs-lite/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
+++ b/content/docs-lite/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
@@ -20,11 +20,19 @@ openGauss supports functions and stored procedures compliant with the SQL stand
## Enhancements
-None.
+Support for nested arrays in PL/SQL.
+
+Support for using default argument values for cursors in PL/SQL.
+
+Support for getting the type of a row of records in a table, view, or cursor by ROWTYPE in PL/SQL.
## Constraints
-None.
+Not supportted to call functions by a nested array's array-type element referred by suscripts.
+
+Not supportted to assign a nested array's array-type element directly.
+
+Can't get the type of a nested cursor by ROWTYPE.
## Dependencies
diff --git a/content/docs-lite/en/docs/Appendix/glossary.md b/content/docs-lite/en/docs/Appendix/glossary.md
index 3f6722430e6eba737cf814a85bc8dea2be3ef694..4e73d663bbd86f3ba6ed8a623fe7bbcab5b22a8b 100644
--- a/content/docs-lite/en/docs/Appendix/glossary.md
+++ b/content/docs-lite/en/docs/Appendix/glossary.md
@@ -355,7 +355,7 @@
logical replication slot
-
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACCUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
+
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACUUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
MVCC
diff --git a/content/docs-lite/en/docs/BriefTutorial/appendix-sql-syntax.md b/content/docs-lite/en/docs/BriefTutorial/appendix-sql-syntax.md
index 8aad39f8cf09f85c71f1ccc504966bf2a2d65dd7..df5e47ac04793acb1a874af91a28f31f61406d80 100644
--- a/content/docs-lite/en/docs/BriefTutorial/appendix-sql-syntax.md
+++ b/content/docs-lite/en/docs/BriefTutorial/appendix-sql-syntax.md
@@ -620,6 +620,7 @@ where column_constraint can be:
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where compress_mode can be:
{ DELTA | PREFIX | DICTIONARY | NUMSTR | NOCOMPRESS }
@@ -631,6 +632,7 @@ where table_constraint can be:
PARTIAL CLUSTER KEY ( column_name [, ... ] ) |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where index_parameters can be:
[ WITH ( {storage_parameter = value} [, ... ] ) ]
@@ -638,6 +640,7 @@ where index_parameters can be:
where table_constraint_using_index can be:
[ CONSTRAINT constraint_name ]
{ UNIQUE | PRIMARY KEY } USING INDEX index_name
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
@@ -1544,7 +1547,7 @@ CREATE SERVER server_name
Creates a synonym object. A synonym is an alias of a database object and is used to record the mapping between database object names. You can use synonyms to access associated database objects.
```
-CREATE [ OR REPLACE ] SYNONYM synonym_name
+CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM synonym_name
FOR object_name;
```
@@ -1575,6 +1578,7 @@ where column_constraint can be:
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where table_constraint can be:
[ CONSTRAINT constraint_name ]
@@ -1584,6 +1588,7 @@ where table_constraint can be:
PARTIAL CLUSTER KEY ( column_name [, ... ] ) |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where compress_mode can be:
{ DELTA | PREFIX | DICTIONARY | NUMSTR | NOCOMPRESS }
@@ -1646,6 +1651,7 @@ where column_constraint can be:
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where table_constraint can be:
[ CONSTRAINT constraint_name ]
@@ -1654,6 +1660,7 @@ where table_constraint can be:
PRIMARY KEY ( column_name [, ... ] ) index_parameters |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where index_parameters can be:
[ WITH ( {storage_parameter = value} [, ... ] ) ]
@@ -2101,7 +2108,7 @@ DROP SERVER [ IF EXISTS ] server_name [ { CASCADE | RESTRICT } ] ;
Deletes a synonym.
```
-DROP SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
+DROP [ PUBLIC ] SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
```
## DROP TABLE
@@ -2638,7 +2645,7 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { [offset,] count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ]} [...] ];
TABLE { ONLY {(table_name)| table_name} | table_name [ * ]};
@@ -2683,7 +2690,7 @@ SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ]} [...] ];
```
@@ -2807,6 +2814,6 @@ VALUES {( expression [, ...] )} [, ...]
[ ORDER BY {sort_expression [ ASC | DESC | USING operator ]} [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ];
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ];
```
diff --git a/content/docs-lite/en/docs/BriefTutorial/functions.md b/content/docs-lite/en/docs/BriefTutorial/functions.md
index 72f89e71e0986cd12effb90b6755599fbcb96a1b..26a650552684b7f34aeb97206ab3936b21c4f952 100644
--- a/content/docs-lite/en/docs/BriefTutorial/functions.md
+++ b/content/docs-lite/en/docs/BriefTutorial/functions.md
@@ -1099,9 +1099,19 @@ The common functions of openGauss are as follows:
```
-- to\_number\(text, text\)
+- to\_number ( expr \[ DEFAULT return_value ON CONVERSION ERROR ] [, fmt])
- Description: Converts the values of the string type into the numbers in the specified format.
+ Description: Converts expr to a NUMERIC type value according to the specified format. If the expr conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt).
+
+ * The length of the integer part in fmt must be greater than the length of the integer part in expr. If it is less, an error will be thrown. The length of the fractional part in fmt can be filled as needed, and the result will be truncated according to the length of the fractional part in fmt.
+
+ * Both expr and the return_value after DEFAULT support implicit conversion. (Note: NULL plus any value equals NULL.)
+
+ * Scientific notation is supported.
+
+ * When converting a hexadecimal string to a decimal number, the function supports up to 16 bytes of hexadecimal string to be converted into an unsigned number.
+
+ * When converting a hexadecimal string to a decimal number, the format string should not contain any characters other than 'x' or 'X', otherwise, an error will be thrown.
Return type: numeric
@@ -1109,44 +1119,136 @@ The common functions of openGauss are as follows:
```
openGauss=# SELECT to_number('12,454.8-', '99G999D9S');
- to_number
+ to_number
-----------
-12454.8
(1 row)
```
+ ```
+ openGauss=# SELECT to_number('1234.123','999999.99');
+ to_number
+ -----------
+ 1234.12
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111','999999.99');
+ to_number
+ -----------
+ 112222.11
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('1e5'+'1111','999999.99');
+ to_number
+ -----------
+ 101111
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111'+NULL,'999999. 99');
+ to_number
+ -----------
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('此参数错误' default 321456231 on conversion error ,'999,999,999,999.99');
+ to_number
+ -----------
+ 321456231
+ (1 row)
+ ```
-- to\_timestamp\(text, text\)
+- to\_timestamp(double precision\)
- Description: Converts values of the string type into the timestamp of the specified type.
+ Description: Converts a UNIX century into a timestamp.
- Return type: timestamp
+ Return type: timestamp with time zone
Example:
```
- openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
- to_timestamp
- ---------------------
- 2000-12-05 00:00:00
+ openGauss=# SELECT to_timestamp(1284352323);
+ to_timestamp
+ ------------------------
+ 2010-09-13 12:32:03+08
(1 row)
```
+- to\_timestamp(string [ DEFAULT return_value ON CONVERSION ERROR ] \[ , fmt [, 'nlsparam' ] ]\)
-- to\_timestamp\(double precision\)
-
- Description: Converts a UNIX century into a timestamp.
+ Description: Converts a string to a timestamp. The default input format is [DD-Mon-YYYY HH12:MI:SS.FF], which is a 12-hour AM format. If the input value string is not in the default format, the user needs to specify their own format in fmt. If the format description is incorrect, an error will be thrown. If part of the string conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt). If Mon is an abbreviation like Jan, the language for the month can be set in nlsparam (currently only supports American and English).
+ * If the input year YYYY=0, the system will throw an error.
+ * If the input year YYYY<0, and SYYYY is specified in fmt, it will correctly output the absolute value of the year BC.
+ * Parameters in fmt that are similar to MM cannot mix case.
+ * The delimiters in fmt and the time information in string can be replaced with other symbols. Example: SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+
Return type: timestamp with time zone
Example:
```
- openGauss=# SELECT to_timestamp(1284352323);
+ openGauss=# SHOW nls_timestamp_format;
+ nls_timestamp_format
+ ----------------------------
+ DD-Mon-YYYY HH:MI:SS.FF AM
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('12-sep-2014');
+ to_timestamp
+ ---------------------
+ 2014-09-12 00:00:00
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('01-Jan-2002 10:10:10. 123000');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('2002-01-01 10:10:10.123000', 'YYYY-MM-DD HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('此为错误输入' DEFAULT '11-01-11 14:10:10.123000' ON CONVERSION ERROR,'DD-MM-RR HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2011-01-11 14:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('01-Jan-03 14:10:10.123000' DEFAULT '11-Jan-11 14:10:10.123000' ON CONVERSION ERROR, 'DD-Mon-RR HH24:MI:SS.FF','NLS_DATE_LANGUAGE = American');
+ to_timestamp
+ -------------------------
+ 2003-01-01 14:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('-1','SYYYY');
to_timestamp
------------------------
- 2010-09-13 12:32:03+08
+ 0001-01-01 00:00:00 BC
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
(1 row)
```
-
-
diff --git a/content/docs-lite/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md b/content/docs-lite/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
index 49da897b6041fae6bb3296096d03b1f3e6386a4d..d9917cc27d7d55e80fb71781daa22a486c19247a 100644
--- a/content/docs-lite/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
+++ b/content/docs-lite/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
@@ -12,7 +12,7 @@
```
mkdir openGauss
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 –C openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 –C openGauss
ls -lb openGauss/
```
diff --git a/content/docs-lite/en/docs/BriefTutorial/operators.md b/content/docs-lite/en/docs/BriefTutorial/operators.md
index e8d7e33e4a750fdde3e903ff3fe614ff901ceeca..cd964710d14bc86256be010bad30636479b1076d 100644
--- a/content/docs-lite/en/docs/BriefTutorial/operators.md
+++ b/content/docs-lite/en/docs/BriefTutorial/operators.md
@@ -156,6 +156,8 @@ An operator in openGauss is a reserved keyword or character, and it is generally
Description: Factorial
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -170,6 +172,8 @@ An operator in openGauss is a reserved keyword or character, and it is generally
Description: Factorial \(prefix operator\)
+ WARNING: unsupported in b compatibility mode
+
Example:
```
diff --git a/content/docs-lite/en/docs/BriefTutorial/stored-procedures.md b/content/docs-lite/en/docs/BriefTutorial/stored-procedures.md
index b3114e2ce38634551785136ca28976188307328c..6d2558d42de7efa5d104151c68f71e9333ce3d0f 100644
--- a/content/docs-lite/en/docs/BriefTutorial/stored-procedures.md
+++ b/content/docs-lite/en/docs/BriefTutorial/stored-procedures.md
@@ -27,7 +27,8 @@ A stored procedure is a set of SQL statements that can implement a specific func
- Delete a stored procedure.
```
- DROP PROCEDURE procedure_name ;
+ DROP PROCEDURE [ IF EXISTS ] procedure_name
+ [ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];
```
diff --git a/content/docs-lite/en/docs/BriefTutorial/type-conversion-functions.md b/content/docs-lite/en/docs/BriefTutorial/type-conversion-functions.md
index b0bfb3b276b7ac2dbe17159718046a5818cb599d..c31c6387b65890a5a288a8bea0d9e90325178094 100644
--- a/content/docs-lite/en/docs/BriefTutorial/type-conversion-functions.md
+++ b/content/docs-lite/en/docs/BriefTutorial/type-conversion-functions.md
@@ -118,6 +118,7 @@
- The optional parameter **fmt** allows for the following types: date, time, week, quarter, and century. Each type has a unique template. The templates can be combined together. Common templates include HH, MI, SS, YYYY, MM, and DD.
- A template may have a modification word. FM is a common modification word and is used to suppress the preceding zero or the following blank spaces.
+ - **Only on dbcompatibility = 'A'**,When the input is interval, the **fmt** will be ignored. If the interval only includes year and month, the output format will be SYYYY-MM. When the year is less than two digits, it will be padded with a leading zero. If the interval only includes day and time, the output format will be SDD HH:MI:SS. If the interval contains both, an error code will be returned.
Return type: text
@@ -139,6 +140,24 @@
(1 row)
```
+- to\_char\(datetime/interval, fmt, nls_language={american|english}\)
+
+ Description: Similar to to\_char\(datetime/interval \[, fmt\]\),, an additional parameter **nls_language**. The possible values for **nls_language** are **american** and **english**.
+
+ - Templates like MON in fmt will be converted to the corresponding language expression based on nls_language.
+
+ Return type: text
+
+ Example:
+
+ ```
+ openGauss=# SELECT to_char(DATE '2024-08-05', 'DY, DD-MON-YYYY', 'NLS_DATE_LANGUAGE = ENGLISH') ;
+ to_char
+ ----------
+ MON, 05-AUG-2024
+ (1 row)
+ ```
+
- to\_char\(double precision/real, text\)
Description: Converts the values of the floating point type into the strings in the specified format.
@@ -203,6 +222,8 @@
Description: Converts the values of the time interval type into the strings in the specified format.
+ - **Only on dbcompatibility = 'A'**,When the input is interval, the **fmt** will be ignored. If the interval only includes year and month, the output format will be SYYYY-MM. When the year is less than two digits, it will be padded with a leading zero. If the interval only includes day and time, the output format will be SDD HH:MI:SS. If the interval contains both, an error code will be returned.
+
Return type: text
Example:
@@ -215,6 +236,21 @@
(1 row)
```
+ ```
+ openGauss=# SELECT to_char(INTERVAL '123-2' YEAR(4) TO MONTH, 'YYY-MON');
+ to_char
+ ---------
+ +123-02
+ (1 row)
+ ```
+
+ ```
+ openGauss=# SELECT to_char(INTERVAL '1 year 2 months 3 days', 'YYYY-MON-DD') ;
+ ERROR: Interval simultaneously includes 'year to month' and 'day to second' is not supported in A format
+ DETAIL: Not support the given interval data.
+ CONTEXT: referenced column: to_char
+ ```
+
- to\_char\(int, text\)
Description: Converts the values of the integer type into the strings in the specified format.
@@ -281,6 +317,34 @@
(1 row)
```
+- to\_char\(blob, \[CSID\]\)
+
+ Description: **Only on dbcompatibility = 'A'** support the function,convert blob type data to text by specified **CSID**.
+
+ - **CSID** type is int,denote A format character ID.
+ - CSID equal to 0 or without CSID, use database's encoding.
+
+ Return type: text
+
+ Example:
+
+ ```
+ CREATE TABLE blob_table (c1 BLOB);
+ INSERT INTO blob_table (c1) VALUES ( (encode('Hello World!','hex'))::RAW );
+ SELECT to_char(c1, 873) FROM blob_table ;
+ to_char
+ --------------
+ Hello World!
+ (1 row)
+
+ SELECT to_char(c1) FROM blob_table ;
+ to_char
+ --------------
+ Hello World!
+ (1 row)
+
+ ```
+
- to\_clob\(char/nchar/varchar/varchar2/nvarchar/nvarchar2/text/raw\)
Description: Converts the raw type or text character set type CHAR, NCHAR, VARCHAR, VARCHAR2, NVARCHAR, NVARCHAR2, or TEXT to the CLOB type.
@@ -380,17 +444,23 @@
(1 row)
```
-- to\_number \( expr \[, fmt\]\)
+- to\_number ( expr \[ DEFAULT return_value ON CONVERSION ERROR ] [, fmt])
+
+ Description: Converts expr to a NUMERIC type value according to the specified format. If the expr conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt).
- Description: Converts **expr** into a value of the NUMBER type according to the specified format.
+ * Type Conversion Formats (fmt): Please refer to [Table 1](#en-us_topic_0283137417_en-us_topic_0237121973_en-us_topic_0059778246_t3987a5bb00154b0f9e55863b4ababd3d).
+
+ * The length of the integer part in fmt must be greater than the length of the integer part in expr. If it is less, an error will be thrown. The length of the fractional part in fmt can be filled as needed, and the result will be truncated according to the length of the fractional part in fmt.
- For details about the type conversion formats, see [Table 1](#en-us_topic_0283137417_en-us_topic_0237121973_en-us_topic_0059778246_t3987a5bb00154b0f9e55863b4ababd3d).
+ * Both expr and the return_value after DEFAULT support implicit conversion. (Note: NULL plus any value equals NULL.)
- If a hexadecimal string is converted into a decimal number, the hexadecimal string can include a maximum of 16 bytes if it is to be converted into a sign-free number.
+ * Scientific notation is supported.
- During the conversion from a hexadecimal string to a decimal digit, the format string cannot have a character other than x or X. Otherwise, an error is reported.
+ * When converting a hexadecimal string to a decimal number, the function supports up to 16 bytes of hexadecimal string to be converted into an unsigned number.
- Return type: number
+ * When converting a hexadecimal string to a decimal number, the format string should not contain any characters other than 'x' or 'X'; otherwise, an error will be thrown.
+
+ Return type: numeric
Example:
@@ -401,22 +471,40 @@
-12454.8
(1 row)
```
-
-- to\_number\(text, text\)
-
- Description: Converts the values of the string type into the numbers in the specified format.
-
- Return type: numeric
-
- Example:
-
```
- openGauss=# SELECT to_number('12,454.8-', '99G999D9S');
- to_number
+ openGauss=# SELECT to_number('1234.123','999999.99');
+ to_number
-----------
- -12454.8
+ 1234.12
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111','999999.99');
+ to_number
+ -----------
+ 112222.11
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('1e5'+'1111','999999.99');
+ to_number
+ -----------
+ 101111
(1 row)
```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111'+NULL,'999999. 99');
+ to_number
+ -----------
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('此参数错误' default 321456231 on conversion error ,'999,999,999,999.99');
+ to_number
+ -----------
+ 321456231
+ (1 row)
+ ```
- to\_timestamp\(double precision\)
@@ -434,18 +522,16 @@
(1 row)
```
-- to\_timestamp\(string \[,fmt\]\)
-
- Description: Converts a string into a value of the timestamp type according to the format specified by **fmt**. When **fmt** is not specified, perform the conversion according to the format specified by **nls\_timestamp\_format**.
-
- In **to\_timestamp** in openGauss,
+- to\_timestamp(string [ DEFAULT return_value ON CONVERSION ERROR ] \[ , fmt [, 'nlsparam' ] ]\)
- - If the input year *YYYY* is 0, an error will be reported.
- - If the input year *YYYY* is less than 0, specify *SYYYY* in **fmt**. The year with the value of n \(an absolute value\) BC will be output correctly.
+ Description: Converts a string to a timestamp. The default input format is [DD-Mon-YYYY HH12:MI:SS.FF], which is a 12-hour AM format. If the input value string is not in the default format, the user needs to specify their own format in fmt. If the format description is incorrect, an error will be thrown. If part of the string conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt). If Mon is an abbreviation like Jan, the language for the month can be set in nlsparam (currently only supports American and English).
- Characters in the **fmt** must match the schema for formatting the data and time. Otherwise, an error is reported.
-
- Return type: timestamp without time zone
+ * If the input year YYYY=0, the system will throw an error.
+ * If the input year YYYY<0, and SYYYY is specified in fmt, it will correctly output the absolute value of the year BC.
+ * Parameters in fmt that are similar to MM cannot mix case.
+ * The delimiters in fmt and the time information in string can be replaced with other symbols. Example: SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+
+ Return type: timestamp with time zone
Example:
@@ -455,54 +541,49 @@
----------------------------
DD-Mon-YYYY HH:MI:SS.FF AM
(1 row)
-
+ ```
+ ```
openGauss=# SELECT to_timestamp('12-sep-2014');
to_timestamp
---------------------
2014-09-12 00:00:00
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('12-Sep-10 14:10:10.123000','DD-Mon-YY HH24:MI:SS.FF');
+ openGauss=# SELECT to_timestamp ('01-Jan-2002 10:10:10. 123000');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('2002-01-01 10:10:10.123000', 'YYYY-MM-DD HH24:MI:SS.FF');
to_timestamp
-------------------------
- 2010-09-12 14:10:10.123
+ 2002-01-01 10:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('-1','SYYYY');
- to_timestamp
- ------------------------
- 0001-01-01 00:00:00 BC
+ openGauss=# SELECT to_timestamp ('此为错误输入' DEFAULT '11-01-11 14:10:10.123000' ON CONVERSION ERROR,'DD-MM-RR HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2011-01-11 14:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('98','RR');
- to_timestamp
- ---------------------
- 1998-01-01 00:00:00
+ openGauss=# SELECT to_timestamp ('01-Jan-03 14:10:10.123000' DEFAULT '11-Jan-11 14:10:10.123000' ON CONVERSION ERROR, 'DD-Mon-RR HH24:MI:SS.FF','NLS_DATE_LANGUAGE = American');
+ to_timestamp
+ -------------------------
+ 2003-01-01 14:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('01','RR');
- to_timestamp
- ---------------------
- 2001-01-01 00:00:00
+ openGauss=# SELECT to_timestamp('-1','SYYYY');
+ to_timestamp
+ ------------------------
+ 0001-01-01 00:00:00 BC
(1 row)
```
-
-- to\_timestamp\(text, text\)
-
- Description: Converts values of the string type into the timestamp of the specified type.
-
- Return type: timestamp
-
- Example:
-
```
openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
to_timestamp
@@ -510,6 +591,13 @@
2000-12-05 00:00:00
(1 row)
```
+ ```
+ openGauss=# SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
+ (1 row)
+ ```
**Table 1** Template patterns for numeric formatting
diff --git a/content/docs-lite/en/docs/DataBaseReference/flashback.md b/content/docs-lite/en/docs/DataBaseReference/flashback.md
index a82ac23adc4fe18838f1c2ecdd4fb5eaee4b7b14..45be1566922d1b61a907dccd8c39b6358a7b0fa8 100644
--- a/content/docs-lite/en/docs/DataBaseReference/flashback.md
+++ b/content/docs-lite/en/docs/DataBaseReference/flashback.md
@@ -14,7 +14,8 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in
## recyclebin\_retention\_time
-**Parameter description**: Specifies the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+**Parameter description**: Specifies the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired
+objects cannot be used to do flashback operations.
This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846).
diff --git a/content/docs-lite/en/docs/DataBaseReference/gs_wlm_user_resource_history.md b/content/docs-lite/en/docs/DataBaseReference/gs_wlm_user_resource_history.md
index e1a0f2e90b0f5f55013fade1b80840f453212209..a1e73aed2e781972a9f530d04deefea09cf499c2 100644
--- a/content/docs-lite/en/docs/DataBaseReference/gs_wlm_user_resource_history.md
+++ b/content/docs-lite/en/docs/DataBaseReference/gs_wlm_user_resource_history.md
@@ -31,7 +31,7 @@
integer
-
Size of the memory being used, in MB
+
Size of the memory being used(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB
total_memory
@@ -45,7 +45,7 @@
real
-
Number of CPU cores in use
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
total_cpu
@@ -73,70 +73,70 @@
bigint
-
Used temporary storage space, in KB
+
Used temporary storage space(Reserved field, not in use yet.),, in KB
total_temp_space
bigint
-
Available temporary storage space, in KB. The value –1 indicates that the maximum temporary storage space is not limited.
+
Available temporary storage space(Reserved field, not in use yet.),, in KB. The value –1 indicates that the maximum temporary storage space is not limited.
used_spill_space
bigint
-
Used space of operator flushing, in KB
+
Used space of operator flushing(Reserved field, not in use yet.),, in KB
total_spill_space
bigint
-
Available storage space for operator flushing, in KB. The value –1 indicates that the maximum operator flushing space is not limited.
+
Available storage space for operator flushing(Reserved field, not in use yet.),, in KB. The value –1 indicates that the maximum operator flushing space is not limited.
read_kbytes
bigint
-
Byte traffic of read operations in a monitoring period, in KB
+
Byte traffic of read operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB
write_kbytes
bigint
-
Byte traffic of write operations in a monitoring period, in KB
+
Byte traffic of write operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB
read_counts
bigint
-
Number of read operations in a monitoring period
+
Number of read operations in a monitoring period(Not supported currently, available only in distributed mode.)
write_counts
bigint
-
Number of write operations in a monitoring period
+
Number of write operations in a monitoring period(Not supported currently, available only in distributed mode.)
read_speed
real
-
Byte rate of read operations in a monitoring period, in KB/s
+
Byte rate of read operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB/s
write_speed
real
-
Byte rate of write operations in a monitoring period, in KB/s
+
Byte rate of write operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB/s
Used memory(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB
total_memory
@@ -66,28 +66,28 @@
bigint
-
Used temporary space, in KB
+
Used temporary space(Reserved field, not in use yet.), in KB
total_temp_space
bigint
-
Total available temporary space, in KB (-1 if the temporary space is not limited)
+
Total available temporary space(Reserved field, not in use yet.), in KB (-1 if the temporary space is not limited)
used_spill_space
bigint
-
Size of the used operator flushing space, in KB
+
Size of the used operator flushing space(Reserved field, not in use yet.), in KB
total_spill_space
bigint
-
Total size of the available operator flushing space, in KB (-1 if the space is not limited)
+
Total size of the available operator flushing space(Reserved field, not in use yet.), in KB (-1 if the space is not limited)
read_kbytes
@@ -96,6 +96,7 @@
Primary database node: total bytes read by the user's complex jobs on all database nodes in the last 5 seconds, in KB
Database node: total bytes read by the user's complex jobs from the instance startup time to the current time, in KB
+
Not supported currently, available only in distributed mode.
write_kbytes
@@ -104,6 +105,7 @@
Primary database node: total bytes written by the user's complex jobs on all database nodes in the last 5 seconds, in KB
Database node: total bytes written by the user's complex jobs from the instance startup time to the current time, in KB
+
Not supported currently, available only in distributed mode.
read_counts
@@ -112,6 +114,7 @@
Primary database node: total number of read times of the user's complex jobs on all database nodes in the last 5 seconds
Database node: total number of read times of the user's complex jobs from the instance startup time to the current time
+
Not supported currently, available only in distributed mode.
write_counts
@@ -120,6 +123,7 @@
Primary database node: total number of write times of the user's complex jobs on all database nodes in the last 5 seconds
Database node: total number of write times of the user's complex jobs from the instance startup time to the current time
+
Not supported currently, available only in distributed mode.
read_speed
@@ -128,6 +132,7 @@
Primary database node: average read rate of the user's complex jobs on a single database node in the last 5 seconds, in KB/s
Database node: average read rate of the user's complex jobs on the database node in the last 5 seconds, in KB/s
+
Not supported currently, available only in distributed mode.
write_speed
@@ -136,6 +141,7 @@
Primary database node: average write rate of the user's complex jobs on a single database node in the last 5 seconds, in KB/s
Database node: average write rate of the user's complex jobs on the database node in the last 5 seconds, in KB/s
+
Not supported currently, available only in distributed mode.
Size of the memory being used(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB.
total_memory
@@ -38,7 +38,7 @@
double precision
-
Number of CPU cores in use.
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
total_cpu
@@ -66,70 +66,70 @@
bigint
-
Used temporary storage space, in KB.
+
Used temporary storage space(Reserved field, not in use yet.), in KB.
total_temp_space
bigint
-
Total available temporary space, in KB (-1 if the temporary space is not limited).
+
Total available temporary space(Reserved field, not in use yet.), in KB (-1 if the temporary space is not limited).
used_spill_space
bigint
-
Used disk space for spilling, in KB.
+
Used disk space for spilling(Reserved field, not in use yet.), in KB.
total_spill_space
bigint
-
Total available disk space for spilling, in KB. The value -1 indicates that the space is not limited.
+
Total available disk space for spilling(Reserved field, not in use yet.), in KB. The value -1 indicates that the space is not limited.
read_kbytes
bigint
-
Amount of data read from the disk, in KB.
+
Amount of data read from the disk(Not supported currently, available only in distributed mode.), in KB.
write_kbytes
bigint
-
Amount of data written to the disk, in KB.
+
Amount of data written to the disk(Not supported currently, available only in distributed mode.), in KB.
read_counts
bigint
-
Number of disk read times.
+
Number of disk read times(Not supported currently, available only in distributed mode.).
write_counts
bigint
-
Number of disk write times.
+
Number of disk write times(Not supported currently, available only in distributed mode.).
read_speed
double precision
-
Disk read rate, in B/ms.
+
Disk read rate(Not supported currently, available only in distributed mode.), in B/ms.
write_speed
double precision
-
Disk write rate, in B/ms.
+
Disk write rate(Not supported currently, available only in distributed mode.), in B/ms.
diff --git a/content/docs-lite/en/docs/DataBaseReference/platform-and-client-compatibility.md b/content/docs-lite/en/docs/DataBaseReference/platform-and-client-compatibility.md
index acfbcc124f5a151abe90467ec984ebf4c5722cb1..e439d610b1bd11ee738e921804e8150ed014a222 100644
--- a/content/docs-lite/en/docs/DataBaseReference/platform-and-client-compatibility.md
+++ b/content/docs-lite/en/docs/DataBaseReference/platform-and-client-compatibility.md
@@ -28,16 +28,6 @@ This parameter is a USERSET parameter. Set it based on instructions provided in
**Default value**: **DD-Mon-YYYY HH:MI:SS.FF AM**
-## nls\_length\_semantics
-
-**Parameter description:**:Set the default semantics of the string type, set it to BYTE, calculate the string length by bytes, and set it to CHAR, calculate the string length by characters.
-
-This parameter is a USERSET parameter. Set it based on instructions provided in [Table 1](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846).
-
-**Value range**:a string
-
-**Default value**:BYTE
-
## max\_function\_args
**Parameter description**: Specifies the maximum number of parameters allowed for a function.
@@ -272,6 +262,46 @@ numeric
Determines the behavior when char(n) types are converted to other variable-length string types. By default, spaces at the end are omitted when the char(n) type is converted to other variable-length string types. After this parameter is enabled, spaces at the end are not omitted during conversion. In addition, if the length of the char(n) type exceeds the length of other variable-length string types, an error is reported. This parameter is valid only when sql_compatibility is set to A.
+
disable_record_type_in_dml
+
Prohibit inserting virtual columns. After enabling this option will prohibit to use record type variables as insertion values in insert statements.
+
+create table t1(col1 varchar(10),col varchar(10));
+create table t2(col1 varchar(10),col varchar(10));
+set behavior_compat_options='disable_record_type_in_dml';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+ERROR: The record type variable cannot be used as an insertion value.
+CONTEXT: SQL statement "insert into t2 values(source)"
+PL/pgSQL function inline_code_block line 7 at SQL statement
+
+set behavior_compat_options='';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+NOTICE: (one,two)
+NOTICE: (one,two)
+
+
+
diff --git a/content/docs-lite/en/docs/DataBaseReference/statement-behavior.md b/content/docs-lite/en/docs/DataBaseReference/statement-behavior.md
index c26e6986412a56f45ece63af89876def6cdfb1f3..3eee6aae74454e1fed785db516270b5c8063443e 100644
--- a/content/docs-lite/en/docs/DataBaseReference/statement-behavior.md
+++ b/content/docs-lite/en/docs/DataBaseReference/statement-behavior.md
@@ -249,4 +249,18 @@ This parameter is a **POSTMASTER** parameter. Set it based on instructions pro
- **on** indicates that case is ignored when double quotes are used.
- **off** indicates that case is not ignored when double quotes are used.
+**Default value**: **off**
+
+## enable\_pltype\_name\_check
+
+**Parameter description**:
+Sets whether type name checking is performed when assigning a variable with a type name (including RECORD, VARRAY, TABLE OF types, and types created with CREATE TYPE).
+
+This parameter is a USERSET parameter. Set it based on instructions provided in [Table 2](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t290c8f15953843db8d8e53d867cd893d).
+
+**Value range**: Boolean
+
+- **on** Indicates check type names.
+- **off** Indicates do not check type names.
+
**Default value**: **off**
\ No newline at end of file
diff --git a/content/docs-lite/en/docs/DatabaseAdministrationGuide/querying-audit-results.md b/content/docs-lite/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
index c6eb7b6f39fde0218c1d84ea9799781fd02915c7..14c8f39ed513823784f1ff56b79f806a0d8025c2 100644
--- a/content/docs-lite/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
+++ b/content/docs-lite/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
@@ -46,15 +46,15 @@
3. Run the following command to query the audit record:
```
- openGauss=# select * from pg_query_audit('2021-03-04 08:00:00','2021-03-04 17:00:00');
+ openGauss=# select * from pg_query_audit('2024-07-12 08:00:00','2024-07-12 17:00:00');
```
The command output is similar to the following:
```
- time | type | result | userid | username | database | client_conninfo | object_name | detail_info | node_name | thread_id | local_port | remote_port
+ time | type | result | userid | username | database | client_conninfo | object_name | detail_info | node_name | thread_id | local_port | remote_port | sha_code | verify_result
------------------------+----------------+--------+--------+-----------+-----------+-------------------------+-------------------+--------------+-------------------+---------------------------------+------------+-------------
- 2021-03-04 08:00:08+08 | login_success | ok | 10 | omm | postgres | gsql@::1 | postgres | login db(postgres) success, SSL=off | dn_6001_6002_6003 | 140477687527168@668131208211425 |17778 | 46946
+ 2024-07-12 16:22:43+08 | login_success | ok | 10 | omm | postgres | gsql@::1 | postgres | login db(postgres) success,the current user is:omm, SSL=off | node1 | 139658603525888@774087763979298 | 5433 | 38964 | 73ead146da25a77ca01fc21204b74de99b55d499756438d0dc090e674d315bca | t
```
This record indicates that user **omm** logs in to database **postgres** at the time specified by the **time** column. After the host specified by **log\_hostname** is started and a client is connected to its IP address, the host name found by reverse DNS resolution is displayed following the at sign \(@\) in the value of **client\_conninfo**.
diff --git a/content/docs-lite/en/docs/DatabaseOMGuide/drop-truncate-flashback.md b/content/docs-lite/en/docs/DatabaseOMGuide/drop-truncate-flashback.md
index f2524215ef0adba8f7073b09adb96adbe671a941..b2ff7de864a12694a10ebd5245a6011f37120e5f 100644
--- a/content/docs-lite/en/docs/DatabaseOMGuide/drop-truncate-flashback.md
+++ b/content/docs-lite/en/docs/DatabaseOMGuide/drop-truncate-flashback.md
@@ -8,7 +8,8 @@
## Prerequisites
- The **enable\_recyclebin** parameter has been set for enabling the recycle bin.
-- The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+- The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired
+objects cannot be used to do flashback operations.
## Syntax
diff --git a/content/docs-lite/en/docs/GettingStarted/container-based-installation-on-a-single-node.md b/content/docs-lite/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
index e96e4f56ef0b847864e4d79978a6c9dab66f8559..627a1d6e7dc021e6227211bca2d7f162cbae99f7 100644
--- a/content/docs-lite/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
+++ b/content/docs-lite/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
@@ -16,16 +16,16 @@ Use the **buildDockerImage.sh** script to build a Docker image. This script is
> **NOTE:**
>
-> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-***X.X.X***-CentOS-64bit.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
+> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
>
> - If the **-i** option is not specified when you run the **buildDockerImage.sh** script, the SHA-256 check is performed by default. You need to manually write the check result to the **sha256\_file\_amd64** file.
> ```
## Modify the SHA-256 verification file.
- cd /soft/openGauss-server/docker/dockerfiles/3.0.0
- sha256sum openGauss-3.0.0-CentOS-64bit.tar.bz2 > sha256_file_amd64
+ cd /soft/openGauss-server/docker/dockerfiles/6.0.0
+ sha256sum openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2 > sha256_file_amd64
> ```
-> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/3.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
+> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/6.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
> ```
wget -O openEuler_aarch64.repo https://mirrors.huaweicloud.com/repository/conf/openeuler_aarch64.repo
@@ -39,7 +39,7 @@ Usage: buildDockerImage.sh -v [version] [-i] [Docker build option]
Builds a Docker Image for openGauss
Parameters:
-v: version to build
- Choose one of: 3.0.0
+ Choose one of: 6.0.0
-i: ignores the SHA-256 checksums
LICENSE UPL 1.0
@@ -74,26 +74,26 @@ Specifies the database port. The default value is **5432**.
## Starting an Instance
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:6.0.0
```
## Connecting to the Database from the OS Layer
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:2.0.0
-$ gsql -d postgres -U gaussdb -W'Enmo@123' -h your-host-ip -p8888
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:6.0.0
+$ gsql -d postgres -U gaussdb -W'Enmo@123' -h your-host-ip -p8888 # OS need install gsql client
```
## Data Persistence
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:6.0.0
```
>**Note**
>
->1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/3.0.0`. You only need to change the version number to the corresponding version number.
+>1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/6.0.0`. You only need to change the version number to the corresponding version number.
>
->2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `http://121.36.97.194/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
+>2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `https://repo.openeuler.org/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
>
>3. During the build, if the yum source download times out, check the proxy. You can also `--network host` to the end of the `docker build` command in the `buildDockerImage.sh` script to use the network of the host machine.
diff --git a/content/docs-lite/en/docs/GettingStarted/installation-on-a-single-node.md b/content/docs-lite/en/docs/GettingStarted/installation-on-a-single-node.md
index c045c63ba6d8b2d9411871318b0b54b542c33786..ed2fc8babad94bc94e1c53230e183e47bf1e9856 100644
--- a/content/docs-lite/en/docs/GettingStarted/installation-on-a-single-node.md
+++ b/content/docs-lite/en/docs/GettingStarted/installation-on-a-single-node.md
@@ -16,7 +16,7 @@
3. Log in to the host where the openGauss package is installed as user **omm** and decompress the openGauss package to the installation directory (for example, **/opt/software/openGauss**).
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
4. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/docs-lite/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md b/content/docs-lite/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
index ec7c5ec98bc79191f063fec569c4a32399b940fd..158b297cc15e93b0a1a89dbb3109de0fcf16c8c1 100644
--- a/content/docs-lite/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
+++ b/content/docs-lite/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
@@ -12,7 +12,7 @@
```
mkdir openGauss
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 –C openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 –C openGauss
ls -lb openGauss/
```
diff --git a/content/docs-lite/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md b/content/docs-lite/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
index d5dc946d1cc675087c485a8f03f5a36994cc9074..27128f447b3bf3b26876abc0585fbce0cf62b0b1 100644
--- a/content/docs-lite/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
+++ b/content/docs-lite/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
@@ -63,8 +63,8 @@ Both
Linux OS
-
ARM:
openEuler 20.3 LTS (recommended)
Kirin V10
Asianux 7.5
-
X86:
openEuler 20.3LTS
CentOS 7.6
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
+
ARM:
openEuler 20.03 LTS (recommended)
openEuler 22.03 LTS
Kirin V10
Asianux 7.5
UOS V20
+
X86:
openEuler 20.03 LTS
openEuler 22.03 LTS
CentOS 7.6
Kirin V10
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
diff --git a/content/docs-lite/en/docs/InstallationGuide/obtaining-the-installation-package.md b/content/docs-lite/en/docs/InstallationGuide/obtaining-the-installation-package.md
index 8d6583bf9ab745d9ef24595b53d156c14675b3ec..6fa357dedac79062530c62b4108275e9ae2dda76 100644
--- a/content/docs-lite/en/docs/InstallationGuide/obtaining-the-installation-package.md
+++ b/content/docs-lite/en/docs/InstallationGuide/obtaining-the-installation-package.md
@@ -14,7 +14,7 @@ You can obtain the installation package from the openGauss open-source community
Decompress the installation package and check whether the installation directory and files are complete. Run the following commands in the directory where the installation package is stored:
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2
ls -lb
```
diff --git a/content/docs-lite/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md b/content/docs-lite/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
index 517542d30487d1bd587c0d99885633ccfa246e75..6012cf16966ac5d2a1da7122ab91890ef66f3c07 100644
--- a/content/docs-lite/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
+++ b/content/docs-lite/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
@@ -66,8 +66,8 @@ This section describes hardware and software requirements of openGauss. It is re
Linux OS
-
ARM:
openEuler 20.03LTS (recommended)
openEuler 22.03LTS
Kirin V10
Asianux 7.5
-
x86:
openEuler 20.03LTS
openEuler 22.03LTS
CentOS 7.6
Asianux 7.6
NOTE:
The current installation package can be used only on the English operating system.
+
ARM:
openEuler 20.03 LTS (recommended)
openEuler 22.03 LTS
Kirin V10
Asianux 7.5
UOS V20
+
x86:
openEuler 20.03 LTS
openEuler 22.03 LTS
CentOS 7.6
Kirin V10
Asianux 7.6
NOTE:
The current installation package can be used only on the English operating system.
diff --git a/content/docs-lite/en/docs/Releasenotes/user-notice.md b/content/docs-lite/en/docs/Releasenotes/user-notice.md
index 5f62a99f8952a12f3d8b5799a0d261387af3831d..85f3e77206ae5d5d8ece6d5653b661fdd795ce6b 100644
--- a/content/docs-lite/en/docs/Releasenotes/user-notice.md
+++ b/content/docs-lite/en/docs/Releasenotes/user-notice.md
@@ -2,9 +2,6 @@
openGauss is an open-source, secure, and reliable relational OLTP database with ultimate performance. It is released with the Mulan PSL v2 protocol, allowing users to copy, use, modify, and distribute the source code.
-The version number of openGauss is named in *X.Y.Z* format. *X.0.0* indicates the LTS version, *X.Y.0* indicates the preview version, and *Z* indicates the patch version. Generally, a preview version and an LTS version are released every year. The preview version is for beta testing. The LTS version is a long-term support version and can be rolled out on a large scale. If major issues need to be resolved, patch versions will be released as required.
-
-The preliminary openGauss lifecycle plans are as follows:
-
-+ The LTS version is released every one year, and the community provides three-year maintenance support.
-+ The preview version is released every one year, and the community provides 0.5-year maintenance support.
+The version number of openGauss is in *X.Y*.0-*RCx* format, where *X*.0.0 indicates a long-term support (LTS) release, *X.Y*.0-*RCx* represents a preview release, and *X.Y*.0 denotes a patch release. LTS releases are typically made every two years and are intended for large-scale deployment; preview releases are provided for beta testing; and patch releases may be issued as needed for critical bug fixes.
++ LTS releases are made every 2 years, with community support for 3 years.
++ Preview releases are made every 6 months, with community support for 6 months.
\ No newline at end of file
diff --git a/content/docs-lite/en/docs/SQLReference/aggregate-functions.md b/content/docs-lite/en/docs/SQLReference/aggregate-functions.md
index 86baf3406d34bfe345e5187a8679e6ab2ea6331f..03b16c75c2d5398c30f5b612ea0e8792b5692ee2 100644
--- a/content/docs-lite/en/docs/SQLReference/aggregate-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/aggregate-functions.md
@@ -559,6 +559,97 @@
(1 row)
```
+- corr_s\(expr1, expr2, return_mode\)
+
+ Description:Spearman correlation coefficient
+
+ Return type:double precision
+
+ Return Value: The `return_mode` parameter is optional; if not specified, the function returns the Spearman's rank correlation coefficient (the return value is the same as when `return_mode=COEFFICIENT`). If specified, the value of `return_mode` must be one of the following five options.
+
+
+
+
Return Value
+
Meaning
+
+
+
COEFFICIENT
+
Coefficient of correlation
+
+
+
ONE_SIDED_SIG
+
Positive one-tailed significance of the correlation
+
+
+
ONE_SIDED_SIG_POS
+
Same as ONE_SIDED_SIG
+
+
+
ONE_SIDED_SIG_NEG
+
Negative one-tailed significance of the correlation
+
+
+
TWO_SIDED_SIG
+
Two-tailed significance of the correlation
+
+
+
+ Example:
+
+ ```
+ openGauss=# CREATE TABLE corr_t1(a int, b int);
+ CREATE TABLE
+ openGauss=# INSERT INTO corr_t1 VALUES (NULL,11),(1,2),(1,3),(2,4),(2,5),(3,6);
+ INSERT 0 6
+ openGauss=# SELECT CORR_S(a,b) FROM corr_t1;
+ corr_s
+ ------------------
+ .948683298050514
+ (1 row)
+
+ openGauss=# SELECT CORR_S(a,b,'COEFFICIENT') FROM corr_t1;
+ corr_s
+ ------------------
+ .948683298050514
+ (1 row)
+
+ openGauss=# SELECT CORR_S(a,b,'ONE_SIDED_SIG') FROM corr_t1;
+ corr_s
+ --------------------
+ .00692341649442951
+ (1 row)
+ ```
+
+- corr_k\(expr1, expr2, return_mode\)
+
+ Description: Kendall's tau-b correlation coefficient
+
+ Return type:double precision
+
+ Return Value: The `return_mode` parameter is optional; if not specified, the function returns Kendall's tau-b correlation coefficient (the return value is the same as when `return_mode=COEFFICIENT`). If specified, the description of the return value is the same as that for the `corr_s` function mentioned above.
+
+ Example:
+
+ ```
+ openGauss=# SELECT CORR_K(a,b) FROM corr_t1;
+ corr_k
+ ------------------
+ .894427190999916
+ (1 row)
+
+ openGauss=# SELECT CORR_K(a,b,'COEFFICIENT') FROM corr_t1;
+ corr_k
+ ------------------
+ .894427190999916
+ (1 row)
+
+ openGauss=# SELECT CORR_K(a,b,'ONE_SIDED_SIG') FROM corr_t1;
+ corr_k
+ -------------------
+ .0142298684581553
+ (1 row)
+ ```
+
- every\(expression\)
Description: Equivalent to **bool\_and**
@@ -929,3 +1020,171 @@
{ "D" : 5, "D" : null }
(2 rows)
```
+
+- cume\_dist\(expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the cumulative distribution of the assumed rows and corresponding sorting criteria identified by the parameters of the function in the aggregated group rows. in other words, The proportion of the total number of rows in the sorting partition where the value of expression is the same as the value of the last row after sorting
+
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**: Mandatory. The sorting key can be a column name or a sorting key expression.
+
+ Return type: float
+
+ Example:
+
+ Insert the input 4 into a column sorted by c1, with 4 placed at position 8. Therefore, the function returns a value of 8/14.
+
+ ```
+ openGauss=# create table aggregates_hypothetical(c1 int, c2 NUMBER(8,2), c3 varchar(20), c4 timestamp);
+ CREATE TABLE
+ openGauss=# insert into aggregates_hypothetical values
+ openGauss-# (1,0.1,'1','2024-09-01 09:22:00'),
+ openGauss-# (2,0.2,'2','2024-09-02 09:22:00'),
+ openGauss-# (3,0.1,'3','2024-09-03 09:22:00'),
+ openGauss-# (3,0.2,'3','2024-09-04 09:22:00'),
+ openGauss-# (3,0.3,'3','2024-09-05 09:22:00'),
+ openGauss-# (3,0.3,'3','2024-09-05 09:22:00'),
+ openGauss-# (4,0.2,'4','2024-09-06 09:22:00'),
+ openGauss-# (5,0.2,'5','2024-09-07 09:22:00'),
+ openGauss-# (6,0.2,'6','2024-09-08 09:22:00'),
+ openGauss-# (7,0.2,'7','2024-09-09 09:22:00'),
+ openGauss-# (8,0.2,'8','2024-09-10 09:22:00'),
+ openGauss-# (9,0.2,'9','2024-09-11 09:22:00'),
+ openGauss-# (10,0.2,'10','2024-09-12 09:22:00');
+ INSERT 0 13
+
+ openGauss=# select cume_dist(4) within group (order by c1) from aggregates_hypothetical;
+ cume_dist
+ ------------------
+ .571428571428571
+ (1 row)
+ ```
+
+ Example:
+
+ Insert the input (3,0.2) into the column sorted by c1 and c2, and place it in the 5th position. Therefore, the function returns a value of 5/14
+
+ ```
+ openGauss=# select cume_dist(3,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ cume_dist
+ ------------------
+ .357142857142857
+ (1 row)
+ ```
+
+ Example:
+
+ Insert the input string into a column sorted by c1, perform type conversion, and then perform calculations
+
+ ```
+ select cume_dist('1') within group (order by c1) from test_aggregate;
+ cume_dist
+ ------------------
+ .142857142857143
+ (1 row)
+ ```
+
+- rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the ranking of a hypothetical row identified by the parameters of a function relative to a given sorting criterion. The ranking values of the rank function are not continuous.
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: int
+
+ Example
+
+ Using c1 as the sorting column, calculate the ranking value of the input parameter in the sorting column. Duplicate columns are also included in the ranking, so the ranking is discontinuous
+
+ ```
+ openGauss=# select rank(3) within group (order by c1) from aggregates_hypothetical;
+ rank
+ ------
+ 3
+ (1 row)
+
+ openGauss=# select rank(4) within group (order by c1) from aggregates_hypothetical;
+ rank
+ ------
+ 7
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select rank(4,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ rank
+ ------
+ 7
+ (1 row)
+ ```
+
+- dense\_rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the ranking of a hypothetical row identified by the parameters of a function relative to a given sorting criterion. The ranking value of the dense_rank function is continuous
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: int
+
+ Example
+
+ Using c1 as the sorting column, calculate the ranking value of the input parameter in the sorting column. Duplicate columns are not included in the ranking, so the ranking is continuous
+
+ ```
+ openGauss=# select dense_rank(3) within group (order by c1) from aggregates_hypothetical;
+ dense_rank
+ ------------
+ 3
+ (1 row)
+
+ openGauss=# select dense_rank(4) within group (order by c1) from aggregates_hypothetical;
+ dense_rank
+ ------------
+ 4
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select dense_rank(4,0.2) within group (order by c1,c2) from aggregates_hypothetical;;
+ dense_rank
+ ------------
+ 6
+ (1 row)
+ ```
+
+- percent\_rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the percentage of the relative position of the assumed rows identified by the parameters of the function with respect to a given sorting criterion. The calculation formula is (rank -1)/(totals -1).
+
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: float
+
+ Example
+
+ The percentage of the input value in the position of the current ranking column sorted by c1
+ ```
+ openGauss=# select percent_rank(4) within group (order by c1) from aggregates_hypothetical;
+ percent_rank
+ -------------------
+ 0.461538461538462
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select percent_rank(3,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ percent_rank
+ -------------------
+ 0.230769230769231
+ (1 row)
+ ```
diff --git a/content/docs-lite/en/docs/SQLReference/alter-table.md b/content/docs-lite/en/docs/SQLReference/alter-table.md
index 80fd0c89207c285ac513e95a4915c800ab5444a7..28e05d05113d837d211773da15938d80e47ae9e8 100644
--- a/content/docs-lite/en/docs/SQLReference/alter-table.md
+++ b/content/docs-lite/en/docs/SQLReference/alter-table.md
@@ -228,6 +228,7 @@
```
[ CONSTRAINT constraint_name ]
{ UNIQUE | PRIMARY KEY } USING INDEX index_name
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT 'text' ]
@@ -487,6 +488,13 @@
- **SET NULL**: sets the referenced field to **NULL**.
- **SET DEFAULT**: sets referenced fields to their default values.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE**
Sets whether the constraint can be deferrable.
diff --git a/content/docs-lite/en/docs/SQLReference/array-functions-and-operators.md b/content/docs-lite/en/docs/SQLReference/array-functions-and-operators.md
index 8f9906cd7cf709978bafde01d812402a74f3cd94..1156c882de12029afa8c99693d9e6a498278689e 100644
--- a/content/docs-lite/en/docs/SQLReference/array-functions-and-operators.md
+++ b/content/docs-lite/en/docs/SQLReference/array-functions-and-operators.md
@@ -501,19 +501,7 @@ Array comparisons compare the array contents element-by-element, using the defau
- array\_extendnull\(anyarray, int\)
- Description: Adds a specified number of null elements to the end of an array.
-
- Return type: anyarray
-
- Example:
-
- ```
- openGauss=# SELECT array_extendnull(ARRAY[1,8,3,7],1) AS RESULT;
- result
- --------------
- {1,8,3,7,null}
- (1 row)
- ```
+ Description: This API has been discarded and is unavailable currently.
- array\_trim\(anyarray, int\)
diff --git a/content/docs-lite/en/docs/SQLReference/assignment-statements.md b/content/docs-lite/en/docs/SQLReference/assignment-statements.md
index cd204df358b81a2cf04d216ab8b39be310873654..5b8f4c7e200af0f1dc181151a61576df9076f77d 100644
--- a/content/docs-lite/en/docs/SQLReference/assignment-statements.md
+++ b/content/docs-lite/en/docs/SQLReference/assignment-statements.md
@@ -56,6 +56,27 @@ END;
>- In INTO mode, values can be assigned only to the columns at the first layer. Two-dimensional or above arrays are not supported.
>- When a nested column value is referenced, if an array subscript exists, only one parenthesis can exist in the first three layers of columns. You are advised to use square brackets to reference the subscript.
+## Assignment Of Variables With Type Names
+In addition to the above, openGauss supports assignment methods with type names (including RECORD, VARRAY, TABLE OF types and types created by CREATE TYPE). For compatibility with historical versions, such type names are usually ignored and treated as normal arrays or records. Only when enable_pltype_name_check switch is turned on will throw an error if the type name is different.
+
+## Examples
+
+```
+set enable_pltype_name_check = on; -- Turn on the type name detection switch (default is off)
+
+DECLARE
+ TYPE t_rec IS RECORD (val1 VARCHAR2(10), val2 VARCHAR2(10));
+ TYPE t_rec2 IS RECORD (val1 VARCHAR2(10), val2 VARCHAR2(10));
+ l_rec t_rec;
+BEGIN
+ l_rec := t_rec2('ONE', 'TWO'); -- Assignment of variables with type names
+ raise info 'l_rec is %', NVL(l_rec.val1,'NULL');
+END;
+/
+
+ERROR: "t_rec2" cannot be used to assign "l_rec"
+```
+
## INTO/BULK COLLECT INTO
**INTO** and **BULK COLLECT INTO** store values returned by statements in a stored procedure to variables. **BULK COLLECT INTO** allows some or all returned values to be temporarily stored in an array.
diff --git a/content/docs-lite/en/docs/SQLReference/character-types.md b/content/docs-lite/en/docs/SQLReference/character-types.md
index fb1a3454be94bbd8f25fafed4ef07c7701bff07f..5e740e3a522d1ad8470e6173009d5803e64f86ad 100644
--- a/content/docs-lite/en/docs/SQLReference/character-types.md
+++ b/content/docs-lite/en/docs/SQLReference/character-types.md
@@ -13,26 +13,26 @@
-
CHAR(n [BYTE|CHAR])
-
CHARACTER(n [BYTE|CHAR])
-
NCHAR(n [BYTE|CHAR])
+
CHAR(n)
+
CHARACTER(n)
+
NCHAR(n)
-
Fixed-length character string, blank padded. n indicates the string length. If it is not specified, the default precision 1 is used. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Fixed-length character string, blank padded. n indicates the string length. If it is not specified, the default precision 1 is used.
The maximum size is 10 MB.
-
VARCHAR(n [BYTE|CHAR])
-
CHARACTER VARYING(n [BYTE|CHAR])
+
VARCHAR(n)
+
CHARACTER VARYING(n)
-
Variable-length string. In PostgreSQL-compatible mode, n indicates the string length. In other compatibility modes, n indicates the byte length. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Variable-length string. In PostgreSQL-compatible mode, n indicates the string length. In other compatibility modes, n indicates the byte length.
The maximum size is 10 MB.
-
VARCHAR2(n [BYTE|CHAR])
+
VARCHAR2(n)
-
Variable-length string. It is the alias of the VARCHAR(n) type. n indicates the string length. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Variable-length string. It is the alias of the VARCHAR(n) type. n indicates the string length.
The maximum size is 10 MB.
diff --git a/content/docs-lite/en/docs/SQLReference/create-index.md b/content/docs-lite/en/docs/SQLReference/create-index.md
index 00ac86e18281e974b1e9ae4167ce49839c61f35d..63a68500fb4d354f6c7ab894137fbfd4f1057773 100644
--- a/content/docs-lite/en/docs/SQLReference/create-index.md
+++ b/content/docs-lite/en/docs/SQLReference/create-index.md
@@ -256,13 +256,13 @@ The partitioned table does not support partial index creation.
- **COMPRESSTYPE**
- Sets the index compression algorithm. The value **1** indicates the PGLZ algorithm, and the value **2** indicates the ZSTD algorithm. By default, indexes are not compressed. \(Only B-tree indexes are supported.\)
+ Sets the index compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, indexes are not compressed. \(Only B-tree indexes are supported.\)
- Value range: 0 to 2. The default value is **0**.
+ Value range: 0 to 4. The default value is **0**.
- **COMPRESS\_LEVEL**
- Sets the index compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2**. A higher compression level indicates a better index compression effect and a slower index access speed. \(Only B-tree indexes are supported.\)
+ Sets the index compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better index compression effect and a slower index access speed. \(Only B-tree indexes are supported.\)
Value range: –31 to 31. The default value is **0**.
diff --git a/content/docs-lite/en/docs/SQLReference/create-synonym.md b/content/docs-lite/en/docs/SQLReference/create-synonym.md
index 608dd9872bbe891c41701bed37759c287a816f4d..2871b8658d3907ab99e53ac3df95d8431e6eed0f 100644
--- a/content/docs-lite/en/docs/SQLReference/create-synonym.md
+++ b/content/docs-lite/en/docs/SQLReference/create-synonym.md
@@ -15,16 +15,24 @@
- After an original object is deleted, the synonym associated with the object will not be deleted in cascading mode. If you continue to access the synonym, an error message is displayed, indicating that the synonym has expired.
- Users granted the CREATE ANY SYNONYM permission can create synonyms in user schemas.
- Users granted the CREATE ANY SYNONYM permission can create synonyms in user schemas.
+- When creating a synonym, if **PUBLIC** is specified, the schema name of synonym cannot be specified.
## Syntax
```
-CREATE [ OR REPLACE ] SYNONYM synonym_name
+CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM synonym_name
FOR object_name;
```
## Parameter Description
+- **OR REPLACE**
+ - If the synonym already exists, the existing synonym is replaced.
+ - If the synonym does not exist, a new synonym is created.
+
+- **PUBLIC**
+ - Specifies that the synonym is a public synonym. If you do not specify PUBLIC, the synonym is a private synonym.
+
- **synonym**
Specifies the name of the synonym to be created, which can contain the schema name.
@@ -97,11 +105,19 @@ openGauss=# CREATE OR REPLACE SYNONYM register FOR ot.register;
-- Use synonym register to invoke the stored procedure.
openGauss=# CALL register(3,'mia');
+-- Public synonym
+-- Create a public synonym.
+openGauss=# CREATE PUBLIC SYNONYM t1 FOR ot.t1;
+
+-- Use the public synonym.
+openGauss=# SELECT * FROM t1;
+
-- Delete the synonym.
openGauss=# DROP SYNONYM t1;
openGauss=# DROP SYNONYM IF EXISTS v1;
openGauss=# DROP SYNONYM IF EXISTS add;
openGauss=# DROP SYNONYM register;
+openGauss=# DROP PUBLIC SYNONYM t1;
openGauss=# DROP SCHEMA ot CASCADE;
```
diff --git a/content/docs-lite/en/docs/SQLReference/create-table-partition.md b/content/docs-lite/en/docs/SQLReference/create-table-partition.md
index f567640f721679b8431e00e8dbccf002ff423342..e3730c35e13298c0f9c7138fad4c99f3a443e085 100644
--- a/content/docs-lite/en/docs/SQLReference/create-table-partition.md
+++ b/content/docs-lite/en/docs/SQLReference/create-table-partition.md
@@ -77,6 +77,7 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -244,6 +245,47 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
>
>**orientation** cannot be modified.
+ - COMPRESSTYPE
+
+ Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
+
+ - COMPRESS\_LEVEL
+
+ Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better table compression effect and a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: –31 to 31. The default value is **0**.
+
+ - COMPRESS\_CHUNK_SIZE
+
+ Specifies the size of a row-store table compression chunk. A smaller chunk size indicates a better compression effect, and a larger data dispersion degree indicates a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: subject to the page size. When the page size is 8 KB, the value can be **512**, **1024**, **2048**, or **4096**.
+
+ Default value: **4096**
+
+ - COMPRESS_PREALLOC_CHUNKS
+
+ Specifies the number of pre-allocated row-store table compression chunks. A larger number of pre-allocated chunks indicates a lower table compression ratio, and a smaller data dispersion degree indicates a better access performance. (Only common tables in the Astore engine are supported.)
+
+ Value range: 0 to 7. The default value is **0**.
+
+ - The maximum value of this parameter is **7** when **COMPRESS\_CHUNK_SIZE** is set to **512** or **1024**.
+ - The maximum value of this parameter is **3** when **COMPRESS\_CHUNK_SIZE** is set to **2048**.
+ - The maximum value of this parameter is **1** when **COMPRESS\_CHUNK_SIZE** is set to **4096**.
+
+ - COMPRESS_BYTE_CONVERT
+
+ Sets the preprocessing of row-store table compression byte conversion. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
+
+ - COMPRESS_DIFF_CONVERT
+
+ Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
- STORAGE\_TYPE
@@ -469,6 +511,13 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
Only one primary key can be specified for a table.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
Controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/docs-lite/en/docs/SQLReference/create-table.md b/content/docs-lite/en/docs/SQLReference/create-table.md
index 1769e4062547cb2c323bdcd2b403dad366e2aa58..90e0a21735b73b689f2689cb003fc7f62040fc2f 100644
--- a/content/docs-lite/en/docs/SQLReference/create-table.md
+++ b/content/docs-lite/en/docs/SQLReference/create-table.md
@@ -51,6 +51,7 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -294,45 +295,45 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
- COMPRESSTYPE
- Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, and the value **2** indicates the ZSTD algorithm. By default, indexes are not compressed. (Only common tables in the Astore engine are supported.)
+ Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, indexes are not compressed. (Only common tables in the Astore engine are supported.)
- Value range: 0 to 2. The default value is **0**.
+ Value range: 0 to 4. The default value is **0**.
- COMPRESS\_LEVEL
- Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2**. A higher compression level indicates a better table compression effect and a slower table access speed. (Only common tables in the Astore engine are supported.)
+ Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better table compression effect and a slower table access speed. (Only common tables in the Astore engine are supported.)
- Value range: –31 to 31. The default value is **0**.
+ Value range: –31 to 31. The default value is **0**.
- COMPRESS\_CHUNK_SIZE
- Specifies the size of a row-store table compression chunk. A smaller chunk size indicates a better compression effect, and a larger data dispersion degree indicates a slower table access speed. (Only common tables in the Astore engine are supported.)
+ Specifies the size of a row-store table compression chunk. A smaller chunk size indicates a better compression effect, and a larger data dispersion degree indicates a slower table access speed. (Only common tables in the Astore engine are supported.)
- Value range: subject to the page size. When the page size is 8 KB, the value can be **512**, **1024**, **2048**, or **4096**.
+ Value range: subject to the page size. When the page size is 8 KB, the value can be **512**, **1024**, **2048**, or **4096**.
- Default value: **4096**
+ Default value: **4096**
- COMPRESS_PREALLOC_CHUNKS
- Specifies the number of pre-allocated row-store table compression chunks. A larger number of pre-allocated chunks indicates a lower table compression ratio, and a smaller data dispersion degree indicates a better access performance. (Only common tables in the Astore engine are supported.)
+ Specifies the number of pre-allocated row-store table compression chunks. A larger number of pre-allocated chunks indicates a lower table compression ratio, and a smaller data dispersion degree indicates a better access performance. (Only common tables in the Astore engine are supported.)
- Value range: 0 to 7. The default value is **0**.
+ Value range: 0 to 7. The default value is **0**.
- - The maximum value of this parameter is **7** when **COMPRESS\_CHUNK_SIZE** is set to **512** or **1024**.
- - The maximum value of this parameter is **3** when **COMPRESS\_CHUNK_SIZE** is set to **2048**.
- - The maximum value of this parameter is **1** when **COMPRESS\_CHUNK_SIZE** is set to **4096**.
+ - The maximum value of this parameter is **7** when **COMPRESS\_CHUNK_SIZE** is set to **512** or **1024**.
+ - The maximum value of this parameter is **3** when **COMPRESS\_CHUNK_SIZE** is set to **2048**.
+ - The maximum value of this parameter is **1** when **COMPRESS\_CHUNK_SIZE** is set to **4096**.
- COMPRESS_BYTE_CONVERT
- Sets the preprocessing of row-store table compression byte conversion. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+ Sets the preprocessing of row-store table compression byte conversion. In some scenarios, the compression effect can be improved, but the performance deteriorates.
- Value range: Boolean value. By default, this function is disabled.
+ Value range: Boolean value. By default, this function is disabled.
- COMPRESS_DIFF_CONVERT
- Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+ Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
- Value range: Boolean value. By default, this function is disabled.
+ Value range: Boolean value. By default, this function is disabled.
- MAX\_BATCHROW
@@ -493,6 +494,13 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
- **SET NULL**: sets the referencing column\(s\) to **NULL**.
- **SET DEFAULT**: sets the referencing column\(s\) to their default values.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
Controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/docs-lite/en/docs/SQLReference/create-view.md b/content/docs-lite/en/docs/SQLReference/create-view.md
index a87fc22d5354be73c6df98a6f04a1d160cb6cb8d..cf4552fdb2ae3072f1f26e5159bb5e74c690bffd 100644
--- a/content/docs-lite/en/docs/SQLReference/create-view.md
+++ b/content/docs-lite/en/docs/SQLReference/create-view.md
@@ -81,6 +81,23 @@ CREATE [ OR REPLACE ] [ TEMP | TEMPORARY ] VIEW view_name [ ( column_name [, ...
## Automatically Updatable View
+Simple views are automatically updatable. When executing UPDATE statements on a view, the view is automatically updatable if it meets the following conditions:
+
+* The view can contain serveral entries in its FROM list, but they must be tables, subqueries or views.
+* The view definition must not contain WITH, DISTINCT, GROUP BY, HAVING, LIMIT, or OFFSET clauses at the top level.
+* The view definition must not contain set operations (UNION, INTERSECT or EXCEPT) at the top level.
+* The view's target list must not contain any aggregates, window functions or set-returning functions.
+* If the targets of the UPDATE statement are columns of a subquery or a subview of the view at the top level, then the subquery or the subview must also meet the conditions mentioned above.
+
+When executing DELETE statements, aside from conditions mentioned above, the view must also meets the following conditions:
+
+* All subqueries and subviews of the view meets the auto-updatable conditions.
+* No entries in the FROM list should be joined by cross join or full join. Besides, except for the tables joined by left join or right join, at most only one of the other tables can be without a unique key.
+
+When executing INSERT statements or when defining the view with a WITH CHECK OPTION, the view must also meets the following conditions:
+
+* The view must have exactly one entry in its FROM list, which must be a table or another automatically updatable view (a subquery is not allowed here).
+
Simple views are automatically updatable. The system allows INSERT, UPDATE, and DELETE statements to be executed on these views. A view is automatically updatable if it meets the following conditions:
* The view must have exactly one entry in its FROM list, which must be a table or another automatically updatable view.
@@ -110,6 +127,28 @@ openGauss=# SELECT * FROM myView ;
--Delete the myView view.
openGauss=# DROP VIEW myView;
+
+-- Create a view with more than one entry in it's FROM list
+openGauss=# CREATE TABLE dept(deptno INT NOT NULL, dname VARCHAR(14), loc VARCHAR(13), CONSTRAINT pk_dept PRIMARY KEY(deptno));
+openGauss=# INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK');
+openGauss=# CREATE TABLE emp (empno int NOT NULL PRIMARY KEY, ename VARCHAR(10), job VARCHAR(9), deptno int,
+openGauss-# CONSTRAINT fk_deptno FOREIGN KEY(deptno) REFERENCES dept(deptno));
+openGauss=# INSERT INTO emp VALUES (7782,'CLARK','MANAGER',10);
+openGauss=# INSERT INTO emp VALUES (7934,'MILLER','CLERK',10);
+openGauss=# CREATE VIEW multv1 AS SELECT emp.empno, emp.ename, emp.job, dept.* FROM dept, emp
+openGauss-# WHERE dept.deptno = emp.deptno;
+
+-- Update/Delete from the view with multiple FROM list entries
+openGauss=# UPDATE multv1 SET ENAME='ABCD', JOB='SALESMAN' WHERE EMPNO=7934;
+openGauss=# DELETE FROM multv1 WHERE EMPNO=7934;
+
+-- Failed to update/delete from a view whose target base table is not a table, a view, nor a subquery
+openGauss=# CREATE VIEW multv2 AS SELECT * FROM emp JOIN UPPER('foo') AS f ON true;
+openGauss=# UPDATE multv2 SET f = 'a';
+openGauss=# DELETE FROM multv2;
+
+-- Failed to delete from a view whose base tables are cross/full joined with each other
+openGauss=# CREATE VIEW multv3 AS SELECT emp.empno, emp.ename, emp.job, dept.* FROM dept CROSS JOIN emp;
```
## Helpful Links
diff --git a/content/docs-lite/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md b/content/docs-lite/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
index 17bdfd7c6a6dc9a6f646d29ca7ae20e6de0c7986..a98b454dcb91a618f063f321cea4df77a754fe3e 100644
--- a/content/docs-lite/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
+++ b/content/docs-lite/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
@@ -697,6 +697,30 @@
```
+- new_time(date, timezone1,timezone2)
+
+ Description: Returns the date and time in timezone2 when date and time in timezone1 are date
+
+ Parameter Type: timestamp without time zone, text, text
+
+ Return type: timestamp without time zone
+
+ Example:
+
+ ```
+ openGauss=# select new_time('2024-07-22 14:00:00', 'EST', 'PST');
+ new_time
+ ---------------------
+ 2024-07-22 11:00:00
+ (1 row)
+ ```
+
+ >  **NOTE:**
+ >
+ > 1.This function is valid only when openGauss is compatible with dbcompatibility = 'A'.
+ >
+ > 2.The first parameter date can not be timestamp with time zone.
+
- next\_day\(x,y\)
Description: Calculates the time of the next week y started from x.
diff --git a/content/docs-lite/en/docs/SQLReference/drop-procedure.md b/content/docs-lite/en/docs/SQLReference/drop-procedure.md
index 0024e33ce53c9a80a65e0481d2156257e525fe39..db6c60185fe2e04b2d0296edf8ff48a9455f71c2 100644
--- a/content/docs-lite/en/docs/SQLReference/drop-procedure.md
+++ b/content/docs-lite/en/docs/SQLReference/drop-procedure.md
@@ -11,7 +11,8 @@ None
## Syntax
```
-DROP PROCEDURE [ IF EXISTS ] procedure_name ;
+DROP PROCEDURE [ IF EXISTS ] procedure_name
+[ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];
```
## Parameter Description
diff --git a/content/docs-lite/en/docs/SQLReference/drop-synonym.md b/content/docs-lite/en/docs/SQLReference/drop-synonym.md
index 240d77624dc90b216d81cb075aab396ced15f0a6..798dc82559aeea5d2b0db372c5963616ea64ded4 100644
--- a/content/docs-lite/en/docs/SQLReference/drop-synonym.md
+++ b/content/docs-lite/en/docs/SQLReference/drop-synonym.md
@@ -11,11 +11,15 @@ The owner of SYNONYM or a user granted with the DROP ANY SEQUENCE permission can
## Syntax
```
-DROP SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
+DROP [ PUBLIC ] SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
```
## Parameter Description
+- **PUBLIC**
+
+ Deletes a public synonym. If you do not specify PUBLIC, a private synonym is deleted.
+
- **IF EXISTS**
Reports a notice instead of an error if the specified synonym does not exist.
diff --git a/content/docs-lite/en/docs/SQLReference/grant.md b/content/docs-lite/en/docs/SQLReference/grant.md
index e5183384790d509b1af9e9b26288fc95600f758d..7440c888330b66c2e16c18ad736e69c52450b0a0 100644
--- a/content/docs-lite/en/docs/SQLReference/grant.md
+++ b/content/docs-lite/en/docs/SQLReference/grant.md
@@ -38,7 +38,7 @@
Grant ANY permissions to a specified role or user. For details about the value range of the ANY permissions, see the syntax. If **WITH ADMIN OPTION** is specified, the grantee can grant the ANY permissions to or revoke them from other roles or users. The ANY permissions can be inherited by a role but cannot be granted to **PUBLIC**. An initial user and the system administrator when separation of duties is disabled can grant the ANY permissions to or revoke them from any role or user.
- Currently, the following ANY permissions are supported: CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE ANY FUNCTION, EXECUTE ANY FUNCTION, CREATE ANY PACKAGE, EXECUTE ANY PACKAGE, CREATE ANY TYPE, ALTER ANY TYPE, DROP ANY TYPE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, SELECT ANY SEQUENCE, ALTER ANY INDEX, DROP ANY INDEX, CREATE ANY SYNONYM, DROP ANY SYNONYM, CREATE ANY TRIGGER, ALTER ANY TRIGGER, and DROP ANY TRIGGER. For details about the ANY permission scope, see [Table 1](#table1360121832117).
+ Currently, the following ANY permissions are supported: CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE ANY FUNCTION, EXECUTE ANY FUNCTION, CREATE ANY PACKAGE, EXECUTE ANY PACKAGE, CREATE ANY TYPE, ALTER ANY TYPE, DROP ANY TYPE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, SELECT ANY SEQUENCE, ALTER ANY INDEX, DROP ANY INDEX, CREATE ANY SYNONYM, DROP ANY SYNONYM, CREATE PUBLIC SYNONYM, DROP PUBLIC SYNONYM, CREATE ANY TRIGGER, ALTER ANY TRIGGER, and DROP ANY TRIGGER. For details about the ANY permission scope, see [Table 1](#table1360121832117).
## Precautions
@@ -47,7 +47,7 @@
- The ANY permissions are database permissions and are valid only for database objects that are granted with the permissions. For example, **SELECT ANY TABLE** only allows a user to view all user table data in the current database, but the user does not have the permission to view user tables in other databases.
- Even if a user is granted with the ANY permissions, the user cannot perform INSERT, DELETE, UPDATE, and SELECT operations on the objects of private users.
- The ANY permissions and the original permissions do not affect each other.
-- If a user is granted with the CREATE ANY TABLE permission, the owner of a table created in a schema with the same name as the user is the owner of the schema. When the user performs other operations on the table, the user needs to be granted with the corresponding operation permission. Similarly, if a user is granted with the CREATE ANY FUNCTION, CREATE ANY PACKAGE, CREATE ANY TYPE, CREATE ANY SEQUENCE, or CREATE ANY INDEX permission, the owner of an object created in a schema with the same name is the owner of the schema. If a user is granted with the CREATE ANY TRIGGER or CREATE ANY SYNONYM permission, the owner of an object created in a schema with the same name is the creator.
+- If a user is granted with the CREATE ANY TABLE permission, the owner of a table created in a schema with the same name as the user is the owner of the schema. When the user performs other operations on the table, the user needs to be granted with the corresponding operation permission. Similarly, if a user is granted with the CREATE ANY FUNCTION, CREATE ANY PACKAGE, CREATE ANY TYPE, CREATE ANY SEQUENCE, or CREATE ANY INDEX permission, the owner of an object created in a schema with the same name is the owner of the schema. If a user is granted with the CREATE ANY TRIGGER or CREATE ANY SYNONYM permission, the owner of an object created in a schema with the same name is the creator. If a user is granted with the CREATE PUBLIC SYNONYM or DROP PUBLIC SYNONYM permission, the user can create or drop a public synonym.
## Syntax
@@ -281,7 +281,7 @@
GRANT { CREATE ANY TABLE | ALTER ANY TABLE | DROP ANY TABLE | SELECT ANY TABLE | INSERT ANY TABLE | UPDATE ANY TABLE |
DELETE ANY TABLE | CREATE ANY SEQUENCE | CREATE ANY INDEX | CREATE ANY FUNCTION | EXECUTE ANY FUNCTION |
CREATE ANY PACKAGE | EXECUTE ANY PACKAGE | CREATE ANY TYPE | ALTER ANY TYPE | DROP ANY TYPE | ALTER ANY SEQUENCE | DROP ANY SEQUENCE |
- SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
+ SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE PUBLIC SYNONYM | DROP PUBLIC SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
} [, ...]
TO [ GROUP ] role_name [, ...]
[ WITH ADMIN OPTION ];
@@ -621,6 +621,16 @@ When a non-owner of an object attempts to GRANT permissions on the object:
Users have the DROP permission on synonyms in public and user schemas.
+
CREATE PUBLIC SYNONYM
+
+
Users have the CREATE permission on public synonyms.
+
+
+
DROP PUBLIC SYNONYM
+
+
Users have the DROP permission on public synonyms.
+
+
diff --git a/content/docs-lite/en/docs/SQLReference/internal-functions.md b/content/docs-lite/en/docs/SQLReference/internal-functions.md
index bf59d3bc04560d12180bd6933624b9ba8bf58858..45591c630f0ed228a86915b28b2d78f5ec69b5d4 100644
--- a/content/docs-lite/en/docs/SQLReference/internal-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/internal-functions.md
@@ -894,36 +894,6 @@ The following functions of openGauss use internal data types, which cannot be di
-
-
bpcharc
-
-
bpcharcin
-
-
bpcharcout
-
-
bpcharcrecv
-
-
bpcharcsend
-
-
bpcharctypmodein
-
-
bpcharctypmodout
-
-
-
varcharc
-
-
varcharcin
-
-
varcharcout
-
-
varcharcrecv
-
-
varcharcsend
-
-
varcharctypmodin
-
-
varcharctypmodout
-
-
diff --git a/content/docs-lite/en/docs/SQLReference/json-jsonb-functions-and-operators.md b/content/docs-lite/en/docs/SQLReference/json-jsonb-functions-and-operators.md
index 5e1723d3abdc3948863515ff4a83ba650e40e1bd..39829ef4004ab794c0c0279345e6ebabeddcc197 100644
--- a/content/docs-lite/en/docs/SQLReference/json-jsonb-functions-and-operators.md
+++ b/content/docs-lite/en/docs/SQLReference/json-jsonb-functions-and-operators.md
@@ -991,6 +991,87 @@ For details about the JSON/JSONB data type, see [JSON/JSONB Types](json-jsonb-t
(1 row)
```
+ - json_exists\(text, text \[ \{TRUE | FALSE | ERROR\} ON ERROR \]\)
+
+ Description: Determine whether a JSON value exists under a certain JSON path in a JSON data, returning true if it does, and false otherwise. Specify ON ERORR clause to change json_exists' behaviour when $1 is not a well-formed JSON data text. Under such circumstances, json_exists returns false by default and when FALSE ON ERROR is specified, returns true when TRUE ON ERROR is specified, and report error when ERROR ON ERROR is specified.
+
+ Return type:bool
+
+ Attention:
+
+ - $2 must conform with json path expression's grammar, and it cannot be NULL, otherwise an error will be reported.
+ - Of all json path expression grammars, only extracting json values by array indexes or object field names are supported by now.
+
+ For example:
+
+ ```
+ openGauss=# select json_exists('[{"first":"John"}, {"middle":"Mark"}, {"last":"Smith"}]', '$[0, 1].first');
+ json_exists
+ -------------
+ t
+ (1 row)
+
+ openGauss=# select json_exists('[{"first":"John"}, {"middle":"Mark"}, {"last":"Smith"}]', '$[3 to 5].*');
+ json_exists
+ -------------
+ f
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[*].first' FALSE ON ERROR);
+ json_exists
+ -------------
+ f
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[0].first' TRUE ON ERROR);
+ json_exists
+ -------------
+ t
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[0].first' ERROR ON ERROR);
+ ERROR: the input is not a well-formed json data
+ CONTEXT: referenced column: json_exists
+ ```
+
+- json_textcontains\(json text, path text, target cstring\)
+
+ Description: Determine whether some specified values are contained under centain JSON path in a JSON data, which are seperated by commas. The function returns true if at least one of them is contained, and false otherwise. json_textcontains returns false when $1 is not a well-formed JSON data.
+
+ - json: the JSON data text.
+ - path: the JSON path expression text
+ - target: the values needed to be tested for containing.
+
+ Return type:bool
+
+ Attention:
+
+ - $2 must conform with json path expression's grammar, and it cannot be NULL, otherwise an error will be reported.
+ - Of all json path expression grammars, only extracting json values by array indexes or object field names are supported by now.
+ - The match for containing is not case-sensitive。
+
+ 示例:
+
+ ```
+ openGauss=# SELECT JSON_TEXTCONTAINS('{"family" : {"id":12, "ages":[25,23], "address" : {"street" : "300 Oak Street", "apt" : 10}}}', '$.family', 'oak, 10');
+ json_textcontains
+ -------------------
+ t
+ (1 row)
+
+ openGauss=# SELECT JSON_TEXTCONTAINS('{"family" : {"id":12, "ages":[25,23], "address" : {"street" : "300 Oak Street", "apt" : 10}}}', '$.family', '12 25 23 300 OAK');
+ json_textcontains
+ -------------------
+ t
+ (1 row)
+
+ openGauss=# SELECT JSON_TEXTCONTAINS('This is not well-formed JSON data', '$.family', 'data');
+ json_textcontains
+ -------------------
+ f
+ (1 row)
+ ```
+
- Other functions
Description: Internal functions used by GIN indexes and JSON\\JSONB aggregate functions.
diff --git a/content/docs-lite/en/docs/SQLReference/keywords.md b/content/docs-lite/en/docs/SQLReference/keywords.md
index 3ac18fbbb62f93e106c06d64eba95366c6e73af3..160053db38e5e5580e4c0466b2c0a163cd6c40d8 100644
--- a/content/docs-lite/en/docs/SQLReference/keywords.md
+++ b/content/docs-lite/en/docs/SQLReference/keywords.md
@@ -610,15 +610,6 @@ The naming rules for identifiers are as follows:
Reserved
-
BYTE
-
-
Non-reserved
-
-
N/A
-
-
N/A
-
-
BYTEAWITHOUTORDER
Non-reserved (excluding functions and types)
@@ -3238,6 +3229,15 @@ The naming rules for identifiers are as follows:
Reserved
+
JSON_EXISTS
+
+
Non-reserved (excluding functions and types)
+
+
N/A
+
+
N/A
+
+
K
N/A
diff --git a/content/docs-lite/en/docs/SQLReference/mathematical-functions-and-operators.md b/content/docs-lite/en/docs/SQLReference/mathematical-functions-and-operators.md
index 97035ea51407b5a5d54efe420f90c9cc59850ed0..1e097dc62b633093b20594fe9bada7b0254364a1 100644
--- a/content/docs-lite/en/docs/SQLReference/mathematical-functions-and-operators.md
+++ b/content/docs-lite/en/docs/SQLReference/mathematical-functions-and-operators.md
@@ -154,6 +154,8 @@
Description: Factorial
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -168,6 +170,8 @@
Description: Factorial \(prefix operator\)
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -344,6 +348,22 @@
1.10714871779409
(1 row)
```
+
+- bin_to_num\(VARIADIC number[]\)
+
+ Description: Converts a bit vector to its equivalent number. Each argument to this function represents a bit in the bit vector. Each expr must evaluate to 0 or 1.
+
+ Return type: number
+
+ Example:
+
+ ```
+ openGauss=# SELECT bin_to_num(1, 0, 1);
+ bin_to_num
+ ---------------
+ 5
+ (1 row)
+ ```
- bitand\(integer, integer\)
diff --git a/content/docs-lite/en/docs/SQLReference/obsolete-functions.md b/content/docs-lite/en/docs/SQLReference/obsolete-functions.md
index 9b925843f9a0cfa8280661d729f40e6731c78300..9e86dcfce2bb61fb6db78dae2db68fcb11320b74 100644
--- a/content/docs-lite/en/docs/SQLReference/obsolete-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/obsolete-functions.md
@@ -78,19 +78,84 @@ The following functions in openGauss have been discarded in the latest version:
pg_pool_validate
+
gs_stat_ustore
table_skewness(text)
table_skewness(text, text, text)
-
-
+
pg_stat_get_wlm_realtime_operator_info
+
+
pg_stat_get_wlm_realtime_ec_operator_info
+
+
pg_stat_get_wlm_ec_operator_info
+
+
gs_stat_get_wlm_plan_operator_info
+
+
+
+
pg_stat_get_wlm_operator_info
+
+
gs_wlm_get_resource_pool_info(int)
+
+
gs_wlm_get_all_user_resource_info
+
+
create_wlm_operator_info
+
+
create_wlm_session_info
+
+
gs_wlm_get_workload_records
+
+
gs_wlm_persistent_user_resource_info
+
+
+
+
gs_wlm_session_respool
+
+
gs_total_nodegroup_memory_detail
+
+
gs_wlm_user_resource_info(name text)
+
+
create_wlm_instance_statistics_info
+
+
pg_stat_get_session_wlmstat
+
+
pg_stat_get_wlm_ec_operator_info
+
+
pg_stat_get_wlm_instance_info
+
+
+
+
pg_stat_get_wlm_instance_info_with_cleanup
+
+
pg_stat_get_wlm_statistics
+
+
pg_stat_get_wlm_realtime_session_info
+
+
gs_upload_obs_file
+
+
gs_download_obs_file
+
+
gs_set_obs_file_context
+
+
gs_get_hadr_key_cn
+
+
+
+
gs_hadr_do_switchover
+
+
track_memory_context(context_list text)
+
+
track_memory_context_detail
+
+
pgxc_unlock_for_sp_database
-
-
+
local_segment_space_info
-
-
+
pg_stat_segment_extent_usage
-
-
+
GS_ALL_NODEGROUP_CONTROL_GROUP_INFO
diff --git a/content/docs-lite/en/docs/SQLReference/other-functions.md b/content/docs-lite/en/docs/SQLReference/other-functions.md
index 52c1a69ce0d1b94aad8dbfe1d06fe8122987c8e8..34838f0481d60a79e87d2a9319b6d6871856f33a 100644
--- a/content/docs-lite/en/docs/SQLReference/other-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/other-functions.md
@@ -641,19 +641,11 @@
- pgxc\_unlock\_for\_sp\_database\(name Name\)
- Description: Releases a specified database lock.
-
- Parameter: database name
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- pgxc\_lock\_for\_sp\_database\(name Name\)
- Description: Locks a specified database.
-
- Parameter: database name
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- copy\_error\_log\_create\(\)
diff --git a/content/docs-lite/en/docs/SQLReference/other-system-functions.md b/content/docs-lite/en/docs/SQLReference/other-system-functions.md
index 8760e771e5543c5e948dbc61a91246dc82425cae..3c553a3f4d3128ec080b71de41bad63b8b908be9 100644
--- a/content/docs-lite/en/docs/SQLReference/other-system-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/other-system-functions.md
@@ -3873,51 +3873,6 @@ The built-in functions and operators of openGauss are inherited from the open-so
-
-
bpcharc_pattern_ge
-
-
bpcharc_pattern_gt
-
-
bpcharc_pattern_le
-
-
bpcharc_pattern_lt
-
-
bpcharceq
-
-
bpcharcge
-
-
bpcharcgt
-
-
-
bpcharciclike
-
-
bpcharcicnlike
-
-
bpcharcicregexeq
-
-
bpcharcicregexne
-
-
bpcharcle
-
-
bpcharclike
-
-
bpcharclt
-
-
-
bpcharcne
-
-
bpcharcnlike
-
-
bpcharccmp
-
-
bpcharcregexeq
-
-
bpcharcregexne
-
-
btbpcharc_pattern_cmp
-
-
hashbpcharc
-
-
diff --git a/content/docs-lite/en/docs/SQLReference/revoke.md b/content/docs-lite/en/docs/SQLReference/revoke.md
index 858c97e5f18d1cc2bcf7be5e5c6a154fc429a0a8..7cfc08cb58a3c255f96188351a0382dfb665cade 100644
--- a/content/docs-lite/en/docs/SQLReference/revoke.md
+++ b/content/docs-lite/en/docs/SQLReference/revoke.md
@@ -243,7 +243,8 @@ If a non-owner user of an object attempts to **REVOKE** permission on the obje
{ CREATE ANY TABLE | ALTER ANY TABLE | DROP ANY TABLE | SELECT ANY TABLE | INSERT ANY TABLE | UPDATE ANY TABLE |
DELETE ANY TABLE | CREATE ANY SEQUENCE | CREATE ANY INDEX | CREATE ANY FUNCTION | EXECUTE ANY FUNCTION |
CREATE ANY PACKAGE | EXECUTE ANY PACKAGE | CREATE ANY TYPE | ALTER ANY TYPE | DROP ANY TYPE | ALTER ANY SEQUENCE | DROP ANY SEQUENCE |
- SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
+ SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE PUBLIC SYNONYM | DROP PUBLIC SYNONYM |
+ CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
} [, ...]
FROM [ GROUP ] role_name [, ...];
```
diff --git a/content/docs-lite/en/docs/SQLReference/security-functions.md b/content/docs-lite/en/docs/SQLReference/security-functions.md
index 36f8cb4375f35096d6922be8c5babd501f3f0f87..5a8e29833b6a6847ae824fce861235795aba2ae0 100644
--- a/content/docs-lite/en/docs/SQLReference/security-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/security-functions.md
@@ -395,6 +395,20 @@
Remote port
+
sha_code
+
+
text
+
+
Sha code
+
+
+
verify_result
+
+
boolean
+
+
Verify result
+
+
diff --git a/content/docs-lite/en/docs/SQLReference/segment-page-storage-functions.md b/content/docs-lite/en/docs/SQLReference/segment-page-storage-functions.md
index 2695fd5066eb6b8d6352f4f1ab292e7a7e00fd71..bef441f81f1374ec15b68d7f1086790fe93fbbc7 100644
--- a/content/docs-lite/en/docs/SQLReference/segment-page-storage-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/segment-page-storage-functions.md
@@ -2,121 +2,11 @@
- local\_segment\_space\_info\(tablespacename TEXT, databasename TEXT\)
- Description: Generates usage information about all extent groups in the tablespace.
-
- Return type:
-
-
-
node_name
-
-
Node name
-
-
-
extent_size
-
-
Extent specifications of an extent group. The unit is the number of blocks.
-
-
-
forknum
-
-
Fork number
-
-
-
total_blocks
-
-
Total number of extents in a physical file
-
-
-
meta_data_blocks
-
-
Number of blocks occupied by the metadata managed in a tablespace, including the space header and map page but excluding the segment head
-
-
-
used_data_blocks
-
-
Number of extents used for storing data, including the segment head
-
-
-
utilization
-
-
Percentage of the number of used blocks to the total number of blocks, that is, (the value of used_data_blocks + the value of meta_data_block)/the value of total_blocks
-
-
-
high_water_mark
-
-
High-water mark, indicating the number of allocated extents and maximum physical page number. Blocks that exceed the high-water mark are not used and can be directly recycled.
-
-
-
-
-
- Example:
-
- ```
- select * from local_segment_space_info('pg_default', 'postgres');
- node_name | extent_size | forknum | total_blocks | meta_data_blocks | used_data_blocks | utilization | high_water_mark
- -------------------+-------------+---------+--------------+------------------+------------------+-------------+-----------------
- dn_6001_6002_6003 | 1 | 0 | 16384 | 4157 | 1 | .253784 | 4158
- dn_6001_6002_6003 | 8 | 0 | 16384 | 4157 | 8 | .254211 | 4165
- (2 rows)
- ```
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_segment\_extent\_usage\(int4 tablespace oid, int4 database oid, int4 extent\_type, int4 forknum\)
- Description: Specifies the usage information of each allocated extent in an extent group returned each time. **extent\_type** indicates the type of the extent group. The value is an integer ranging from 1 to 5. If the value is not within the range, an error is reported. **forknum** indicates the fork number. The value is an integer ranging from 0 to 4. Currently, only the following values are valid: **0** for data files, **1** for FSM files, and **2** for visibility map files.
-
- Return type:
-
-
-
Name
-
-
Description
-
-
-
-
start_block
-
-
Start physical page number of an extent
-
-
-
extent_size
-
-
Size of an extent
-
-
-
usage_type
-
-
Usage type of an extent, for example, segment head and data extent
-
-
-
ower_location
-
-
Object location of an extent to which a pointer points. For example, the owner of a data extent is the head of the segment to which the data extent belongs.
-
-
-
special_data
-
-
Position of an extent in its owner. The value of this field is related to the usage type. For example, special data of a data extent is the extent ID in the segment to which the data extent belongs.
-
-
-
-
-
- The value of **usage\_type** is enumerated. The meaning of each value is as follows:
-
- - **Non-bucket table segment head**: data segment head of a non-hash bucket table
- - **Non-bucket table fork head**: fork segment header of a non-segment-page table
- - **Data extent**: data block
-
- Example:
-
- ```
- select * from pg_stat_segment_extent_usage((select oid::int4 from pg_tablespace where spcname='pg_default'), (select oid::int4 from pg_database where datname='postgres'), 1, 0);
- start_block | extent_size | usage_type | ower_location | special_data
- -------------+-------------+------------------------+---------------+--------------
- 4157 | 1 | Data extent | 4294967295 | 0
- 4158 | 1 | Data extent | 4157 | 0
- ```
+ Description: This API has been discarded and is unavailable currently.
- local\_space\_shrink\(tablespacename TEXT, databasename TEXT\)
diff --git a/content/docs-lite/en/docs/SQLReference/select-into.md b/content/docs-lite/en/docs/SQLReference/select-into.md
index 8122a6d9f7c85373eb671e59d2dd48c35e15993b..a53fb99bc41aafbba3bc1adc8341e8976434fe34 100644
--- a/content/docs-lite/en/docs/SQLReference/select-into.md
+++ b/content/docs-lite/en/docs/SQLReference/select-into.md
@@ -37,7 +37,7 @@ SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT |WAIT N]} [...] ];
```
@@ -59,7 +59,7 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { [offset,] count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[into_option]
[ {FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF table_name [, ...] ] [ NOWAIT | WAIT N ]} [...] ];
[into_option]
diff --git a/content/docs-lite/en/docs/SQLReference/select.md b/content/docs-lite/en/docs/SQLReference/select.md
index c77433d07bac8035568ff846505108096120a1ca..5c44134c879f5fff0d7819c55463032e1f1440aa 100644
--- a/content/docs-lite/en/docs/SQLReference/select.md
+++ b/content/docs-lite/en/docs/SQLReference/select.md
@@ -31,7 +31,7 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { [offset,] count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
-[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+[ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF table_name [, ...] ] [ NOWAIT | WAIT N ]} [...] ];
```
@@ -447,9 +447,9 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
**start** specifies the number of rows to skip before starting to return rows.
-- **FETCH \{ FIRST | NEXT \} \[ count \] \{ ROW | ROWS \} ONLY**
+- **FETCH \{ FIRST | NEXT \} \[ count \] \[ PERCENT \] \{ ROW | ROWS \} \{ ONLY | WITH TIES \} **
- If **count** is omitted in a **FETCH** clause, it defaults to **1**.
+ The **FETCH** clause restricts the total number of rows starting from the first row of the return query result, and the default value of **count** is **1**. The **PERCENT** keyword can be used to specify the number of rows returned as a percentage of the query result. The **ONLY** keyword indicates that only the specified number of rows are returned, and the **WITH TIES** keyword indicates that the specified number of rows are returned and all rows with the same values as the last row in the result set are returned in order.
- **Locking clause**
@@ -682,4 +682,40 @@ openGauss=# SELECT * FROM tpcds.time_table TIMECAPSULE CSN 107330;
2 | 2021-04-25 17:50:10.886848 | 107324 | time2
3 | 2021-04-25 17:50:16.12921 | 107327 | time3
(3 rows)
+
+-- FETCH usage example
+openGauss=# CREATE TABLE employees(employee_id int, department_id int, last_name varchar(50));
+
+-- Insert 20 records
+openGauss=# INSERT INTO employees VALUES (1, 1, 'zhangsan1'), (2, 1, 'zhangsan2'), (3, 1, 'zhangsan3'), (4, 1, 'zhangsan4'), (5, 2, 'lisi1'), (6, 2, 'lisi2'), (7, 2, 'lisi3'), (8, 2, 'lisi4'), (9, 3, 'wangwu1'), (10, 3, 'wangwu2'), (11, 3, 'wangwu3'), (12, 3, 'wangwu4'), (13, 4, 'heliu1'), (14, 4, 'heliu2'), (15, 4, 'heliu3'), (16, 4, 'heliu4'), (17, 5, 'chenqi1'), (18, 5, 'chenqi2'), (19, 5, 'chenqi3'), (20, 5, 'chenqi4');
+
+-- FETCH ... ROWS ONLY:Get the first 3 records
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 3 ROWS ONLY;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 1 | 1 | zhangsan1
+(3 rows)
+
+-- ORDER BY ... FETCH ... ROWS WITH TIES: Get the first 3 records and all records with the same value as the last record
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 3 ROWS WITH TIES;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 1 | 1 | zhangsan1
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 4 | 1 | zhangsan4
+(4 rows)
+
+-- FETCH ... PERCENT ROWS ONLY: Get the first 25% of the records
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 25 PERCENT ROWS ONLY;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 1 | 1 | zhangsan1
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 4 | 1 | zhangsan4
+ 5 | 2 | lisi1
+(5 rows)
```
diff --git a/content/docs-lite/en/docs/SQLReference/statistics-information-functions.md b/content/docs-lite/en/docs/SQLReference/statistics-information-functions.md
index e67c0197dcdcf9397374e60d3e20a314320dfa6a..9d6d4fe095dac9732a2d4e5c88c8250fb1de7269 100644
--- a/content/docs-lite/en/docs/SQLReference/statistics-information-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/statistics-information-functions.md
@@ -1848,7 +1848,7 @@ Statistics information functions are divided into the following two categories:
> **NOTE:**
>This function involves distributed nodes. Currently, openGauss is a centralized database, for which the function of the value **global** is the same as that of the value **local** and the second parameter cannot set to be **BY\_CNID**.
-- get\_instr\_wait\_event\(NULL\)
+- get\_instr\_wait\_event\(NULL\) 或 get\_instr\_wait\_event\(integer\)
Description: Obtains the statistics on wait events of the current node.
@@ -1931,15 +1931,11 @@ Statistics information functions are divided into the following two categories:
- create\_wlm\_session\_info\(int flag\)
- Description: Clears top SQL query statement-level statistics recorded in the current memory. Only the administrator can execute this function.
-
- Return type: int
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_session\_info\(int flag\)
- Description: Obtains top SQL query statement-level statistics recorded in the current memory. If the input parameter is not 0, the information is cleared from the memory. Only users with the **system admin** or **monitor admin** permission can execute this function.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_paxos\_stat\_replication\(\)
@@ -2077,15 +2073,11 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_get\_resource\_pool\_info\(int\)
- Description: Obtains resource usage statistics of all users. The input parameter can be any value of the INT type or be null.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_all\_user\_resource\_info\(\)
- Description: Obtains resource usage statistics of all users.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_user\_info\(int\)
@@ -2093,11 +2085,78 @@ Statistics information functions are divided into the following two categories:
Return type: record
-- gs\_wlm\_get\_workload\_records\(\)
+ The following table describes return columns.
+
+
+
Column
+
+
Type
+
+
Description
+
+
+
userid
+
+
oid
+
+
OID of the user
+
+
+
sysadmin
+
+
boolean
+
+
Whether the user has the sysadmin permission
+
+
+
rpoid
+
+
oid
+
+
OID of the resource pool
+
+
+
parentid
+
+
oid
+
+
OID of the parent user
+
+
+
totalspace
+
+
bigint
+
+
Size of the occupied space
+
+
+
spacelimit
+
+
bigint
+
+
Upper limit of the space size
+
+
+
childcount
+
+
integer
+
+
Number of child users
+
+
+
childlist
+
+
text
+
+
Child user list
+
+
+
+
- Description: Obtains all job information in dynamic load management. This function is valid only when dynamic load management is enabled.
+- gs\_wlm\_get\_workload\_records\(\)
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_readjust\_user\_space\(\)
@@ -2119,9 +2178,7 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_session\_respool\(bigint\)
- Description: Obtains the session resource pool information about all backend threads. The input parameter can be any value of the bigint type or can be null.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_session\_info\(\)
@@ -2554,15 +2611,11 @@ Statistics information functions are divided into the following two categories:
- DBE\_PERF.track\_memory\_context\(context\_list text\)
- Description: Sets the memory context whose memory application details need to be collected. The input parameter is the memory context names, which are separated by commas \(,\), for example, **ThreadTopMemoryContext, SessionCacheMemoryContext**. Note that the memory context names are context-sensitive. In addition, the length of a single memory context is 63, and the excess part is truncated. The maximum number of memory contexts that can be collected at a time is 16. If the number of memory contexts exceeds 16, the setting fails. Each time this function is called, the previous statistics result is cleared. When the input parameter is set to **""**, the statistics function is disabled. Only the initial user \(super user\) or a user with the **monadmin **permission can execute this function.
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- DBE\_PERF.track\_memory\_context\_detail\(\)
- Description: Obtains the memory application details of the memory context specified by the **DBE\_PERF.track\_memory\_context** function. For details, see the **DBE\_PERF.track\_memory\_context\_detail** view. Only the initial user \(super user\) or a user with the **monadmin **permission can execute this function.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_mem\_mbytes\_reserved\(tid\)
@@ -2574,9 +2627,7 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_user\_resource\_info\(name text\)
- Description: Queries a user's resource quota and resource usage.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_file\_stat\(\)
@@ -2750,17 +2801,11 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_user\_resource\_info\(name text\)
- Description: Queries a user's resource quota and resource usage. Common users can query only their own information. Administrators can query information about all users.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- create\_wlm\_instance\_statistics\_info
- Description: Saves the historical monitoring data of the current instance persistently.
-
- Parameter: **nan**
-
- Return type: integer
+ Description: This API has been discarded and is unavailable currently.
- gs\_session\_memory
@@ -2815,25 +2860,15 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_persistent\_user\_resource\_info\(\)
- Description: Archives all user resource usage statistics to the **gs\_wlm\_user\_resource\_history** system catalog. To query this function, you must have the **sysadmin** permission.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- create\_wlm\_operator\_info\(int flag\)
- Description: Clears top SQL operator-level statistics recorded in the current memory. If the input parameter is greater than 0, the information is archived to **gs\_wlm\_operator\_info** and **gs\_wlm\_ec\_operator\_info**. Otherwise, the information is not archived. Only users with the **sysadmin** permission can execute this function.
-
- Return type: int
+ Description: This API has been discarded and is unavailable currently.
- GS\_ALL\_NODEGROUP\_CONTROL\_GROUP\_INFO\(text\)
- Description: Provides Cgroup information for all logical database instances. Before calling this function, you need to specify the name of the logical database instance to be queried. For example, to query the Cgroup information for the installation logical database instance, run the following command:
-
- ```
- SELECT * FROM GS_ALL_NODEGROUP_CONTROL_GROUP_INFO('installation')
- ```
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
The following table describes return columns.
@@ -2921,9 +2956,7 @@ Statistics information functions are divided into the following two categories:
- gs\_total\_nodegroup\_memory\_detail
- Description: Returns information about the memory used by the current logical database, in MB.
-
- Return type: SETOF record
+ Description: This API has been discarded and is unavailable currently.
- local\_redo\_time\_count\(\)
diff --git a/content/docs-lite/en/docs/SQLReference/stored-procedure.md b/content/docs-lite/en/docs/SQLReference/stored-procedure.md
index f7215a1b730ed8bf6dc596f4fa925bf632d9db1c..5b007dbe935e9bde6d0ad1b7ec0dad92f3a219de 100644
--- a/content/docs-lite/en/docs/SQLReference/stored-procedure.md
+++ b/content/docs-lite/en/docs/SQLReference/stored-procedure.md
@@ -22,6 +22,8 @@
- **[Cursors](cursors.md)**
+- **[Subtype](subtype.md)**
+
- **[Retry Management](retry-management.md)**
- **[Debugging](debugging.md)**
diff --git a/content/docs-lite/en/docs/SQLReference/subtype.md b/content/docs-lite/en/docs/SQLReference/subtype.md
new file mode 100644
index 0000000000000000000000000000000000000000..743b01bdcc8e37bc95b444e024bfea8ee4f425a1
--- /dev/null
+++ b/content/docs-lite/en/docs/SQLReference/subtype.md
@@ -0,0 +1,47 @@
+# SUBTYPE
+
+## Brief
+OpenGauss supprt subtype in PLSQL. Subtype allow user to build subtype from exists type, and use subtype as exits type. There are Uncontrained Subtype amd Contrained Subtype in OpenGauss.
+- Uncontrained Subtype: An unconstrained subtype has the same set of values as its base type, so it is only another name for the base type.
+ - Unconstrained subtypes of the same base type are interchangeable with each other and with the base type. No data type conversion occurs.
+- Contrained Subtype: A constrained subtype has only a subset of the values of its base type.
+ - A constrained subtype can be implicitly converted to its base type, but the base type can be implicitly converted to the constrained subtype only if the value does not violate a constraint of the subtype.
+ - A constrained subtype can be implicitly converted to another constrained subtype with the same base type only if the source value does not violate a constraint of the target subtype.
+
+## Syntax
+### Uncontrained Subtype
+```
+ SUBTYPE subtype_name IS base_type
+```
+- subtype_name: name of created subtype
+- base_type: base type of created subtype
+
+### Contrained Subtype
+```
+ SUBTYPE subtype_name IS base_type [precision [, scale ] [ NOT NULL ] ]
+```
+- subtype_name: name of created subtype
+- base_type: base type of created subtype
+- If the base type lets you specify size, precision and scale, then you can specify them for its subtypes
+
+
+## Examples
+```
+-- Uncontrained Subtype
+DECLARE
+ SUBTYPE Balance IS NUMBER;
+ a Balance(6,2); --NUMBER(6,2)
+ b Balance; --NUMBER
+BEGIN
+ a := 1000.1234;
+ b := 100000.1234;
+END;
+
+-- Contrained Subtype
+DECLARE
+ SUBTYPE Balance is NUMBER(15,2);
+ a Balance;
+BEGIN
+ a := 1000.1234;
+END;
+```
diff --git a/content/docs-lite/en/docs/SQLReference/system-information-functions.md b/content/docs-lite/en/docs/SQLReference/system-information-functions.md
index 5907364f700ecaa997f1df961c2dcdcf0ab120fe..8b154320e0456753d5b67c1b18fd06162f78b9a7 100644
--- a/content/docs-lite/en/docs/SQLReference/system-information-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/system-information-functions.md
@@ -2031,75 +2031,39 @@ The following functions provide server transaction information in an exportable
- pg\_stat\_get\_wlm\_realtime\_operator\_info
- Description: Obtains the operator information of the real-time execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, pid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, status text, query\_dop integer, estimated\_rows bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, warning text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_realtime\_ec\_operator\_info
- Description: Obtains the operator information of the EC execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, ec\_operator integer, ec\_status text, ec\_execute\_datanode text, ec\_dsn text, ec\_username text, ec\_query text, ec\_libodbc\_type text, ec\_fetch\_count bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_operator\_info
- Description: Obtains the operator information of the execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, pid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, query\_dop integer, estimated\_rows bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, warning text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_node\_resource\_info
- Description: Obtains the resource information of the current node.
-
- Parameter: nan
-
- Return type: min\_mem\_util integer, max\_mem\_util integer, min\_cpu\_util integer, max\_cpu\_util integer, min\_io\_util integer, max\_io\_util integer, used\_mem\_rate integer
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_session\_wlmstat
- Description: Returns the load information of the current session.
-
- Parameter: pid integer
-
- Return type: datid oid, threadid bigint, sessionid bigint, threadpid integer, usesysid oid, appname text, query text, priority bigint, block\_time bigint, elapsed\_time bigint, total\_cpu\_time bigint, skew\_percent integer, statement\_mem integer, active\_points integer, dop\_value integer, current\_cgroup text, current\_status text, enqueue\_state text, attribute text, is\_plana boolean, node\_group text, srespool name
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_ec\_operator\_info
- Description: Obtains the operator information of the EC execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, ec\_operator integer, ec\_status text, ec\_execute\_datanode text, ec\_dsn text, ec\_username text, ec\_query text, ec\_libodbc\_type text, ec\_fetch\_count bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_instance\_info
- Description: Returns the load information of the current instance.
-
- Parameter: nan
-
- Return type: instancename text, timestamp, timestamp with time zone, used\_cpu integer, free\_memory integer, used\_memory integer, io\_await double precision, io\_util double precision, disk\_read double precision, disk\_write double precision, process\_read bigint, process\_write bigint, logical\_read bigint, logical\_write bigint, read\_counts bigint, write\_counts bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_instance\_info\_with\_cleanup
- Description: Returns the load information of the current instance and saves the information to the system catalog.
-
- Parameter: nan
-
- Return type: instancename text, timestamp, timestamp with time zone, used\_cpu integer, free\_memory integer, used\_memory integer, io\_await double precision, io\_util double precision, disk\_read double precision, disk\_write double precision, process\_read bigint, process\_write bigint, logical\_read bigint, logical\_write bigint, read\_counts bigint, write\_counts bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_realtime\_session\_info
- Description: Returns the load information of the real-time session.
-
- Parameter: nan
-
- Return type: nodename text, threadid bigint, block\_time bigint, duration bigint, estimate\_total\_time bigint, estimate\_left\_time bigint, schemaname text, query\_band text, spill\_info text, control\_group text, estimate\_memory integer, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_dn\_time bigint, max\_dn\_time bigint, average\_dn\_time bigint, dntime\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, min\_peak\_iops integer, max\_peak\_iops integer, average\_peak\_iops integer, iops\_skew\_percent integer, warning text, query text, query\_plan text, cpu\_top1\_node\_name text, cpu\_top2\_node\_name text, cpu\_top3\_node\_name text, cpu\_top4\_node\_name text, cpu\_top5\_node\_name text, mem\_top1\_node\_name text, mem\_top2\_node\_name text, mem\_top3\_node\_name text, mem\_top4\_node\_name text, mem\_top5\_node\_name text, cpu\_top1\_value bigint, cpu\_top2\_value bigint, cpu\_top3\_value bigint, cpu\_top4\_value bigint, cpu\_top5\_value bigint, mem\_top1\_value bigint, mem\_top2\_value bigint, mem\_top3\_value bigint, mem\_top4\_value bigint, mem\_top5\_value bigint, top\_mem\_dn text, top\_cpu\_dn text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_session\_iostat\_info
@@ -2111,8 +2075,5 @@ The following functions provide server transaction information in an exportable
- pg\_stat\_get\_wlm\_statistics
- Description: Returns session load statistics.
-
- Parameter: nan
+ Description: This API has been discarded and is unavailable currently.
- Return type: statement text, block\_time bigint, elapsed\_time bigint, total\_cpu\_time bigint, qualification\_time bigint, skew\_percent integer, control\_group text, status text, action text
diff --git a/content/docs-lite/en/docs/SQLReference/timecapsule-table.md b/content/docs-lite/en/docs/SQLReference/timecapsule-table.md
index 7d196f261412944aa97e95e619832157e42d7b96..b5d0b3fed559737c355daf75bd6d37096e714f01 100644
--- a/content/docs-lite/en/docs/SQLReference/timecapsule-table.md
+++ b/content/docs-lite/en/docs/SQLReference/timecapsule-table.md
@@ -68,7 +68,7 @@ TIMECAPSULE TABLE [schema.]table_name TO { CSN expr | TIMESTAMP expr | BEFORE {
- When a dropped table is restored, only the base table name is restored, and the names of other subobjects remain the same as those in the recycle bin. You can run the DDL command to manually change the names of subobjects as required.
- The recycle bin does not support write operations such as DML, DCL, and DDL, and does not support DQL query operations \(supported in later versions\).
- - The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+ - The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired objects cannot be used to do flashback operations.
- **RENAME TO**
diff --git a/content/docs-lite/en/docs/SQLReference/type-conversion-functions.md b/content/docs-lite/en/docs/SQLReference/type-conversion-functions.md
index 32240d5911263bb599be370af0a0d49a250ad019..291262f3f20f06b8abbf1e1643b8fbdcd6c7cdfa 100644
--- a/content/docs-lite/en/docs/SQLReference/type-conversion-functions.md
+++ b/content/docs-lite/en/docs/SQLReference/type-conversion-functions.md
@@ -118,6 +118,7 @@
- The optional parameter **fmt** allows for the following types: date, time, week, quarter, and century. Each type has a unique template. The templates can be combined together. Common templates include HH, MI, SS, YYYY, MM, and DD.
- A template may have a modification word. FM is a common modification word and is used to suppress the preceding zero or the following blank spaces.
+ - **Only on dbcompatibility = 'A'**, When the input is interval, the **fmt** will be ignored. If the interval only includes year and month, the output format will be SYYYY-MM. When the year is less than two digits, it will be padded with a leading zero. If the interval only includes day and time, the output format will be SDD HH:MI:SS. If the interval contains both, an error code will be returned.
Return type: text
@@ -139,6 +140,24 @@
(1 row)
```
+- to\_char\(datetime/interval, fmt, nls_language={american|english}\)
+
+ Description: Similar to to\_char\(datetime/interval \[, fmt\]\), an additional parameter **nls_language**. The possible values for **nls_language** are **american** and **english**.
+
+ - Templates like MON in fmt will be converted to the corresponding language expression based on nls_language.
+
+ Return type: text
+
+ Example:
+
+ ```
+ openGauss=# SELECT to_char(DATE '2024-08-05', 'DY, DD-MON-YYYY', 'NLS_DATE_LANGUAGE = ENGLISH') ;
+ to_char
+ ----------
+ MON, 05-AUG-2024
+ (1 row)
+ ```
+
- to\_char\(double precision/real, text\)
Description: Converts the values of the floating point type into the strings in the specified format.
@@ -203,6 +222,8 @@
Description: Converts the values of the time interval type into the strings in the specified format.
+ - **Only on dbcompatibility = 'A'**, When the input is interval, the **fmt** will be ignored. If the interval only includes year and month, the output format will be SYYYY-MM. When the year is less than two digits, it will be padded with a leading zero. If the interval only includes day and time, the output format will be SDD HH:MI:SS. If the interval contains both, an error code will be returned.
+
Return type: text
Example:
@@ -215,6 +236,21 @@
(1 row)
```
+ ```
+ openGauss=# SELECT to_char(INTERVAL '123-2' YEAR(4) TO MONTH, 'YYY-MON');
+ to_char
+ ---------
+ +123-02
+ (1 row)
+ ```
+
+ ```
+ openGauss=# SELECT to_char(INTERVAL '1 year 2 months 3 days', 'YYYY-MON-DD') ;
+ ERROR: Interval simultaneously includes 'year to month' and 'day to second' is not supported in A format
+ DETAIL: Not support the given interval data.
+ CONTEXT: referenced column: to_char
+ ```
+
- to\_char\(int, text\)
Description: Converts the values of the integer type into the strings in the specified format.
@@ -298,6 +334,75 @@
(1 row)
```
+- to\_char\(blob, \[CSID\]\)
+
+ Description: **Only on dbcompatibility = 'A'** support the function,convert blob type data to text by specified **CSID**.
+
+ - **CSID** type is int,denote A format character ID.
+ - CSID equal to 0 or without CSID, use database's encoding.
+
+ CSID map to encoding name
+
+ | CSID | encoding name | openGuass name |
+ | ------ | ---------------- | ---------------------- |
+ | 1 | US7ASCII | SQL_ASCII |
+ | 837 | JA16EUCTILDE | EUC_JP |
+ | 850 | ZHS16CGB231280 | EUC_CN |
+ | 846 | KO16MSWIN949 | EUC_KR |
+ | 862 | ZHT16DBT | EUC_TW |
+ | 830 | JA16EUC | EUC_JIS_2004 |
+ | 852 | ZHS16GBK | GBK |
+ | 873 | AL32UTF8 | UTF8 |
+ | 31 | WE8ISO8859P1 | LATIN1 |
+ | 32 | EE8ISO8859P2 | LATIN2 |
+ | 33 | SE8ISO8859P3 | LATIN3 |
+ | 34 | NEE8ISO8859P4 | LATIN4 |
+ | 39 | WE8ISO8859P9 | LATIN5 |
+ | 40 | NE8ISO8859P10 | LATIN6 |
+ | 47 | BLT8ISO8859P13 | LATIN7 |
+ | 48 | CEL8ISO8859P14 | LATIN8 |
+ | 46 | WE8ISO8859P15 | LATIN9 |
+ | 560 | AR8MSWIN1256 | WIN1256 |
+ | 45 | VN8MSWIN1258 | WIN1258 |
+ | 41 | TH8TISASCII | WIN874 |
+ | 196 | CL8KOI8R | KOI8R |
+ | 171 | CL8MSWIN1251 | WIN1251 |
+ | 178 | WE8MSWIN1252 | WIN1252 |
+ | 35 | CL8ISO8859P5 | ISO_8859_5 |
+ | 36 | AR8ISO8859P6 | ISO_8859_6 |
+ | 37 | EL8ISO8859P7 | ISO_8859_7 |
+ | 38 | IW8ISO8859P8 | ISO_8859_8 |
+ | 170 | EE8MSWIN1250 | WIN1250 |
+ | 173 | BG8MSWIN | WIN1253 |
+ | 177 | TR8MSWIN1254 | WIN1254 |
+ | 175 | IW8MSWIN1255 | WIN1255 |
+ | 179 | BLT8MSWIN1257 | WIN1257 |
+ | 51 | CL8KOI8U | KOI8U |
+ | 854 | ZHS32GB18030 | GB18030 |
+ | 832 | JA16SJIS | SJIS |
+ | 865 | ZHT16BIG5 | BIG5 |
+
+ Return type: text
+
+ Example:
+
+ ```
+ CREATE TABLE blob_table (c1 BLOB);
+ INSERT INTO blob_table (c1) VALUES ( (encode('Hello World!','hex'))::RAW );
+ SELECT to_char(c1, 873) FROM blob_table ;
+ to_char
+ --------------
+ Hello World!
+ (1 row)
+
+ SELECT to_char(c1) FROM blob_table ;
+ to_char
+ --------------
+ Hello World!
+ (1 row)
+
+ ```
+
- to\_clob\(char/nchar/varchar/varchar2/nvarchar/nvarchar2/text/raw\)
Description: Converts the raw type or text character set type CHAR, NCHAR, VARCHAR, VARCHAR2, NVARCHAR, NVARCHAR2, or TEXT to the CLOB type.
@@ -397,17 +502,23 @@
(1 row)
```
-- to\_number \( expr \[, fmt\]\)
+- to\_number ( expr \[ DEFAULT return_value ON CONVERSION ERROR ] [, fmt])
- Description: Converts **expr** into a value of the NUMBER type according to the specified format.
+ Description: Converts expr to a NUMERIC type value according to the specified format. If the expr conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt).
+
+ * Type Conversion Formats (fmt): Please refer to [Table 1](#en-us_topic_0283137417_en-us_topic_0237121973_en-us_topic_0059778246_t3987a5bb00154b0f9e55863b4ababd3d).
+
+ * The length of the integer part in fmt must be greater than the length of the integer part in expr. If it is less, an error will be thrown. The length of the fractional part in fmt can be filled as needed, and the result will be truncated according to the length of the fractional part in fmt.
- For details about the type conversion formats, see [Table 1](#en-us_topic_0283137417_en-us_topic_0237121973_en-us_topic_0059778246_t3987a5bb00154b0f9e55863b4ababd3d).
+ * Both expr and the return_value after DEFAULT support implicit conversion. (Note: NULL plus any value equals NULL.)
- If a hexadecimal string is converted into a decimal number, the hexadecimal string can include a maximum of 16 bytes if it is to be converted into a sign-free number.
+ * Scientific notation is supported.
- During the conversion from a hexadecimal string to a decimal digit, the format string cannot have a character other than x or X. Otherwise, an error is reported.
+ * When converting a hexadecimal string to a decimal number, the function supports up to 16 bytes of hexadecimal string to be converted into an unsigned number.
- Return type: number
+ * When converting a hexadecimal string to a decimal number, the format string should not contain any characters other than 'x' or 'X', otherwise, an error will be thrown.
+
+ Return type: numeric
Example:
@@ -418,22 +529,41 @@
-12454.8
(1 row)
```
-
-- to\_number\(text, text\)
-
- Description: Converts the values of the string type into the numbers in the specified format.
-
- Return type: numeric
-
- Example:
-
```
- openGauss=# SELECT to_number('12,454.8-', '99G999D9S');
- to_number
+ openGauss=# SELECT to_number('1234.123','999999.99');
+ to_number
-----------
- -12454.8
+ 1234.12
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111','999999.99');
+ to_number
+ -----------
+ 112222.11
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('1e5'+'1111','999999.99');
+ to_number
+ -----------
+ 101111
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111'+NULL,'999999. 99');
+ to_number
+ -----------
(1 row)
```
+ ```
+ openGauss=# SELECT to_number('此参数错误' default 321456231 on conversion error ,'999,999,999,999.99');
+ to_number
+ -----------
+ 321456231
+ (1 row)
+ ```
+
- to\_timestamp\(double precision\)
@@ -451,18 +581,16 @@
(1 row)
```
-- to\_timestamp\(string \[,fmt\]\)
-
- Description: Converts a string into a value of the timestamp type according to the format specified by **fmt**. When **fmt** is not specified, perform the conversion according to the format specified by **nls\_timestamp\_format**.
-
- In **to\_timestamp** in openGauss,
-
- - If the input year *YYYY* is 0, an error will be reported.
- - If the input year *YYYY* is less than 0, specify *SYYYY* in **fmt**. The year with the value of n \(an absolute value\) BC will be output correctly.
+- to\_timestamp(string [ DEFAULT return_value ON CONVERSION ERROR ] \[ , fmt [, 'nlsparam' ] ]\)
- Characters in the **fmt** must match the schema for formatting the data and time. Otherwise, an error is reported.
+ Description: Converts a string to a timestamp. The default input format is [DD-Mon-YYYY HH12:MI:SS.FF], which is a 12-hour AM format. If the input value string is not in the default format, the user needs to specify their own format in fmt. If the format description is incorrect, an error will be thrown. If part of the string conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt). If Mon is an abbreviation like Jan, the language for the month can be set in nlsparam (currently only supports American and English).
- Return type: timestamp without time zone
+ * If the input year YYYY=0, the system will throw an error.
+ * If the input year YYYY<0, and SYYYY is specified in fmt, it will correctly output the absolute value of the year BC.
+ * Parameters in fmt that are similar to MM cannot mix case.
+ * The delimiters in fmt and the time information in string can be replaced with other symbols. Example: SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+
+ Return type: timestamp with time zone
Example:
@@ -472,54 +600,49 @@
----------------------------
DD-Mon-YYYY HH:MI:SS.FF AM
(1 row)
-
+ ```
+ ```
openGauss=# SELECT to_timestamp('12-sep-2014');
to_timestamp
---------------------
2014-09-12 00:00:00
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('12-Sep-10 14:10:10.123000','DD-Mon-YY HH24:MI:SS.FF');
+ openGauss=# SELECT to_timestamp ('01-Jan-2002 10:10:10. 123000');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('2002-01-01 10:10:10.123000', 'YYYY-MM-DD HH24:MI:SS.FF');
to_timestamp
-------------------------
- 2010-09-12 14:10:10.123
+ 2002-01-01 10:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('-1','SYYYY');
- to_timestamp
- ------------------------
- 0001-01-01 00:00:00 BC
+ openGauss=# SELECT to_timestamp ('此为错误输入' DEFAULT '11-01-11 14:10:10.123000' ON CONVERSION ERROR,'DD-MM-RR HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2011-01-11 14:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('98','RR');
- to_timestamp
- ---------------------
- 1998-01-01 00:00:00
+ openGauss=# SELECT to_timestamp ('01-Jan-03 14:10:10.123000' DEFAULT '11-Jan-11 14:10:10.123000' ON CONVERSION ERROR, 'DD-Mon-RR HH24:MI:SS.FF','NLS_DATE_LANGUAGE = American');
+ to_timestamp
+ -------------------------
+ 2003-01-01 14:10:10.123
(1 row)
```
-
```
- openGauss=# SELECT to_timestamp('01','RR');
- to_timestamp
- ---------------------
- 2001-01-01 00:00:00
+ openGauss=# SELECT to_timestamp('-1','SYYYY');
+ to_timestamp
+ ------------------------
+ 0001-01-01 00:00:00 BC
(1 row)
```
-
-- to\_timestamp\(text, text\)
-
- Description: Converts values of the string type into the timestamp of the specified type.
-
- Return type: timestamp
-
- Example:
-
```
openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
to_timestamp
@@ -527,7 +650,13 @@
2000-12-05 00:00:00
(1 row)
```
-
+ ```
+ openGauss=# SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
+ (1 row)
+ ```
**Table 1** Template patterns for numeric formatting
diff --git a/content/docs-lite/en/docs/SQLReference/variable-definition-statements.md b/content/docs-lite/en/docs/SQLReference/variable-definition-statements.md
index ddcf54503f9504af32bb36a11691972acb2d2c07..5933add7fafaf8695f3add675a4bf3dd080539d0 100644
--- a/content/docs-lite/en/docs/SQLReference/variable-definition-statements.md
+++ b/content/docs-lite/en/docs/SQLReference/variable-definition-statements.md
@@ -74,27 +74,31 @@ ROWTYPE for cursor supports the following features:
Test case:
```
+-- Turn on the precompile switch
set behavior_compat_options='allow_procedure_compile_check';
+-- Creating the table used by the cursor and inserting data
create table int4_table(a NUMBER, b VARCHAR2(5));
-insert into int4_table(a) values(3,'johan');
+insert into int4_table(a, b) values(3,'johan');
create table int_table(a NUMBER, d NUMBER, b VARCHAR2(5));
insert into int_table(a, d, b) values(3, 6,'johan');
+-- Creating package
create or replace package pck1 is
cursor cur1 is select * from int4_table;
-var1 cur1%rowtype:=(3, 'ada');
+var1 cur1%rowtype:=(3, 'ada');-- Use rowtype to get the actual type of the cursor and define a public variable
procedure ppp1;
procedure ppp2(a cur1%rowtype);
end pck1;
/
+-- Creating package body
create or replace package body pck1 is
procedure ppp1() is
cursor cur2 is select * from int_table;
begin
open cur2;
-fetch cur2 into var1;
+fetch cur2 into var1;-- when var1 and cursor cur2 have different query lengths throw error
ppp2(var1);
raise info '%', var1.a;
end;
@@ -106,14 +110,30 @@ end;
end pck1;
/
-call pck1.ppp1();
-ALTER TABLE int_table DROP COLUMN d;
-call pck1.ppp1();
+openGauss=# call pck1.ppp1();-- var1 has 2 columns that do not match the length of the cursor cur2 query result
+ERROR: number of source and target fields in assignment does not match
+DETAIL: strict_multi_assignment check is active.
+HINT: Make sure the query returns the exact list of columns.
+CONTEXT: PL/pgSQL function ppp1() line 4 at FETCH
+
+openGauss=# ALTER TABLE int_table DROP COLUMN d;-- Delete 1 column of the table
+ALTER TABLE
+
+openGauss=# call pck1.ppp1();-- Success
+INFO: 3
+CONTEXT: SQL statement "CALL ppp2(var1)"
+PL/pgSQL function ppp1() line 5 at PERFORM
+INFO: 3
+ ppp1
+------
+
+(1 row)
```
> **NOTICE:**
>- **%TYPE** cannot reference the type of a composite variable or a record variable, a column type of the record type, a column type of a variable of the cross-package composite type, or a column type of a cursor variable of the cross-package type.
>- **%ROWTYPE** cannot reference the type of a composite variable or a record variable and the type of a cross-package cursor.
+>- **%ROWTYPE** cannot reference nested cursors.
## Scope of a Variable
diff --git a/content/docs-lite/en/docs/SQLReference/wlm_user_resource_runtime.md b/content/docs-lite/en/docs/SQLReference/wlm_user_resource_runtime.md
index f54cf420eeed056116750d45ae9c39e2dad30757..987b3440b0d08c1dd1d1c37b18e3d62eef10a7c6 100644
--- a/content/docs-lite/en/docs/SQLReference/wlm_user_resource_runtime.md
+++ b/content/docs-lite/en/docs/SQLReference/wlm_user_resource_runtime.md
@@ -24,7 +24,7 @@
integer
-
Used memory (unit: MB)
+
Used memory(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.) (unit: MB)
total_memory
@@ -38,7 +38,7 @@
integer
-
Number of CPU cores in use
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
total_cpu
diff --git a/content/docs-lite/en/docs/ToolandCommandReference/gs_ctl.md b/content/docs-lite/en/docs/ToolandCommandReference/gs_ctl.md
index e6073a231d423a5be5e7271b09c1c0391e5b121e..ddd5fbfd94e73c4a475b1bd49f9ac8afc71e9888 100644
--- a/content/docs-lite/en/docs/ToolandCommandReference/gs_ctl.md
+++ b/content/docs-lite/en/docs/ToolandCommandReference/gs_ctl.md
@@ -106,6 +106,11 @@ The **gs\_ctl** tool can use the following types of parameters:
Copies Xlogs in the dual-center DR mode based on shared storage.
+
startwalrcv
+
+
Find a valid Xlog tail by preparsing Xlogs and start walreceiver thread for receiving Xlogs.
在 A 兼容模式下,开启此选项后,FLOAT[(p)] 映射至 numeric,二进制精度 p 取值范围为 [1, 126];未开启时取值范围为 [1, 53]。
+
+
disable_record_type_in_dml
+
禁止虚拟列插入配置项。开启此项后禁止在insert语句中使用record类型变量作为插入值。
+
+create table t1(col1 varchar(10),col varchar(10));
+create table t2(col1 varchar(10),col varchar(10));
+set behavior_compat_options='disable_record_type_in_dml';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+ERROR: The record type variable cannot be used as an insertion value.
+CONTEXT: SQL statement "insert into t2 values(source)"
+PL/pgSQL function inline_code_block line 7 at SQL statement
+
+set behavior_compat_options='';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+NOTICE: (one,two)
+NOTICE: (one,two)
+
+
+
+
+
accept_float_str_as_int
+
是否允许float类型的字符串转成整型(int1,int2, int4, int8)类型。
+
+openGauss=# create table t1(c1 int);
+CREATE TABLE
+openGauss=#
+openGauss=# insert into t1 values ('1.5');
+ERROR: invalid input syntax for integer: "1.5"
+LINE 1: insert into t1 values ('1.5');
+ ^
+CONTEXT: referenced column: c1
+openGauss=#
+openGauss=# set behavior_compat_options ='accept_float_str_as_int';
+SET
+openGauss=# insert into t1 values ('1.5');
+INSERT 0 1
+
diff --git a/content/docs-lite/zh/menu/index.md b/content/docs-lite/zh/menu/index.md
index 6798b2b03f374848052a7e2871fbbd7b0ccc445e..5189840a9132e02dc2499111e2e9307ea0ba8cc2 100644
--- a/content/docs-lite/zh/menu/index.md
+++ b/content/docs-lite/zh/menu/index.md
@@ -4,7 +4,6 @@ headless: true
- [法律声明]({{< relref "./docs/ReleaseNotes/法律声明.md" >}})
-
- [发行说明]({{< relref "./docs/ReleaseNotes/Releasenotes.md" >}})
- [用户须知]({{< relref "./docs/ReleaseNotes/用户须知.md" >}})
- [版本介绍]({{< relref "./docs/ReleaseNotes/版本介绍.md" >}})
@@ -16,7 +15,6 @@ headless: true
- [源代码]({{< relref "./docs/ReleaseNotes/源代码.md" >}})
- [参与贡献]({{< relref "./docs/ReleaseNotes/参与贡献.md" >}})
- [致谢]({{< relref "./docs/ReleaseNotes/致谢.md" >}})
-
- [关于openGauss]({{< relref "./docs/AboutopenGauss/关于openGauss.md" >}})
- [产品定位]({{< relref "./docs/TechnicalWhitePaper/产品定位.md" >}})
- [系统架构]({{< relref "./docs/AboutopenGauss/系统架构.md" >}})
@@ -45,6 +43,7 @@ headless: true
- [主备机]({{< relref "./docs/AboutopenGauss/主备机.md" >}})
- [逻辑复制]({{< relref "./docs/AboutopenGauss/逻辑复制.md" >}})
- [逻辑备份]({{< relref "./docs/AboutopenGauss/逻辑备份.md" >}})
+ - [物理备份]({{< relref "./docs/AboutopenGauss/物理备份.md" >}})
- [作业失败自动重试]({{< relref "./docs/AboutopenGauss/作业失败自动重试.md" >}})
- [极致RTO]({{< relref "./docs/AboutopenGauss/极致RTO.md" >}})
- [延时回放]({{< relref "./docs/AboutopenGauss/延时回放.md" >}})
@@ -82,6 +81,7 @@ headless: true
- [全文索引]({{< relref "./docs/AboutopenGauss/全文索引.md" >}})
- [Copy接口支持容错机制]({{< relref "./docs/AboutopenGauss/Copy接口支持容错机制.md" >}})
- [分区]({{< relref "./docs/AboutopenGauss/分区.md" >}})
+ - [DataVec向量引擎]({{< relref "./docs/AboutopenGauss/DataVec向量引擎.md" >}})
- [高级分析函数支持]({{< relref "./docs/AboutopenGauss/高级分析函数支持.md" >}})
- [物化视图]({{< relref "./docs/AboutopenGauss/物化视图.md" >}})
- [支持HyperLogLog]({{< relref "./docs/AboutopenGauss/支持HyperLogLog.md" >}})
@@ -96,12 +96,25 @@ headless: true
- [外键锁增强]({{< relref "./docs/AboutopenGauss/外键锁增强.md" >}})
- [支持OLTP场景数据压缩]({{< relref "./docs/AboutopenGauss/支持OLTP场景数据压缩.md" >}})
- [openEuler系统一键安装openGauss]({{< relref "./docs/AboutopenGauss/openEuler系统一键安装openGauss.md" >}})
+ - [高级包]({{< relref "./docs/AboutopenGauss/高级包.md" >}})
+ - [gms_output高级包]({{< relref "./docs/AboutopenGauss/gms_output工具包.md" >}})
+ - [gms_profiler高级包]({{< relref "./docs/AboutopenGauss/gms_profiler高级包.md" >}})
+ - [gms_stats高级包]({{< relref "./docs/AboutopenGauss/gms_stats高级包.md" >}})
+ - [gms_i18n高级包]({{< relref "./docs/AboutopenGauss/gms_i18n高级包.md" >}})
+ - [gms_sql高级包]({{< relref "./docs/AboutopenGauss/gms_sql高级包.md" >}})
+ - [gms_tcp高级包]({{< relref "./docs/AboutopenGauss/gms_tcp高级包.md" >}})
+ - [gms_compress高级包]({{< relref "./docs/AboutopenGauss/gms_compress高级包.md" >}})
+ - [gms_inaddr高级包]({{< relref "./docs/AboutopenGauss/gms_inaddr高级包.md" >}})
+ - [gms_utility高级包]({{< relref "./docs/AboutopenGauss/gms_utility高级包.md" >}})
+ - [gms_raw高级包]({{< relref "./docs/AboutopenGauss/gms_raw高级包.md" >}})
+ - [gms_match高级包]({{< relref "./docs/AboutopenGauss/gms_match高级包.md" >}})
- [应用开发接口]({{< relref "./docs/AboutopenGauss/应用开发接口.md" >}})
- [支持标准SQL]({{< relref "./docs/AboutopenGauss/支持标准SQL.md" >}})
- [支持标准开发接口]({{< relref "./docs/AboutopenGauss/支持标准开发接口.md" >}})
- [PG接口兼容]({{< relref "./docs/AboutopenGauss/PG接口兼容.md" >}})
- [支持PL/Java]({{< relref "./docs/AboutopenGauss/支持PL-Java.md" >}})
- - [AI能力]({{< relref "./docs/AboutopenGauss/AI能力.md" >}})
+ - [MySQL兼容性增强]({{< relref "./docs/AboutopenGauss/MySQL兼容性增强.md" >}})
+ - [AI能力]({{< relref "./docs/AboutopenGauss/AI能力.md" >}})
- [AI4DB: 数据库自治运维]({{< relref "./docs/AboutopenGauss/AI4DB-数据库自治运维.md" >}})
- [数据库指标采集、预测与异常监控]({{< relref "./docs/AboutopenGauss/数据库指标采集-预测与异常监控.md" >}})
- [慢SQL根因分析]({{< relref "./docs/AboutopenGauss/慢SQL根因分析.md" >}})
@@ -110,7 +123,7 @@ headless: true
- [慢SQL发现]({{< relref "./docs/AboutopenGauss/慢SQL发现.md" >}})
- [DB4AI: 数据库驱动AI]({{< relref "./docs/AboutopenGauss/DB4AI-数据库驱动AI.md" >}})
- [AI in DB: 数据库内AI功能]({{< relref "./docs/AboutopenGauss/AI-in-DB-数据库内AI功能.md" >}})
- - [Predictor: AI查询时间预测]({{< relref "./docs/AboutopenGauss/Predictor-AI查询时间预测.md" >}})
+ - [Predictor: AI查询时间预测]({{< relref "./docs/AboutopenGauss/Predictor-AI查询时间预测.md" >}})
- [工具链]({{< relref "./docs/AboutopenGauss/工具链.md" >}})
- [MySQL-\>openGauss迁移工具chameleon]({{< relref "./docs/AboutopenGauss/MySQL_openGauss迁移工具chameleon.md" >}})
- [openGauss客户端工具DataStudio]({{< relref "./docs/AboutopenGauss/openGauss客户端工具DataStudio.md" >}})
@@ -119,7 +132,6 @@ headless: true
- [使用kubernetes部署分布式数据库]({{< relref "./docs/AboutopenGauss/使用kubernetes部署分布式数据库.md" >}})
- [负载管理]({{< relref "./docs/AboutopenGauss/负载管理.md" >}})
- [支持I层高时延逃生能力]({{< relref "./docs/AboutopenGauss/支持I层高时延逃生能力.md" >}})
-
- [技术白皮书]({{< relref "./docs/TechnicalWhitePaper/TechnicalWhitePaper.md" >}})
- [产品定位]({{< relref "./docs/TechnicalWhitePaper/产品定位.md" >}})
- [应用场景]({{< relref "./docs/TechnicalWhitePaper/应用场景.md" >}})
@@ -130,7 +142,6 @@ headless: true
- [软硬件配置要求]({{< relref "./docs/TechnicalWhitePaper/软硬件配置要求.md" >}})
- [数据库核心技术]({{< relref "./docs/TechnicalWhitePaper/数据库核心技术.md" >}})
- [技术指标]({{< relref "./docs/TechnicalWhitePaper/技术指标.md" >}})
-
- [快速入门]({{< relref "./docs/GettingStarted/GettingStarted.md" >}})
- [了解openGauss]({{< relref "./docs/GettingStarted/了解openGauss.md" >}})
- [安装openGauss]({{< relref "./docs/GettingStarted/安装openGauss.md" >}})
@@ -147,7 +158,6 @@ headless: true
- [Java]({{< relref "./docs/GettingStarted/Java.md" >}})
- [Python]({{< relref "./docs/GettingStarted/Python.md" >}})
- [使用openGauss]({{< relref "./docs/GettingStarted/使用openGauss.md" >}})
-
- [安装指南]({{< relref "./docs/InstallationGuide/Installation.md" >}})
- [安装概述]({{< relref "./docs/InstallationGuide/安装概述.md" >}})
- [安装准备]({{< relref "./docs/InstallationGuide/安装准备.md" >}})
@@ -155,7 +165,6 @@ headless: true
- [准备软硬件安装环境]({{< relref "./docs/InstallationGuide/准备软硬件安装环境.md" >}})
- [安装openGauss]({{< relref "./docs/InstallationGuide/安装openGauss.md" >}})
- [卸载openGauss]({{< relref "./docs/InstallationGuide/卸载openGauss.md" >}})
-
- [简易教程]({{< relref "./docs/BriefTutorial/BriefTutorial.md" >}})
- [基本概念]({{< relref "./docs/BriefTutorial/基本概念.md" >}})
- [语法]({{< relref "./docs/BriefTutorial/语法.md" >}})
@@ -205,8 +214,10 @@ headless: true
- [子查询]({{< relref "./docs/BriefTutorial/子查询.md" >}})
- [权限]({{< relref "./docs/BriefTutorial/权限.md" >}})
- [函数]({{< relref "./docs/BriefTutorial/函数.md" >}})
+ - [高级特性]({{< relref "./docs/BriefTutorial/高级特性.md" >}})
+ - [列存储]({{< relref "./docs/BriefTutorial/列存储.md" >}})
+ - [PQ]({{< relref "./docs/BriefTutorial/PQ.md" >}})
- [附录:SQL语法]({{< relref "./docs/BriefTutorial/附录-SQL语法.md" >}})
-
- [应用开发指南]({{< relref "./docs/DeveloperGuide/应用开发指南.md" >}})
- [数据查询请求处理过程]({{< relref "./docs/DeveloperGuide/数据查询请求处理过程.md" >}})
- [开发设计规范]({{< relref "./docs/DeveloperGuide/开发设计规范.md" >}})
@@ -303,13 +314,11 @@ headless: true
- [示例:常用操作]({{< relref "./docs/DeveloperGuide/示例-常用操作_Psycopg.md" >}})
- [Psycopg接口参考]({{< relref "./docs/DeveloperGuide/Psycopg接口参考.md" >}})
- [编译与调试]({{< relref "./docs/DeveloperGuide/编译与调试.md" >}})
-
- [编译指南]({{< relref "./docs/CompilationGuide/Compilation.md" >}})
- [简介]({{< relref "./docs/CompilationGuide/简介.md" >}})
- [搭建编译环境]({{< relref "./docs/CompilationGuide/搭建编译环境.md" >}})
- [版本编译]({{< relref "./docs/CompilationGuide/版本编译.md" >}})
- [FAQ]({{< relref "./docs/CompilationGuide/FAQ.md" >}})
-
- [数据库管理指南]({{< relref "./docs/DatabaseAdministrationGuide/数据库管理指南.md" >}})
- [数据库基础概念介绍]({{< relref "./docs/DatabaseAdministrationGuide/数据库基础概念介绍.md" >}})
- [创建和管理数据库]({{< relref "./docs/DatabaseAdministrationGuide/创建和管理数据库.md" >}})
@@ -384,9 +393,7 @@ headless: true
- [MOT恢复概念]({{< relref "./docs/DatabaseAdministrationGuide/MOT恢复概念.md" >}})
- [MOT查询原生编译(JIT)]({{< relref "./docs/DatabaseAdministrationGuide/MOT查询原生编译_JIT.md" >}})
- [对比:磁盘与MOT]({{< relref "./docs/DatabaseAdministrationGuide/对比-磁盘与MOT.md" >}})
- - [附录]({{< relref "./docs/DatabaseAdministrationGuide/附录_MOT.md" >}})
- - [参考文献]({{< relref "./docs/DatabaseAdministrationGuide/参考文献.md" >}})
- - [术语表]({{< relref "./docs/DatabaseAdministrationGuide/术语表.md" >}})
+
- [管理数据库安全]({{< relref "./docs/DatabaseAdministrationGuide/管理数据库安全.md" >}})
- [客户端接入认证]({{< relref "./docs/DatabaseAdministrationGuide/客户端接入认证.md" >}})
- [配置客户端接入认证]({{< relref "./docs/DatabaseAdministrationGuide/配置客户端接入认证.md" >}})
@@ -423,10 +430,10 @@ headless: true
- [归档账本数据库]({{< relref "./docs/DatabaseAdministrationGuide/归档账本数据库.md" >}})
- [修复账本数据库]({{< relref "./docs/DatabaseAdministrationGuide/修复账本数据库.md" >}})
- [设置透明数据加密(TDE)]({{< relref "./docs/DatabaseAdministrationGuide/设置透明数据加密_TDE.md" >}})
- - [参数配置]({{< relref "./docs/DatabaseAdministrationGuide/参数配置.md" >}})
- - [查看参数值]({{< relref "./docs/DatabaseAdministrationGuide/查看参数值.md" >}})
- - [参数设置]({{< relref "./docs/DatabaseAdministrationGuide/参数设置.md" >}})
-- [数据库运维指南]({{< relref "./docs/DatabaseOMGuide/DatabaseOMGuide.md" >}})
+ - [参数配置]({{< relref "./docs/DatabaseAdministrationGuide/参数配置.md" >}})
+ - [查看参数]({{< relref "./docs/DatabaseAdministrationGuide/查看参数.md" >}})
+ - [重设参数]({{< relref "./docs/DatabaseAdministrationGuide/重设参数.md" >}})
+ - [数据库运维指南]({{< relref "./docs/DatabaseOMGuide/DatabaseOMGuide.md" >}})
- [启停openGauss]({{< relref "./docs/DatabaseOMGuide/启停openGauss.md" >}})
- [例行维护]({{< relref "./docs/DatabaseOMGuide/例行维护.md" >}})
- [检查时间一致性]({{< relref "./docs/DatabaseOMGuide/检查时间一致性.md" >}})
@@ -525,7 +532,6 @@ headless: true
- [btree 索引故障情况下应对策略]({{< relref "./docs/DatabaseOMGuide/btree-索引故障情况下应对策略.md" >}})
- [高危操作一览表]({{< relref "./docs/DatabaseOMGuide/高危操作一览表.md" >}})
- [日志参考]({{< relref "./docs/DatabaseOMGuide/日志参考.md" >}})
-
- [性能优化指南]({{< relref "./docs/PerformanceTuningGuide/性能优化指南.md" >}})
- [总体调优思路]({{< relref "./docs/PerformanceTuningGuide/总体调优思路.md" >}})
- [确定性能调优范围]({{< relref "./docs/PerformanceTuningGuide/确定性能调优范围.md" >}})
@@ -614,6 +620,7 @@ headless: true
- [案例:改写SQL消除子查询与使用并行查询]({{< relref "./docs/PerformanceTuningGuide/案例-改写SQL消除子查询与使用并行查询.md" >}})
- [案例:改写SQL消除in-clause]({{< relref "./docs/PerformanceTuningGuide/案例-改写SQL消除in-clause.md" >}})
- [案例:修改启动参数解决TPCC大幅度波动]({{< relref "./docs/PerformanceTuningGuide/案例-修改启动参数解决TPCC大幅度波动.md" >}})
+ - [案例:子事务TPCC性能调优]({{< relref "./docs/PerformanceTuningGuide/案例-子事务TPCC性能调优.md" >}})
- [安全加固指南]({{< relref "./docs/SecHarden/secHarden.md" >}})
- [数据库加固概述]({{< relref "./docs/SecHarden/数据库加固概述.md" >}})
- [安全配置规范基线]({{< relref "./docs/SecHarden/安全配置规范基线.md" >}})
@@ -628,7 +635,6 @@ headless: true
- [WAL归档配置]({{< relref "./docs/SecHarden/WAL归档配置.md" >}})
- [运行环境配置]({{< relref "./docs/SecHarden/运行环境配置.md" >}})
- [其它配置]({{< relref "./docs/SecHarden/其它配置.md" >}})
-
- [插件参考]({{< relref "./docs/ExtensionReference/Extension.md" >}})
- [Dolphin Extension]({{< relref "./docs/ExtensionReference/dolphin-Extension.md" >}})
- [Dolphin概述]({{< relref "./docs/ExtensionReference/dolphin概述.md" >}})
@@ -669,7 +675,8 @@ headless: true
- [注释操作符]({{< relref "./docs/ExtensionReference/dolphin-注释操作符.md" >}})
- [操作符优先级]({{< relref "./docs/ExtensionReference/dolphin-操作符优先级.md" >}})
- [表达式]({{< relref "./docs/ExtensionReference/dolphin-表达式.md" >}})
- - [条件表达式]({{< relref "./docs/ExtensionReference/dolphin-表达式.md" >}})
+ - [条件表达式]({{< relref "./docs/ExtensionReference/dolphin-条件表达式.md" >}})
+ - [时间间隔表达式]({{< relref "./docs/ExtensionReference/dolphin-时间间隔表达式.md" >}})
- [DDL语法一览表]({{< relref "./docs/ExtensionReference/dolphin-DDL语法一览表.md" >}})
- [DML语法一览表]({{< relref "./docs/ExtensionReference/dolphin-DML语法一览表.md" >}})
- [DCL语法一览表]({{< relref "./docs/ExtensionReference/dolphin-DCL语法一览表.md" >}})
@@ -719,7 +726,7 @@ headless: true
- [SET CHARSET]({{< relref "./docs/ExtensionReference/dolphin-SET-CHARSET.md" >}})
- [SET PASSWORD]({{< relref "./docs/ExtensionReference/dolphin-SET-PASSWORD.md" >}})
- [SHOW CHARSET]({{< relref "./docs/ExtensionReference/dolphin-SHOW-CHARACTER-SET.md" >}})
- - [SHOW CHARACTER-SET]({{< relref "./docs/ExtensionReference/dolphin-SHOW-CHARACTER-SET.md" >}})
+ - [SHOW CHARACTER SET]({{< relref "./docs/ExtensionReference/dolphin-SHOW-CHARACTER-SET.md" >}})
- [SHOW COLLATION]({{< relref "./docs/ExtensionReference/dolphin-SHOW-COLLATION.md" >}})
- [SHOW COLUMNS]({{< relref "./docs/ExtensionReference/dolphin-SHOW_COLUMNS.md" >}})
- [SHOW CREATE DATABASE]({{< relref "./docs/ExtensionReference/dolphin-SHOW-CREATE-DATABASE.md" >}})
@@ -771,7 +778,79 @@ headless: true
- [赋值语句]({{< relref "./docs/ExtensionReference/dolphin-赋值语句.md" >}})
- [标识符说明]({{< relref "./docs/ExtensionReference/dolphin-标识符说明.md" >}})
- [列名标识符]({{< relref "./docs/ExtensionReference/dolphin-列名标识符.md" >}})
-
+ - [gms_stats Extension]({{< relref "./docs/ExtensionReference/gms_stats-Extension.md" >}})
+ - [gms_stats概述]({{< relref "./docs/ExtensionReference/gms_stats概述.md" >}})
+ - [gms_stats限制]({{< relref "./docs/ExtensionReference/gms_stats限制.md" >}})
+ - [gms_stats安装]({{< relref "./docs/ExtensionReference/gms_stats安装.md" >}})
+ - [gms_stats使用]({{< relref "./docs/ExtensionReference/gms_stats使用.md" >}})
+ - [gms_output Extension]({{< relref "./docs/ExtensionReference/gms_output-Extension.md" >}})
+ - [gms_output概述]({{< relref "./docs/ExtensionReference/gms_output概述.md" >}})
+ - [gms_output限制]({{< relref "./docs/ExtensionReference/gms_output限制.md" >}})
+ - [gms_output安装]({{< relref "./docs/ExtensionReference/gms_output安装.md" >}})
+ - [gms_output使用]({{< relref "./docs/ExtensionReference/gms_output使用.md" >}})
+ - [gms_profiler Extension]({{< relref "./docs/ExtensionReference/gms_profiler-Extension.md" >}})
+ - [gms_profiler概述]({{< relref "./docs/ExtensionReference/gms_profiler概述.md" >}})
+ - [gms_profiler限制]({{< relref "./docs/ExtensionReference/gms_profiler限制.md" >}})
+ - [gms_profiler安装]({{< relref "./docs/ExtensionReference/gms_profiler安装.md" >}})
+ - [gms_profiler使用]({{< relref "./docs/ExtensionReference/gms_profiler使用.md" >}})
+ - [gms_i18n Extension]({{< relref "./docs/ExtensionReference/gms_i18n-Extension.md" >}})
+ - [gms_i18n概述]({{< relref "./docs/ExtensionReference/gms_i18n概述.md" >}})
+ - [gms_i18n限制]({{< relref "./docs/ExtensionReference/gms_i18n限制.md" >}})
+ - [gms_i18n安装]({{< relref "./docs/ExtensionReference/gms_i18n安装.md" >}})
+ - [gms_i18n使用]({{< relref "./docs/ExtensionReference/gms_i18n使用.md" >}})
+ - [gms_sql Extension]({{< relref "./docs/ExtensionReference/gms_sql-Extension.md" >}})
+ - [gms_sql概述]({{< relref "./docs/ExtensionReference/gms_sql概述.md" >}})
+ - [gms_sql限制]({{< relref "./docs/ExtensionReference/gms_sql限制.md" >}})
+ - [gms_sql安装]({{< relref "./docs/ExtensionReference/gms_sql安装.md" >}})
+ - [gms_sql使用]({{< relref "./docs/ExtensionReference/gms_sql使用.md" >}})
+ - [gms_tcp Extension]({{< relref "./docs/ExtensionReference/gms_tcp-Extension.md" >}})
+ - [gms_tcp概述]({{< relref "./docs/ExtensionReference/gms_tcp概述.md" >}})
+ - [gms_tcp限制]({{< relref "./docs/ExtensionReference/gms_tcp限制.md" >}})
+ - [gms_tcp安装]({{< relref "./docs/ExtensionReference/gms_tcp安装.md" >}})
+ - [gms_tcp使用]({{< relref "./docs/ExtensionReference/gms_tcp使用.md" >}})
+ - [gms_compress Extension]({{< relref "./docs/ExtensionReference/gms_compress-Extension.md" >}})
+ - [gms_compress概述]({{< relref "./docs/ExtensionReference/gms_compress概述.md" >}})
+ - [gms_compress限制]({{< relref "./docs/ExtensionReference/gms_compress限制.md" >}})
+ - [gms_compress安装]({{< relref "./docs/ExtensionReference/gms_compress安装.md" >}})
+ - [gms_compress使用]({{< relref "./docs/ExtensionReference/gms_compress使用.md" >}})
+ - [gms_inaddr Extension]({{< relref "./docs/ExtensionReference/gms_inaddr-Extension.md" >}})
+ - [gms_inaddr概述]({{< relref "./docs/ExtensionReference/gms_inaddr概述.md" >}})
+ - [gms_inaddr限制]({{< relref "./docs/ExtensionReference/gms_inaddr限制.md" >}})
+ - [gms_inaddr安装]({{< relref "./docs/ExtensionReference/gms_inaddr安装.md" >}})
+ - [gms_inaddr使用]({{< relref "./docs/ExtensionReference/gms_inaddr使用.md" >}})
+ - [gms_utility Extension]({{< relref "./docs/ExtensionReference/gms_utility-Extension.md" >}})
+ - [gms_utility概述]({{< relref "./docs/ExtensionReference/gms_utility概述.md" >}})
+ - [gms_utility限制]({{< relref "./docs/ExtensionReference/gms_utility限制.md" >}})
+ - [gms_utility安装]({{< relref "./docs/ExtensionReference/gms_utility安装.md" >}})
+ - [gms_utility使用]({{< relref "./docs/ExtensionReference/gms_utility使用.md" >}})
+ - [gms_raw Extension]({{< relref "./docs/ExtensionReference/gms_raw-Extension.md" >}})
+ - [gms_raw概述]({{< relref "./docs/ExtensionReference/gms_raw概述.md" >}})
+ - [gms_raw限制]({{< relref "./docs/ExtensionReference/gms_raw限制.md" >}})
+ - [gms_raw安装]({{< relref "./docs/ExtensionReference/gms_raw安装.md" >}})
+ - [gms_raw使用]({{< relref "./docs/ExtensionReference/gms_raw使用.md" >}})
+ - [gms_match Extension]({{< relref "./docs/ExtensionReference/gms_match-Extension.md" >}})
+ - [gms_match概述]({{< relref "./docs/ExtensionReference/gms_match概述.md" >}})
+ - [gms_match限制]({{< relref "./docs/ExtensionReference/gms_match限制.md" >}})
+ - [gms_match安装]({{< relref "./docs/ExtensionReference/gms_match安装.md" >}})
+ - [gms_match使用]({{< relref "./docs/ExtensionReference/gms_match使用.md" >}})
+ - [shark Extension]({{< relref "./docs/ExtensionReference/shark-Extension.md" >}})
+ - [shark概述]({{< relref "./docs/ExtensionReference/shark概述.md" >}})
+ - [shark限制]({{< relref "./docs/ExtensionReference/shark限制.md" >}})
+ - [shark安装]({{< relref "./docs/ExtensionReference/shark安装.md" >}})
+ - [shark语法介绍]({{< relref "./docs/ExtensionReference/shark语法介绍.md" >}})
+ - [SQL参考]({{< relref "./docs/ExtensionReference/shark-SQL参考.md" >}})
+ - [关键字]({{< relref "./docs/ExtensionReference/shark-关键字.md" >}})
+ - [数据类型]({{< relref "./docs/ExtensionReference/shark-数据类型.md" >}})
+ - [字符类型]({{< relref "./docs/ExtensionReference/shark-字符类型.md" >}})
+ - [SQL语法]({{< relref "./docs/ExtensionReference/shark-SQL语法.md" >}})
+ - [CREATE INDEX]({{< relref "./docs/ExtensionReference/shark-CREATE-INDEX.md" >}})
+ - [存储过程]({{< relref "./docs/ExtensionReference/shark-存储过程.md" >}})
+ - [基本语句]({{< relref "./docs/ExtensionReference/shark-存储过程_SQLReference.md" >}})
+ - [gms_lob Extension]({{< relref "./docs/ExtensionReference/gms_lob-Extension.md" >}})
+ - [gms_lob概述]({{< relref "./docs/ExtensionReference/gms_lob概述.md" >}})
+ - [gms_lob限制]({{< relref "./docs/ExtensionReference/gms_lob限制.md" >}})
+ - [gms_lob安装]({{< relref "./docs/ExtensionReference/gms_lob安装.md" >}})
+ - [gms_lob使用]({{< relref "./docs/ExtensionReference/gms_lob使用.md" >}})
- [SQL参考]({{< relref "./docs/SQLReference/SQL参考.md" >}})
- [SQL语法格式说明]({{< relref "./docs/SQLReference/SQL语法格式说明.md" >}})
- [SQL语言结构和语法]({{< relref "./docs/SQLReference/SQL语言结构和语法.md" >}})
@@ -868,6 +947,7 @@ headless: true
- [CREATE LANGUAGE]({{< relref "./docs/SQLReference/CREATE-LANGUAGE.md" >}})
- [CREATE MASKING POLICY]({{< relref "./docs/SQLReference/CREATE-MASKING-POLICY.md" >}})
- [CREATE MATERIALIZED VIEW]({{< relref "./docs/SQLReference/CREATE-MATERIALIZED-VIEW.md" >}})
+ - [CREATE MATERIALIZED VIEW LOG]({{< relref "./docs/SQLReference/CREATE-MATERIALIZED-VIEW-LOG.md" >}})
- [CREATE MODEL]({{< relref "./docs/SQLReference/CREATE-MODEL.md" >}})
- [CREATE OPERATOR]({{< relref "./docs/SQLReference/CREATE-OPERATOR.md" >}})
- [CREATE PACKAGE]({{< relref "./docs/SQLReference/CREATE-PACKAGE.md" >}})
@@ -887,6 +967,7 @@ headless: true
- [CREATE TABLE AS]({{< relref "./docs/SQLReference/CREATE-TABLE-AS.md" >}})
- [CREATE TABLE INHERITS]({{< relref "./docs/SQLReference/CREATE-TABLE-INHERITS.md" >}})
- [CREATE TABLE PARTITION]({{< relref "./docs/SQLReference/CREATE-TABLE-PARTITION.md" >}})
+ - [CREATE TABLE SUBPARTITION]({{< relref "./docs/SQLReference/CREATE-TABLE-SUBPARTITION.md" >}})
- [CREATE TABLESPACE]({{< relref "./docs/SQLReference/CREATE-TABLESPACE.md" >}})
- [CREATE TEXT SEARCH CONFIGURATION]({{< relref "./docs/SQLReference/CREATE-TEXT-SEARCH-CONFIGURATION.md" >}})
- [CREATE TEXT SEARCH DICTIONARY]({{< relref "./docs/SQLReference/CREATE-TEXT-SEARCH-DICTIONARY.md" >}})
@@ -921,6 +1002,7 @@ headless: true
- [DROP LANGUAGE]({{< relref "./docs/SQLReference/DROP-LANGUAGE.md" >}})
- [DROP MASKING POLICY]({{< relref "./docs/SQLReference/DROP-MASKING-POLICY.md" >}})
- [DROP MATERIALIZED VIEW]({{< relref "./docs/SQLReference/DROP-MATERIALIZED-VIEW.md" >}})
+ - [DROP MATERIALIZED VIEW LOG]({{< relref "./docs/SQLReference/DROP-MATERIALIZED-VIEW-LOG.md" >}})
- [DROP MODEL]({{< relref "./docs/SQLReference/DROP-MODEL.md" >}})
- [DROP OPERATOR]({{< relref "./docs/SQLReference/DROP-OPERATOR.md" >}})
- [DROP OWNED]({{< relref "./docs/SQLReference/DROP-OWNED.md" >}})
@@ -1013,6 +1095,7 @@ headless: true
- [XML类型]({{< relref "./docs/SQLReference/XML类型.md" >}})
- [账本数据库使用的数据类型]({{< relref "./docs/SQLReference/账本数据库使用的数据类型.md" >}})
- [SET类型]({{< relref "./docs/SQLReference/SET类型.md" >}})
+ - [向量数据类型]({{< relref "./docs/SQLReference/向量数据类型.md" >}})
- [字符集与字符序]({{< relref "./docs/SQLReference/字符集与字符序.md" >}})
- [函数和操作符]({{< relref "./docs/SQLReference/函数和操作符.md" >}})
- [逻辑操作符]({{< relref "./docs/SQLReference/逻辑操作符.md" >}})
@@ -1066,6 +1149,7 @@ headless: true
- [废弃函数]({{< relref "./docs/SQLReference/废弃函数.md" >}})
- [Global SysCache特性函数]({{< relref "./docs/SQLReference/Global-SysCache特性函数.md" >}})
- [数据损坏检测修复函数]({{< relref "./docs/SQLReference/数据损坏检测修复函数.md" >}})
+ - [向量函数和操作符]({{< relref "./docs/SQLReference/向量函数和操作符.md" >}})
- [类型转换]({{< relref "./docs/SQLReference/类型转换.md" >}})
- [概述]({{< relref "./docs/SQLReference/概述-17.md" >}})
- [操作符]({{< relref "./docs/SQLReference/操作符.md" >}})
@@ -1092,9 +1176,12 @@ headless: true
- [增量物化视图]({{< relref "./docs/SQLReference/增量物化视图.md" >}})
- [概述]({{< relref "./docs/SQLReference/概述-28.md" >}})
- [使用]({{< relref "./docs/SQLReference/使用-29.md" >}})
- - [支持和约束]({{< relref "./docs/SQLReference/支持和约束-30.md" >}})
+ - [支持和约束]({{< relref "./docs/SQLReference/支持和约束-1.md" >}})
- [游标]({{< relref "./docs/SQLReference/游标.md" >}})
+ - [使用游标创建type]({{< relref "./docs/SQLReference/使用游标创建type.md" >}})
+ - [使用游标作为插入值]({{< relref "./docs/SQLReference/使用游标作为插入值.md" >}})
- [匿名块]({{< relref "./docs/SQLReference/匿名块-1.md" >}})
+ - [子类型]({{< relref "./docs/SQLReference/子类型.md" >}})
- [存储过程]({{< relref "./docs/SQLReference/存储过程.md" >}})
- [存储过程]({{< relref "./docs/SQLReference/存储过程-20.md" >}})
- [数据类型]({{< relref "./docs/SQLReference/数据类型-21.md" >}})
@@ -1184,6 +1271,11 @@ headless: true
- [扩展性]({{< relref "./docs/SQLReference/扩展性.md" >}})
- [实现]({{< relref "./docs/SQLReference/实现.md" >}})
- [GIN提示与技巧]({{< relref "./docs/SQLReference/GIN提示与技巧.md" >}})
+ - [DataVec向量引擎]({{< relref "./docs/SQLReference/DataVec向量引擎.md" >}})
+ - [向量数据类型]({{< relref "./docs/SQLReference/向量数据类型.md" >}})
+ - [向量函数和操作符]({{< relref "./docs/SQLReference/向量函数和操作符.md" >}})
+ - [向量索引]({{< relref "./docs/SQLReference/向量索引.md" >}})
+ - [融合查询使用指南]({{< relref "./docs/SQLReference/融合查询使用指南.md" >}})
- [系统操作]({{< relref "./docs/SQLReference/系统操作.md" >}})
- [Schema]({{< relref "./docs/SQLReference/Schema-24.md" >}})
- [Information Schema]({{< relref "./docs/SQLReference/Information-Schema.md" >}})
@@ -1192,7 +1284,6 @@ headless: true
- [\_PG\_FOREIGN\_TABLE\_COLUMNS]({{< relref "./docs/SQLReference/_PG_FOREIGN_TABLE_COLUMNS.md" >}})
- [\_PG\_FOREIGN\_TABLES]({{< relref "./docs/SQLReference/_PG_FOREIGN_TABLES.md" >}})
- [\_PG\_USER\_MAPPINGS]({{< relref "./docs/SQLReference/_PG_USER_MAPPINGS.md" >}})
- - [INFORMATION\_SCHEMA\_CATALOG\_NAME]({{< relref "./docs/SQLReference/INFORMATION_SCHEMA_CATALOG_NAME.md" >}})
- [DBE\_PERF Schema]({{< relref "./docs/SQLReference/DBE_PERF-Schema.md" >}})
- [OS]({{< relref "./docs/SQLReference/OS.md" >}})
- [OS\_RUNTIME]({{< relref "./docs/SQLReference/OS_RUNTIME.md" >}})
@@ -1456,7 +1547,6 @@ headless: true
- [DBE\_SQL\_UTIL.enable\_sql\_patch]({{< relref "./docs/SQLReference/DBE_SQL_UTIL-enable_sql_patch.md" >}})
- [DBE\_SQL\_UTIL.disable\_sql\_patch]({{< relref "./docs/SQLReference/DBE_SQL_UTIL-disable_sql_patch.md" >}})
- [DBE\_SQL\_UTIL.show\_sql\_patch]({{< relref "./docs/SQLReference/DBE_SQL_UTIL-show_sql_patch.md" >}})
-
- [工具与命令参考]({{< relref "./docs/ToolandCommandReference/ToolandCommandReference.md" >}})
- [简介]({{< relref "./docs/ToolandCommandReference/简介.md" >}})
- [客户端工具]({{< relref "./docs/ToolandCommandReference/客户端工具.md" >}})
@@ -1485,7 +1575,6 @@ headless: true
- [pg\_controldata]({{< relref "./docs/ToolandCommandReference/pg_controldata.md" >}})
- [pg\_resetxlog]({{< relref "./docs/ToolandCommandReference/pg_resetxlog.md" >}})
-
- [数据库参考]({{< relref "./docs/DatabaseReference/数据库参考.md" >}})
- [系统表和系统视图]({{< relref "./docs/DatabaseReference/系统表和系统视图.md" >}})
- [系统表和系统视图概述]({{< relref "./docs/DatabaseReference/系统表和系统视图概述.md" >}})
@@ -1586,6 +1675,8 @@ headless: true
- [PG\_SHSECLABEL]({{< relref "./docs/DatabaseReference/PG_SHSECLABEL.md" >}})
- [PG\_STATISTIC]({{< relref "./docs/DatabaseReference/PG_STATISTIC.md" >}})
- [PG\_STATISTIC\_EXT]({{< relref "./docs/DatabaseReference/PG_STATISTIC_EXT.md" >}})
+ - [PG\_STATISTIC\_LOCK]({{< relref "./docs/DatabaseReference/PG_STATISTIC_LOCK.md" >}})
+ - [PG\_STATISTIC\_HISTORY]({{< relref "./docs/DatabaseReference/PG_STATISTIC_HISTORY.md" >}})
- [PG\_SUBSCRIPTION]({{< relref "./docs/DatabaseReference/PG_SUBSCRIPTION.md" >}})
- [PG\_SUBSCRIPTION\_REL]({{< relref "./docs/DatabaseReference/PG_SUBSCRIPTION_REL.md" >}})
- [PG\_SYNONYM]({{< relref "./docs/DatabaseReference/PG_SYNONYM.md" >}})
@@ -1605,7 +1696,7 @@ headless: true
- [PGXC\_NODE]({{< relref "./docs/DatabaseReference/PGXC_NODE.md" >}})
- [PGXC\_SLICE]({{< relref "./docs/DatabaseReference/PGXC_SLICE.md" >}})
- [PLAN\_TABLE\_DATA]({{< relref "./docs/DatabaseReference/PLAN_TABLE_DATA.md" >}})
- - [STATEMENT\_HISTORY]({{< relref "./docs/DatabaseReference/STATEMENT_HISTORY.md" >}})
+ - [STATEMENT\_HISTORY]({{< relref "./docs/DatabaseReference/STATEMENT_HISTORY.md" >}})
- [系统视图]({{< relref "./docs/DatabaseReference/系统视图.md" >}})
- [GET\_GLOBAL\_PREPARED\_XACTS(废弃)]({{< relref "./docs/DatabaseReference/GET_GLOBAL_PREPARED_XACTS_废弃.md" >}})
- [GS\_AUDITING]({{< relref "./docs/DatabaseReference/GS_AUDITING.md" >}})
@@ -1792,7 +1883,6 @@ headless: true
- [定时任务]({{< relref "./docs/DatabaseReference/定时任务.md" >}})
- [线程池]({{< relref "./docs/DatabaseReference/线程池.md" >}})
- [备份恢复]({{< relref "./docs/DatabaseReference/备份恢复.md" >}})
- - [Undo]({{< relref "./docs/DatabaseReference/Undo.md" >}})
- [DCF参数设置]({{< relref "./docs/DatabaseReference/DCF参数设置.md" >}})
- [闪回相关参数]({{< relref "./docs/DatabaseReference/闪回相关参数.md" >}})
- [回滚相关参数]({{< relref "./docs/DatabaseReference/回滚相关参数.md" >}})
@@ -1803,6 +1893,7 @@ headless: true
- [大页内存]({{< relref "./docs/DatabaseReference/大页内存.md" >}})
- [数据导入导出]({{< relref "./docs/DatabaseReference/数据导入导出.md" >}})
- [分隔符]({{< relref "./docs/DatabaseReference/分隔符.md" >}})
+ - [DataVec向量引擎参数]({{< relref "./docs/DatabaseReference/DataVec向量引擎参数.md" >}})
- [错误码参考]({{< relref "./docs/DatabaseReference/错误码参考.md" >}})
- [SQL标准错误码说明]({{< relref "./docs/DatabaseReference/SQL标准错误码说明.md" >}})
- [第三方库错误码说明]({{< relref "./docs/DatabaseReference/第三方库错误码说明.md" >}})
@@ -2672,4 +2763,5 @@ headless: true
- [openGauss资源获取]({{< relref "./docs/Appendix/openGauss资源获取.md" >}})
- [错误日志信息参考]({{< relref "./docs/Appendix/错误日志信息参考.md" >}})
- [内核错误信息]({{< relref "./docs/Appendix/内核错误信息.md" >}})
+ - [参考文献]({{< relref "./docs/Appendix/参考文献.md" >}})
- [术语表]({{< relref "./docs/Appendix/术语表.md" >}})
diff --git a/content/en/docs/AIFeatureGuide/ai-feature-guide.md b/content/en/docs/AIFeatureGuide/ai-feature-guide.md
index 9fabe5fa06e4a79c1cf2e77ad6635749bca6d316..50a780d6ab102c6de59a341a7863686aae5a1002 100644
--- a/content/en/docs/AIFeatureGuide/ai-feature-guide.md
+++ b/content/en/docs/AIFeatureGuide/ai-feature-guide.md
@@ -1,19 +1,14 @@
# AI Features
-The history of artificial intelligence \(AI\) can be dated back to as early as the 1950s, even longer than the history of the database development. However, the AI technology has not been applied on a large scale for a long time due to various objective factors, and even experienced several obvious troughs. With the further development of information technologies in recent years, factors that restrict the AI development have been gradually weakened, and the AI, big data, and cloud computing \(ABC\) technologies are born.
+The history of artificial intelligence \(AI\) can be traced back to the 1950s, even predating the development of database systems. However, due to various objective constraints, AI technology was not applied on a large scale for quite some time and even experienced several significant downturns. In recent years, with the advancement of information technology, many of the factors that previously hindered AI development have gradually diminished, giving rise to the so-called ABC technologies—AI, Big Data, and Cloud Computing.
-The combination of AI and databases has been a trending research topic in the industry in recent years. openGauss has participated in the exploration of this domain earlier and achieved phased achievements. An AI submodule DBMind is provided for the database. Compared with other functions, it is more independent. This module can be divided into AI4DB, DB4AI, and AI in DB.
+The integration of AI and databases has become a major research focus in recent years. openGauss was an early participant in this exploration and has achieved notable progress. The AI features are encapsulated in a submodule called DBMind, which is more independent compared to other database functions. It is broadly divided into two parts: AI4DB and DB4AI.
-- AI4DB uses AI technologies to optimize database execution performance as well as achieve autonomy and O&M free. It includes self-tuning, self-diagnosis, self-security, self-O&M, and self-healing.
-- DB4AI streamlines the E2E process from databases to AI applications, drives AI tasks through databases, and unifies the AI technology stack to achieve out-of-the-box, high performance, and cost saving. For example, SQL-like statements are used to implement functions such as recommendation system, image retrieval, and time series prediction. The advantages of high parallelism and column store of databases can be fully utilized to avoid the cost of data and fragmented storage and avoid security risks caused by information leakage.
-- AI in DB modifies the database kernel to implement functions that cannot be implemented in the original database architecture. For example, AI algorithms are used to improve the database optimizer to implement more accurate cost estimation.
+- AI4DB refers to the use of AI technologies to optimize database performance, thereby achieving better execution. It also enables autonomy and O&M-free capabilities through AI. The key areas include self-tuning, self-diagnosis, self-security, self-O&M, and self-healing.
+- DB4AI refers to streamlining the end-to-end process from databases to AI applications, driving AI tasks through the database, and unifying the AI technology stack to achieve out-of-the-box functionality, high performance, and cost savings. For example, SQL-like statements can be used to implement functions such as recommendation systems, image retrieval, and time series prediction. This takes full advantage of the high parallelism and columnar storage of databases, avoiding the costs associated with fragmented data storage and minimizing security risks related to information leakage.
-The functions described in this section are stored in the **bin/dbmind** directory of the database installation directory \(_$GAUSSHOME_\). The sub-functions are stored in the **components** subdirectory of **bin/dbmind**. To invoke DBMind, you can run the **gs\_dbmind** command. In addition, the built-in AI functions \(such as DB4AI\) of the database are presented in the form of SQL syntax and system functions.
+The features discussed in this section are located in the **bin/dbmind** directory of the database installation path \(_$GAUSSHOME_\). Each sub-function resides in the **components** subdirectory within **bin/dbmind**. The **gs\_dbmind** command is available for users to invoke these features. Meanwhile, built-in AI functions \(such as DB4AI\) are presented through SQL syntax and system functions.
- **[AI4DB: Autonomous Database O&M](ai4db-autonomous-database-o-m.md)**
- **[DB4AI: Database-driven AI](db4ai-database-driven-ai.md)**
-
-- **[ABO Optimizer](abo-optimizer.md)**
-
-
diff --git a/content/en/docs/AIFeatureGuide/ai4db-autonomous-database-o-m.md b/content/en/docs/AIFeatureGuide/ai4db-autonomous-database-o-m.md
index fdd424b5645d72bde1d04528a3b34f13869eb79b..bec150454aa6a126775ce908759e181af7742d89 100644
--- a/content/en/docs/AIFeatureGuide/ai4db-autonomous-database-o-m.md
+++ b/content/en/docs/AIFeatureGuide/ai4db-autonomous-database-o-m.md
@@ -1,34 +1,34 @@
# AI4DB: Autonomous Database O&M
-As mentioned above, AI4DB is mainly used for autonomous O&M and management of databases, helping database O&M personnel reduce O&M workload. In implementation, the AI4DB framework of DBMind is monitored and service-oriented. It also provides instant AI toolkits and out-of-the-box AI O&M functions \(such as index recommendation\). AI4DB mainly uses the open-source Prometheus for monitoring. DBMind provides a monitoring data producer exporter, which can be interconnected with the Prometheus platform. The following figure shows the AI4DB service architecture of DBMind.
+As mentioned above, AI4DB is primarily used for autonomous O&M and management of databases, helping database administrators reduce their workload. In practice, the AI4DB framework in DBMind is monitoring- and service-oriented. It also provides an instant AI toolkit, offering out-of-the-box AI O&M features \(such as index recommendation\). AI4DB mainly uses the open-source Prometheus for monitoring, with DBMind providing an exporter to produce monitoring data, which integrates with the Prometheus platform. The following figure illustrates the AI4DB service architecture in DBMind.
**Figure 1** AI4DB service architecture of DBMind

-Key components in the figure are described as follows:
+Description of key components in the figure:
-- DBMind Service: DBMind background service, which can be used for periodic offline computing, including slow SQL root cause analysis and time series prediction.
-- Prometheus-server: server for storing Prometheus monitoring metrics.
-- metadatabase: After the offline computing is complete, DBMind stores the computing result. Databases such as openGauss and SQLite are supported.
-- client: client used to read the DBMind offline computing results. Currently, only the CLI client is supported. If databases such as openGauss are used to store and calculate the DBMind computing results, you can configure visualization tools such as Grafana to visualize the results.
-- openGauss-exporter: collects monitoring metrics from the openGauss database nodes for DBMind to calculate.
-- node-exporter: exporter provided by Prometheus, which can be used to monitor system metrics of the node, such as CPU and memory usage.
-- reprocessing-exporter: processes metrics collected by Prometheus, for example, calculating the CPU usage.
+- DBMind Service: The background service of DBMind, used for periodic offline computations, including slow SQL root cause analysis and time series forecasting.
+- Prometheus-server: The server responsible for storing Prometheus monitoring metrics.
+- metadatabase: After offline computations are complete, DBMind stores the results here. Supported databases include openGauss, SQLite, and others.
+- client: The client used to retrieve offline computation results from DBMind, currently only available as a command-line interface (CLI) client. If databases like openGauss are used to store DBMind's computation results, users can configure visualization tools like Grafana for result visualization.
+- openGauss-exporter: Collects monitoring metrics from openGauss database nodes for use by DBMind's calculations.
+- node-exporter: An exporter provided by Prometheus to monitor system metrics of a node, such as CPU and memory usage.
+- reprocessing-exporter: Processes the metrics collected by Prometheus, for example, calculating CPU utilization.
-## Environment Configuration
+## Environment Setup
-DBMind must run on Python 3.6 or later. The required third-party dependency packages are recorded in the **requirements.txt** file \(**requirements-x86.txt** or **requirements-arrch64.txt**, depending on the platform type\) in the AI function root directory \(_$GAUSSHOME_**/bin/dbmind**\). You can run the **pip install** command to install the dependencies. For example:
+DBMind's external AI functions require Python version 3.6 or later. The required third-party dependencies are recorded in the **requirements.txt** file \(including **requirements-x86.txt** and **requirements-arrch64.txt**, depending on your platform type\) located in the root directory of the AI function \(_$GAUSSHOME_**/bin/dbmind**\). You can install the dependencies using the **pip install** command, for example:
```
pip install requirements-x86.txt
```
-If you do not install all required dependencies, the system will prompt you to install third-party dependencies when you run the **gs\_dbmind** command. Note that this file provides the third-party dependencies required by DBMind. If a third-party package conflict exists in the user environment, you can handle the problem based on the actual situation.
+If you haven't installed all the necessary dependencies, the system will prompt you to install them when you execute the **gs\_dbmind** command. Note that the file lists the third-party dependencies required by DBMind, and if there are conflicts with third-party packages in your environment, you should handle them based on your specific situation.
-- **[DBMind Mode](dbmind-mode.md)**
+- **[DBMind Mode Explanation](dbmind-mode.md)**
-- **[Components that Support DBMind](components-that-support-dbmind.md)**
+- **[Supporting Components of DBMind](components-that-support-dbmind.md)**
-- **[AI Sub-functions of the DBMind](ai-sub-functions-of-the-dbmind.md)**
+- **[DBMind AI Sub-functions](ai-sub-functions-of-the-dbmind.md)**
diff --git a/content/en/docs/AIFeatureGuide/anomaly-analysis-command-reference.md b/content/en/docs/AIFeatureGuide/anomaly-analysis-command-reference.md
index 6712f9eb18249875d59368677221c28c8d20799d..66b1d8cd1c7ba34e77e50853d1af14fb7e93f00f 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-analysis-command-reference.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-analysis-command-reference.md
@@ -1,6 +1,6 @@
# Command Reference
-**Table 1** Command line parameters
+**Table 1** Command Line Parameters
Parameter
@@ -27,35 +27,35 @@
-m, --metric
-
Metric name to be displayed
+
Metric name to display
-
-H, --host
-
Data source IP address which is used to filter data
+
Data source IP address used for filtering
-
IP address or IP address + port number
+
IP address or IP address + port
-s, --start-time
-
Timestamp of the start time, in milliseconds. Alternatively, the date and time format is %Y-%m-%d %H:%M:%S.
+
Timestamp of the start time (in milliseconds) or the date-time format %Y-%m-%d %H:%M:%S.
-
Positive integer or date and time format
+
Positive integer or date-time format
-e, --end-time
-
Timestamp of the start time, in milliseconds. Alternatively, the date and time format is %Y-%m-%d %H:%M:%S.
+
Timestamp of the end time (in milliseconds) or the date-time format %Y-%m-%d %H:%M:%S.
-
Positive integer or date and time format
+
Positive integer or date-time format
--csv-dump-path
-
Path of the exported CSV file.
+
Path to the exported CSV file
-
diff --git a/content/en/docs/AIFeatureGuide/anomaly-analysis-obtaining-help-information.md b/content/en/docs/AIFeatureGuide/anomaly-analysis-obtaining-help-information.md
index edec35a7f8e8eecdb3c0e8c01b7ea615d84f23f6..f6e4962c4aaffd2f10ca7f246e5b097ff25d3c27 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-analysis-obtaining-help-information.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-analysis-obtaining-help-information.md
@@ -1,12 +1,12 @@
# Obtaining Help Information
-You can run the **--help** command to obtain the help information. For example:
+You can run the **--help** command to obtain help information. For example:
```
gs_dbmind component anomaly_detection --help
```
-The following information is displayed:
+The following information will be displayed:
```
usage: anomaly_analysis.py [-h] -c CONF -m METRIC -s START_TIME -e END_TIME -H
HOST [--csv-dump-path CSV_DUMP_PATH]
diff --git a/content/en/docs/AIFeatureGuide/anomaly-analysis-overview.md b/content/en/docs/AIFeatureGuide/anomaly-analysis-overview.md
index 0105de59f1f1e6fc7f4a0af1b9479214de2ea2a0..d5a9411a15c78eb6ed6bc812dda0591f7110672b 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-analysis-overview.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-analysis-overview.md
@@ -1,3 +1,3 @@
# Overview
-The Anomaly analysis multi-metric correlation module analyzes the Pearson correlation coefficient of time series data to find the metrics that are most closely related to known exceptions. The framework of this module is decoupled. The supported time series databases include Prometheus and InfluxDB.
+The Anomaly Analysis multi-metric correlation module is primarily used to analyze the Pearson correlation coefficient of time series data to identify metrics that are most strongly correlated with known anomalies. This module features a decoupled framework and supports time series databases such as Prometheus and InfluxDB.
diff --git a/content/en/docs/AIFeatureGuide/anomaly-analysis-troubleshooting.md b/content/en/docs/AIFeatureGuide/anomaly-analysis-troubleshooting.md
index e8b011a4d79c8aa4d029819bc4c91ad4de5bbb8e..b8ed2f879efbaacbcc1a334112a860728698734a 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-analysis-troubleshooting.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-analysis-troubleshooting.md
@@ -1,3 +1,3 @@
# Troubleshooting
-- Analysis scenario failure: Check whether the configuration file path is correct and whether the configuration file information is complete. Check whether the metric name is correct, whether the host address is correct, and whether the metric data exists in the start time and end time.
+- If the analysis scenario fails, check that the configuration file path is correct and the configuration information is complete. Also, verify that the metric name and host address are accurate, and ensure that the metric data is available for the specified start and end times.
\ No newline at end of file
diff --git a/content/en/docs/AIFeatureGuide/anomaly-analysis-usage-guide.md b/content/en/docs/AIFeatureGuide/anomaly-analysis-usage-guide.md
index 616de9abc43c1a2ab7761016639b3802cb499aa1..a570960baed2637648608d2d24670a941a359400 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-analysis-usage-guide.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-analysis-usage-guide.md
@@ -1,15 +1,14 @@
# Usage Guide
-Assume that the metric collection system is running properly and the configuration file directory **confpath** has been initialized. You can run the following command to implement this feature:
+Assume the metric collection system is running properly and the configuration file directory **confpath** has been initialized. You can run the following command to use this feature:
-
-For a metric, analyze the correlation between other metrics and the data of the metric from timestamps1 to timestamps2 on a specific node.
+To analyze the correlation between a specific metric and other metrics within the time range from timestamps1 to timestamps2 on a specific node:
```
gs_dbmind component anomaly_analysis --conf confpath --metric metric_name --start-time timestamps1 --end-time timestamps2 --host ip_address
```
-For a metric, analyze the correlation between other metrics and the metric data from timestamps1 to timestamps2 on a specific node, and save the analysis result as a CSV file.
+To analyze the correlation between a specific metric and other metrics from timestamps1 to timestamps2 on a specific node and save the analysis result as a CSV file:
```
gs_dbmind component anomaly_analysis --conf confpath --metric metric_name --start-time timestamps1 --end-time timestamps2 --host ip_address --csv-dump-path csv_path
@@ -19,4 +18,4 @@ gs_dbmind component anomaly_analysis --conf confpath --metric metric_name --star
> **NOTE:**
->When setting anomaly_analysis parameters, ensure that start-time is at least 30 seconds earlier than end-time.
+>Ensure that start-time is at least 30 seconds earlier than end-time when configuring anomaly_analysis parameters.
diff --git a/content/en/docs/AIFeatureGuide/anomaly-detection-command-reference.md b/content/en/docs/AIFeatureGuide/anomaly-detection-command-reference.md
index c5cd47509e51bfaa0d926b63fb1a7e2e807df6e9..5547e51ddb2ee5f7cb704ce4a5bb9b68d5a05ee1 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-detection-command-reference.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-detection-command-reference.md
@@ -1,6 +1,6 @@
# Command Reference
-**Table 1** Command line parameters
+**Table 1** Command Line Parameters
Parameter
@@ -42,28 +42,28 @@
-H, --host
-
Data source IP address which is used to filter data
+
Data source IP address used to filter data
-
IP address or IP address + port number
+
IP address or IP address + port
-a, --anomaly
-
Anomaly detection mode, which is used for filtering
+
Anomaly detection mode used for filtering
-
-s, --start-time
-
Timestamp of the start time, in milliseconds. Alternatively, the date and time format is %Y-%m-%d %H:%M:%S.
+
Start time as a timestamp in milliseconds, or in the format %Y-%m-%d %H:%M:%S.
Positive integer or date and time format
-e, --end-time
-
Timestamp of the start time, in milliseconds. Alternatively, the date and time format is %Y-%m-%d %H:%M:%S.
+
End time as a timestamp in milliseconds, or in the format %Y-%m-%d %H:%M:%S.
Positive integer or date and time format
diff --git a/content/en/docs/AIFeatureGuide/anomaly-detection-troubleshooting.md b/content/en/docs/AIFeatureGuide/anomaly-detection-troubleshooting.md
index 69260bf9b8bda54c28de9d71287bd19a4e877a16..9fc9b16a6b2f7c0bee577a5fcb7b65759449e96c 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-detection-troubleshooting.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-detection-troubleshooting.md
@@ -1,4 +1,4 @@
# Troubleshooting
-- Overview scenario failure: Check whether the configuration file path is correct and whether the configuration file information is complete. Check whether the metric name is correct, whether the host IP address is correct, whether the anomaly detection type is correct, and whether the metric data exists in the start time and end time.
-- Visualization scenario failure: Check whether the configuration file path is correct and whether the configuration file information is complete. Check whether the metric name is correct, whether the host IP address is correct, whether the anomaly detection type is correct, and whether the metric data exists in the start time and end time.
+- Overview scenario failure: Ensure the configuration file path is correct and the configuration information is complete. Verify the metric name, host IP address, and anomaly detection type are accurate, and check if the metric data exists within the specified start and end times.
+- Visualization scenario failure: Ensure the configuration file path is correct and the configuration information is complete. Verify the metric name, host IP address, and anomaly detection type are accurate, and check if the metric data exists within the specified start and end times.
diff --git a/content/en/docs/AIFeatureGuide/anomaly-detection-usage-guide.md b/content/en/docs/AIFeatureGuide/anomaly-detection-usage-guide.md
index a0bde78c8432bd5d71a4dfdfe83817b53867dca6..086ccb648d4a58d630df73788774c8bde8ed2cfc 100644
--- a/content/en/docs/AIFeatureGuide/anomaly-detection-usage-guide.md
+++ b/content/en/docs/AIFeatureGuide/anomaly-detection-usage-guide.md
@@ -1,6 +1,6 @@
# Usage Guide
-Assume that the metric collection system is running properly and the configuration file directory **confpath** has been initialized. You can run the following command to implement this feature:
+Assume the metric collection system is running properly and the configuration file directory **confpath** has been initialized. You can run the following commands to enable this feature:
Enable only the anomaly detection function:
@@ -8,41 +8,41 @@ Enable only the anomaly detection function:
gs_dbmind service start --conf confpath --only-run anomaly_detection
```
-View a metric on all nodes from timestamps1 to timestamps2:
+View data for a metric on all nodes from timestamps1 to timestamps2:
```
gs_dbmind component anomaly_detection --conf confpath --action overview --metric metric_name --start-time timestamps1 --end-time timestamps2
```
-View a metric on a specific node from timestamps1 to timestamps2:
+View data for a metric on a specific node from timestamps1 to timestamps2:
```
gs_dbmind component anomaly_detection --conf confpath --action overview --metric metric_name --start-time timestamps1 --end-time timestamps2 --host ip_address --anomaly anomaly_type
```
-View a metric on all nodes from timestamps1 to timestamps2 in a specific anomaly detection mode:
+View data for a metric on all nodes from timestamps1 to timestamps2 using a specific anomaly detection mode:
```
gs_dbmind component anomaly_detection --conf confpath --action overview --metric metric_name --start-time timestamps1 --end-time timestamps2 --anomaly anomaly_type
```
-View a metric on a specific node from timestamps1 to timestamps2 in a specific anomaly detection mode:
+View data for a metric on a specific node from timestamps1 to timestamps2 using a specific anomaly detection mode:
```
gs_dbmind component anomaly_detection --conf confpath --action overview --metric metric_name --start-time timestamps1 --end-time timestamps2 --host ip_address --anomaly anomaly_type
```
-Visualize a metric on all nodes from timestamps1 to timestamps2 in a specific anomaly detection mode:
+Visualize data for a metric on all nodes from timestamps1 to timestamps2 using a specific anomaly detection mode:
```
gs_dbmind component anomaly_detection --conf confpath --action plot --metric metric_name --start-time timestamps1 --end-time timestamps2 --host ip_address --anomaly anomaly_type
```
-Stop the started service:
+Stop the running service:
```
gs_dbmind service stop --conf confpath
```
> **NOTE:**
->When setting anomaly detection parameters, ensure that start-time is at least 30 seconds earlier than end-time.
+>When configuring anomaly detection parameters, ensure that the start-time is at least 30 seconds earlier than the end-time.
diff --git a/content/en/docs/AboutopenGauss/database-audit.md b/content/en/docs/AboutopenGauss/database-audit.md
index 8d036afb14367e5cb58169c20dc6e3c2301bb3e4..31908a764879300bf65f10e9c9b12e64ed106b6c 100644
--- a/content/en/docs/AboutopenGauss/database-audit.md
+++ b/content/en/docs/AboutopenGauss/database-audit.md
@@ -18,7 +18,7 @@ Database security is essential for a database system. GaussDB 200 writes all u
## Enhancements
-None
+version 6.0.0: Integrate tool audit log into databases to monitor activities such as backup, recovery, and other operations.
## Constraints
diff --git a/content/en/docs/AboutopenGauss/operating-environment.md b/content/en/docs/AboutopenGauss/operating-environment.md
index 0390981d16f94d2c809fa2fb13dc8c774e37f06e..be301fca0b2b72ca8d9726977a6a17ba4ff49be2 100644
--- a/content/en/docs/AboutopenGauss/operating-environment.md
+++ b/content/en/docs/AboutopenGauss/operating-environment.md
@@ -22,4 +22,5 @@ openGauss supports:
- openEuler 22.03 LTS
- CentOS 7.6
- Asianux 7.6
+ - Kirin V10
diff --git a/content/en/docs/AboutopenGauss/pseudocolumn-rownum.md b/content/en/docs/AboutopenGauss/pseudocolumn-rownum.md
index 6642d9972a9acf9cb0a68f17fb34706c61420674..e966e791974f40babcc4d0e2fdda47eef33574c5 100644
--- a/content/en/docs/AboutopenGauss/pseudocolumn-rownum.md
+++ b/content/en/docs/AboutopenGauss/pseudocolumn-rownum.md
@@ -24,6 +24,8 @@ During internal execution, the optimizer rewrites ROWNUM into LIMIT to accelerat
## Constraints
- Do not use the pseudocolumn ROWNUM as an alias to avoid ambiguity in SQL statements.
+- Do not use ROWNUM as the column name when creating a table. Bad example: **create table table\_name\(rownum int\);**
+- Do not use ROWNUM as the column name when creating a type. Bad example: **create type type\_name\(a int, rownum int\);**
- Do not use ROWNUM when creating an index. Bad example: **create index index\_name on table\(rownum\);**
- Do not use ROWNUM as the default value when creating a table. Bad example: **create table table\_name\(id int default rownum\);**
- Do not use ROWNUM as an alias in the WHERE clause. Bad example: **select rownum rn from table where rn < 5;**
diff --git a/content/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md b/content/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
index ba310825c1df9395e93786f301a520295cd791bc..e9ac9faa16621ecbc841269b87f0d83ef957f563 100644
--- a/content/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
+++ b/content/en/docs/AboutopenGauss/support-for-functions-and-stored-procedures.md
@@ -20,11 +20,19 @@ openGauss supports functions and stored procedures compliant with the SQL stand
## Enhancements
-None
+Support for nested arrays in PL/SQL.
+
+Support for using default argument values for cursors in PL/SQL.
+
+Support for getting the type of a row of records in a table, view, or cursor by ROWTYPE in PL/SQL.
## Constraints
-None
+Not supportted to call functions by a nested array's array-type element referred by suscripts.
+
+Not supportted to assign a nested array's array-type element directly.
+
+Can't get the type of a nested cursor by ROWTYPE.
## Dependencies
diff --git a/content/en/docs/Appendix/glossary.md b/content/en/docs/Appendix/glossary.md
index 88b4e1878d58153fd0e33f67ad64c9f67d60b361..639306b82092ca22ea9e15fe8447329cbfac7f38 100644
--- a/content/en/docs/Appendix/glossary.md
+++ b/content/en/docs/Appendix/glossary.md
@@ -379,7 +379,7 @@ id="row74511334914">
logical replication slot
-
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACCUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
+
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACUUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
MVCC
diff --git a/content/en/docs/Appendix/references.md b/content/en/docs/Appendix/references.md
new file mode 100644
index 0000000000000000000000000000000000000000..bd6926c40c6e785989eff376d85bab54fc08847a
--- /dev/null
+++ b/content/en/docs/Appendix/references.md
@@ -0,0 +1,29 @@
+# References
+
+\[1\] Y. Mao, E. Kohler, and R. T. Morris. Cache craftiness for fast multicore key-value storage. In Proc. 7th ACM European Conference on Computer Systems \(EuroSys\), Apr. 2012.
+
+\[2\] K. Ren, T. Diamond, D. J. Abadi, and A. Thomson. Low-overhead asynchronous checkpointing in main-memory database systems. In Proceedings of the 2016 ACM SIGMOD International Conference on Management of Data, 2016.
+
+\[3\] Tu, S., Zheng, W., Kohler, E., Liskov, B., and Madden, S. Speedy transactions in multicore in-memory databases. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles \(New York, NY, USA, 2013\), SOSP ’13, ACM, pp. 18–32.
+
+\[4\] H. Avni at al. Industrial-Strength OLTP Using Main Memory and Many-cores, VLDB 2020.
+
+\[5\] Bernstein, P. A., and Goodman, N. Concurrency control in distributed database systems. ACM Comput. Surv. 13, 2 \(1981\), 185–221.
+
+\[6\] Felber, P., Fetzer, C., and Riegel, T. Dynamic performance tuning of word-based software transactional memory. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPOPP 2008, Salt Lake City, UT, USA, February 20-23, 2008 \(2008\),
+
+pp. 237–246.
+
+\[7\] Appuswamy, R., Anadiotis, A., Porobic, D., Iman, M., and Ailamaki, A. Analyzing the impact of system architecture on the scalability of OLTP engines for high-contention workloads. PVLDB 11, 2 \(2017\),
+
+121–134.
+
+\[8\] R. Sherkat, C. Florendo, M. Andrei, R. Blanco, A. Dragusanu, A. Pathak, P. Khadilkar, N. Kulkarni, C. Lemke, S. Seifert, S. Iyer, S. Gottapu, R. Schulze, C. Gottipati, N. Basak, Y. Wang, V. Kandiyanallur, S. Pendap, D. Gala, R. Almeida, and P. Ghosh. Native store Extension for SAP HANA. PVLDB, 12\(12\):
+
+2047–2058, 2019.
+
+\[9\] X. Yu, A. Pavlo, D. Sanchez, and S. Devadas. Tictoc: Time traveling optimistic concurrency control. In Proceedings of the 2016 International Conference on Management of Data, SIGMOD Conference 2016, San Francisco, CA, USA, June 26 - July 01, 2016, pages 1629–1642, 2016.
+
+\[10\] V. Leis, A. Kemper, and T. Neumann. The adaptive radix tree: Artful indexing for main-memory databases. In C. S. Jensen, C. M. Jermaine, and X. Zhou, editors, 29th IEEE International Conference on Data Engineering, ICDE 2013, Brisbane, Australia, April 8-12, 2013, pages 38–49. IEEE Computer Society, 2013.
+
+\[11\] S. K. Cha, S. Hwang, K. Kim, and K. Kwon. Cache-conscious concurrency control of main-memory indexes on shared-memory multiprocessor systems. In P. M. G. Apers, P. Atzeni, S. Ceri, S. Paraboschi, K. Ramamohanarao, and R. T. Snodgrass, editors, VLDB 2001, Proceedings of 27th International Conference on Very Large Data Bases, September 11-14, 2001, Roma, Italy, pages 181–190. Morga Kaufmann, 2001.
diff --git a/content/en/docs/BriefTutorial/advanced-features.md b/content/en/docs/BriefTutorial/advanced-features.md
index da96116d8f2704e14c47bf9e4e500e6f925b0d8a..dd1523842a6397c776e6f9a9fa418e557ca44155 100644
--- a/content/en/docs/BriefTutorial/advanced-features.md
+++ b/content/en/docs/BriefTutorial/advanced-features.md
@@ -6,9 +6,7 @@
- **[Column Store](column-store.md)**
-- **[LLVM](llvm.md)**
-
-- **[Ustore](ustore.md)**
+- **[LLVM](llvm.md)**
- **[MOT](mot.md)**
diff --git a/content/en/docs/BriefTutorial/appendix-sql-syntax.md b/content/en/docs/BriefTutorial/appendix-sql-syntax.md
index 794bd7233f63364be0a0d7bc5e568d28deef557f..ededbd99417802a20f320cad93fe6db2c3cae3ed 100644
--- a/content/en/docs/BriefTutorial/appendix-sql-syntax.md
+++ b/content/en/docs/BriefTutorial/appendix-sql-syntax.md
@@ -620,6 +620,7 @@ where column_constraint can be:
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where compress_mode can be:
{ DELTA | PREFIX | DICTIONARY | NUMSTR | NOCOMPRESS }
@@ -631,6 +632,7 @@ where table_constraint can be:
PARTIAL CLUSTER KEY ( column_name [, ... ] ) |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where index_parameters can be:
[ WITH ( {storage_parameter = value} [, ... ] ) ]
@@ -638,6 +640,7 @@ where index_parameters can be:
where table_constraint_using_index can be:
[ CONSTRAINT constraint_name ]
{ UNIQUE | PRIMARY KEY } USING INDEX index_name
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
@@ -1544,7 +1547,7 @@ CREATE SERVER server_name
Creates a synonym object. A synonym is an alias of a database object and is used to record the mapping between database object names. You can use synonyms to access associated database objects.
```
-CREATE [ OR REPLACE ] SYNONYM synonym_name
+CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM synonym_name
FOR object_name;
```
@@ -1575,6 +1578,7 @@ where column_constraint can be:
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where table_constraint can be:
[ CONSTRAINT constraint_name ]
@@ -1584,6 +1588,7 @@ where table_constraint can be:
PARTIAL CLUSTER KEY ( column_name [, ... ] ) |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where compress_mode can be:
{ DELTA | PREFIX | DICTIONARY | NUMSTR | NOCOMPRESS }
@@ -1646,6 +1651,7 @@ where column_constraint can be:
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where table_constraint can be:
[ CONSTRAINT constraint_name ]
@@ -1654,6 +1660,7 @@ where table_constraint can be:
PRIMARY KEY ( column_name [, ... ] ) index_parameters |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+[ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
where index_parameters can be:
[ WITH ( {storage_parameter = value} [, ... ] ) ]
@@ -2101,7 +2108,7 @@ DROP SERVER [ IF EXISTS ] server_name [ { CASCADE | RESTRICT } ] ;
Deletes a synonym.
```
-DROP SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
+DROP [ PUBLIC ] SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
```
## DROP TABLE
diff --git a/content/en/docs/BriefTutorial/functions.md b/content/en/docs/BriefTutorial/functions.md
index ced9f5622b47f9f2e526fba4d6a1a94b24a21b97..bc9573d5401e6fa7bd8d4b8df5aefb2ab6410dec 100644
--- a/content/en/docs/BriefTutorial/functions.md
+++ b/content/en/docs/BriefTutorial/functions.md
@@ -1099,9 +1099,19 @@ The common functions of openGauss are as follows:
```
-- to\_number\(text, text\)
+- to\_number ( expr \[ DEFAULT return_value ON CONVERSION ERROR ] [, fmt])
- Description: Converts the values of the string type into the numbers in the specified format.
+ Description: Converts expr to a NUMERIC type value according to the specified format. If the expr conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt).
+
+ * The length of the integer part in fmt must be greater than the length of the integer part in expr. If it is less, an error will be thrown. The length of the fractional part in fmt can be filled as needed, and the result will be truncated according to the length of the fractional part in fmt.
+
+ * Both expr and the return_value after DEFAULT support implicit conversion. (Note: NULL plus any value equals NULL.)
+
+ * Scientific notation is supported.
+
+ * When converting a hexadecimal string to a decimal number, the function supports up to 16 bytes of hexadecimal string to be converted into an unsigned number.
+
+ * When converting a hexadecimal string to a decimal number, the format string should not contain any characters other than 'x' or 'X', otherwise, an error will be thrown.
Return type: numeric
@@ -1109,44 +1119,138 @@ The common functions of openGauss are as follows:
```
openGauss=# SELECT to_number('12,454.8-', '99G999D9S');
- to_number
+ to_number
-----------
-12454.8
(1 row)
```
+ ```
+ openGauss=# SELECT to_number('1234.123','999999.99');
+ to_number
+ -----------
+ 1234.12
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111','999999.99');
+ to_number
+ -----------
+ 112222.11
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('1e5'+'1111','999999.99');
+ to_number
+ -----------
+ 101111
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('111111.111'+'1111'+NULL,'999999. 99');
+ to_number
+ -----------
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_number('此参数错误' default 321456231 on conversion error ,'999,999,999,999.99');
+ to_number
+ -----------
+ 321456231
+ (1 row)
+ ```
+- to\_timestamp\(double precision\)
-- to\_timestamp\(text, text\)
-
- Description: Converts values of the string type into the timestamp of the specified type.
+ Description: Converts a UNIX century into a timestamp.
- Return type: timestamp
+ Return type: timestamp with time zone
Example:
```
- openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
- to_timestamp
- ---------------------
- 2000-12-05 00:00:00
+ openGauss=# SELECT to_timestamp(1284352323);
+ to_timestamp
+ ------------------------
+ 2010-09-13 12:32:03+08
(1 row)
```
+- to\_timestamp(string [ DEFAULT return_value ON CONVERSION ERROR ] \[ , fmt [, 'nlsparam' ] ]\)
-- to\_timestamp\(double precision\)
-
- Description: Converts a UNIX century into a timestamp.
+ Description: Converts a string to a timestamp. The default input format is [DD-Mon-YYYY HH12:MI:SS.FF], which is a 12-hour AM format. If the input value string is not in the default format, the user needs to specify their own format in fmt. If the format description is incorrect, an error will be thrown. If part of the string conversion fails, it will attempt to convert the return_value after the keyword DEFAULT (the input format of return_value is constrained by fmt). If Mon is an abbreviation like Jan, the language for the month can be set in nlsparam (currently only supports American and English).
+ * If the input year YYYY=0, the system will throw an error.
+ * If the input year YYYY<0, and SYYYY is specified in fmt, it will correctly output the absolute value of the year BC.
+ * Parameters in fmt that are similar to MM cannot mix case.
+ * The delimiters in fmt and the time information in string can be replaced with other symbols. Example: SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+
Return type: timestamp with time zone
Example:
```
- openGauss=# SELECT to_timestamp(1284352323);
+ openGauss=# SHOW nls_timestamp_format;
+ nls_timestamp_format
+ ----------------------------
+ DD-Mon-YYYY HH:MI:SS.FF AM
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('12-sep-2014');
+ to_timestamp
+ ---------------------
+ 2014-09-12 00:00:00
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('01-Jan-2002 10:10:10. 123000');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('2002-01-01 10:10:10.123000', 'YYYY-MM-DD HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2002-01-01 10:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('此为错误输入' DEFAULT '11-01-11 14:10:10.123000' ON CONVERSION ERROR,'DD-MM-RR HH24:MI:SS.FF');
+ to_timestamp
+ -------------------------
+ 2011-01-11 14:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp ('01-Jan-03 14:10:10.123000' DEFAULT '11-Jan-11 14:10:10.123000' ON CONVERSION ERROR, 'DD-Mon-RR HH24:MI:SS.FF','NLS_DATE_LANGUAGE = American');
+ to_timestamp
+ -------------------------
+ 2003-01-01 14:10:10.123
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('-1','SYYYY');
to_timestamp
------------------------
- 2010-09-13 12:32:03+08
+ 0001-01-01 00:00:00 BC
+ (1 row)
+ ```
+ ```
+ openGauss=# SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
(1 row)
```
+ ```
+ openGauss=# SELECT to_timestamp('05*Dec^2000', 'DD Mon+YYYY');
+ to_timestamp
+ ---------------------
+ 2000-12-05 00:00:00
+ (1 row)
+ ```
+
diff --git a/content/en/docs/BriefTutorial/installation-of-one-primary-and-one-standby-nodes.md b/content/en/docs/BriefTutorial/installation-of-one-primary-and-one-standby-nodes.md
index fbcb8a3a8fa5ebb3a4765ecca6e1ffeaea92c922..34948a2686631ee52af6e3f401ccc4c1b7cece12 100644
--- a/content/en/docs/BriefTutorial/installation-of-one-primary-and-one-standby-nodes.md
+++ b/content/en/docs/BriefTutorial/installation-of-one-primary-and-one-standby-nodes.md
@@ -19,7 +19,7 @@
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
4. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/en/docs/BriefTutorial/installation-on-a-single-node.md b/content/en/docs/BriefTutorial/installation-on-a-single-node.md
index c045c63ba6d8b2d9411871318b0b54b542c33786..ed2fc8babad94bc94e1c53230e183e47bf1e9856 100644
--- a/content/en/docs/BriefTutorial/installation-on-a-single-node.md
+++ b/content/en/docs/BriefTutorial/installation-on-a-single-node.md
@@ -16,7 +16,7 @@
3. Log in to the host where the openGauss package is installed as user **omm** and decompress the openGauss package to the installation directory (for example, **/opt/software/openGauss**).
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
4. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md b/content/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
index ec7c5ec98bc79191f063fec569c4a32399b940fd..158b297cc15e93b0a1a89dbb3109de0fcf16c8c1 100644
--- a/content/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
+++ b/content/en/docs/BriefTutorial/obtaining-and-verifying-an-installation-package.md
@@ -12,7 +12,7 @@
```
mkdir openGauss
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 –C openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 –C openGauss
ls -lb openGauss/
```
diff --git a/content/en/docs/BriefTutorial/operators.md b/content/en/docs/BriefTutorial/operators.md
index 23d678598f3f60ce24189e65e314f0fa428f438c..243e5220da91eb844411977f3839daaa6f41a14e 100644
--- a/content/en/docs/BriefTutorial/operators.md
+++ b/content/en/docs/BriefTutorial/operators.md
@@ -156,6 +156,8 @@ An operator in openGauss is a reserved keyword or character, and it is generally
Description: Factorial
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -170,6 +172,8 @@ An operator in openGauss is a reserved keyword or character, and it is generally
Description: Factorial \(prefix operator\)
+ WARNING: unsupported in b compatibility mode
+
Example:
```
diff --git a/content/en/docs/BriefTutorial/preparing-the-software-and-hardware-installation-environment.md b/content/en/docs/BriefTutorial/preparing-the-software-and-hardware-installation-environment.md
index f87e46f0775c3e12660a35c63b7d50346d6f5854..d732daac020fc63c425fdf0d85d411741326f1d4 100644
--- a/content/en/docs/BriefTutorial/preparing-the-software-and-hardware-installation-environment.md
+++ b/content/en/docs/BriefTutorial/preparing-the-software-and-hardware-installation-environment.md
@@ -63,8 +63,8 @@ Both
Linux OS
-
ARM:
openEuler 20.3 LTS (recommended)
Kirin V10
Asianux 7.5
-
X86:
openEuler 20.3LTS
CentOS 7.6
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
+
ARM:
openEuler 20.03 LTS (recommended)
openEuler 22.03 LTS
Kirin V10
Asianux 7.5
UOS V20
+
X86:
openEuler 20.03 LTS
openEuler 22.03 LTS
CentOS 7.6
Kirin V10
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
diff --git a/content/en/docs/BriefTutorial/stored-procedures.md b/content/en/docs/BriefTutorial/stored-procedures.md
index 79edf02bbd258836c2c28fc8fd5a8f90875207e0..79bf4d9fa233a6c4d8f1b7a79daa5f763317c595 100644
--- a/content/en/docs/BriefTutorial/stored-procedures.md
+++ b/content/en/docs/BriefTutorial/stored-procedures.md
@@ -27,7 +27,8 @@ A stored procedure is a set of SQL statements that can implement a specific func
- Delete a stored procedure.
```
- DROP PROCEDURE procedure_name ;
+ DROP PROCEDURE [ IF EXISTS ] procedure_name
+ [ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];
```
diff --git a/content/en/docs/DatabaseAdministrationGuide/querying-audit-results.md b/content/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
index c6eb7b6f39fde0218c1d84ea9799781fd02915c7..a130b99bd29f96179b705be4d40b9c6eb2953906 100644
--- a/content/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
+++ b/content/en/docs/DatabaseAdministrationGuide/querying-audit-results.md
@@ -46,15 +46,15 @@
3. Run the following command to query the audit record:
```
- openGauss=# select * from pg_query_audit('2021-03-04 08:00:00','2021-03-04 17:00:00');
+ openGauss=# select * from pg_query_audit('2024-07-12 08:00:00','2024-07-12 17:00:00');
```
The command output is similar to the following:
```
- time | type | result | userid | username | database | client_conninfo | object_name | detail_info | node_name | thread_id | local_port | remote_port
+ time | type | result | userid | username | database | client_conninfo | object_name | detail_info | node_name | thread_id | local_port | remote_port | sha_code | verify_result
------------------------+----------------+--------+--------+-----------+-----------+-------------------------+-------------------+--------------+-------------------+---------------------------------+------------+-------------
- 2021-03-04 08:00:08+08 | login_success | ok | 10 | omm | postgres | gsql@::1 | postgres | login db(postgres) success, SSL=off | dn_6001_6002_6003 | 140477687527168@668131208211425 |17778 | 46946
+ 2024-07-12 16:22:43+08 | login_success | ok | 10 | omm | postgres | gsql@::1 | postgres | login db(postgres) success,the current user is:omm, SSL=off | node1 | 139658603525888@774087763979298 | 5433 | 38964 | 73ead146da25a77ca01fc21204b74de99b55d499756438d0dc090e674d315bca | t
```
This record indicates that user **omm** logs in to database **postgres** at the time specified by the **time** column. After the host specified by **log\_hostname** is started and a client is connected to its IP address, the host name found by reverse DNS resolution is displayed following the at sign \(@\) in the value of **client\_conninfo**.
diff --git a/content/en/docs/DatabaseOMGuide/before-you-start.md b/content/en/docs/DatabaseOMGuide/before-you-start.md
index 31aa59db1a4d9e4d46b71f30f810f5e98d3b8ca4..7b6131c8e46bfc45fc44b2468d3d34d9142b6e68 100644
--- a/content/en/docs/DatabaseOMGuide/before-you-start.md
+++ b/content/en/docs/DatabaseOMGuide/before-you-start.md
@@ -12,11 +12,11 @@ This section describes how to select an upgrade mode.
You can determine whether to upgrade the existing system based on the new features provided by the openGauss and the current database status.
-Currently, in-place upgrade and gray upgrade are supported. The upgrade modes are classified into major version upgrade and minor version upgrade. A minor version upgrade is one during which the version number remains unchanged. Otherwise, the upgrade is a major version upgrade. View the version number of the upgrade software package in the second line of the **version.cfg** file in the upgrade package. You can view the version of the current version in the second line of the **upgrade_version** file in *$GAUSSHOME***/bin**.
+Currently, gray upgrade are supported. The upgrade modes are classified into major version upgrade and minor version upgrade. A minor version upgrade is one during which the version number remains unchanged. Otherwise, the upgrade is a major version upgrade. View the version number of the upgrade software package in the second line of the **version.cfg** file in the upgrade package. You can view the version of the current version in the second line of the **upgrade_version** file in *$GAUSSHOME***/bin**.
After you select an upgrade mode, the system automatically determines and selects a proper upgrade policy.
-In-place upgrade: During the upgrade, services must be stopped and all nodes must be upgraded at a time.
+In-place upgrade: During the upgrade, services must be stopped and all nodes must be upgraded at a time. (Starting from version 6.0.0, the In-place upgrade function will no longer be maintained, and gray upgrade will be used by default.)
Gray upgrade: supports operations on all service during the upgrade and upgrades all nodes at a time. \(This function is supported in versions later than openGauss 1.1.0.\)
@@ -30,28 +30,126 @@ Gray upgrade: based on gray upgrade, supports to upgrade the specified nodes, su
-
Version
-
-
Upgrade Description
-
+
+
+
Base \ Upgrade
+
3.0.0
+
3.0.3
+
3.0.5
+
5.0.0
+
5.0.1
+
5.0.2
+
5.0.3
+
6.0.0RC1
+
6.0.0
-
Versions earlier than openGauss 1.0.1
-
-
It can be upgraded to any version earlier than openGauss 1.0.1.
-
+
+
2.0.0
+
√
+
√
+
√
+
√
+
√
+
√
+
√
+
√
+
√
-
openGauss 1.0.1
-
-
It can be upgraded to openGauss 1.1.0.
-
+
+
3.0.0
+
+
√
+
√
+
√
+
√
+
√
+
√
+
√
+
√
-
openGauss 1.1.0 and later
-
-
It can be upgraded to any version form openGauss 1.1.0 to openGauss 3.1.0 (exclusive).
-
+
3.0.3
+
+
+
√
+
√
+
√
+
√
+
√
+
√
+
√
-
-
+
3.0.5
+
+
+
+
✕
+
✕
+
√
+
√
+
√
+
√
+
+
+
5.0.0
+
+
+
+
+
√
+
√
+
√
+
√
+
√
+
+
+
5.0.1
+
+
+
+
+
+
√
+
√
+
√
+
√
+
+
+
5.0.2
+
+
+
+
+
+
+
√
+
✕
+
√
+
+
+
5.0.3
+
+
+
+
+
+
+
+
✕
+
√
+
+
+
6.0.0RC1
+
+
+
+
+
+
+
+
+
√
+
+
> **NOTE:**
diff --git a/content/en/docs/DatabaseOMGuide/flashback-restoration.md b/content/en/docs/DatabaseOMGuide/flashback-restoration.md
index 1f66a9f5f83437d982feb6f99b276475320011f7..946e05b1b8b4ed97e74e9af90cae3591af8c6d5a 100644
--- a/content/en/docs/DatabaseOMGuide/flashback-restoration.md
+++ b/content/en/docs/DatabaseOMGuide/flashback-restoration.md
@@ -101,7 +101,8 @@ Flashback truncate enables you to restore tables that are truncated by mistake a
### Prerequisites
- The **enable\_recyclebin** parameter has been set for enabling the recycle bin.
-- The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+- The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired
+objects cannot be used to do flashback operations.
### Syntax
diff --git a/content/en/docs/DatabaseOMGuide/performance-deterioration-caused-by-dirty-page-flushing-efficiency-during-tpc-c-high-concurrency-long-term-stable-running.md b/content/en/docs/DatabaseOMGuide/performance-deterioration-caused-by-dirty-page-flushing-efficiency-during-tpc-c-high-concurrency-long-term-stable-running.md
index 10c7ce51e8d766956c1a492d29214b7b5f0b72fb..d329b4d26f0a1bd587097a0ef3c1c217d8ca3254 100644
--- a/content/en/docs/DatabaseOMGuide/performance-deterioration-caused-by-dirty-page-flushing-efficiency-during-tpc-c-high-concurrency-long-term-stable-running.md
+++ b/content/en/docs/DatabaseOMGuide/performance-deterioration-caused-by-dirty-page-flushing-efficiency-during-tpc-c-high-concurrency-long-term-stable-running.md
@@ -11,7 +11,7 @@ Generally, you can analyze the specific cause by checking the process status and
## Solution
1. Reduce the concurrency or increase the value of **shared_buffers**.
-2. Adjust dirty page parameters. In scenarios where doublewrite is enabled, you can adjust parameters such as **page\_writer\_sleep** (downward adjustment) and **max\_io\_capacity** (upward adjustment) to improve dirty page elimination efficiency.
+2. Adjust dirty page parameters. In scenarios where doublewrite is enabled, you can adjust parameters such as **pagewriter\_sleep** (downward adjustment) and **max\_io\_capacity** (upward adjustment) to improve dirty page elimination efficiency.
3. Replace high-performance disks (such as NVMe disks).
The resources occupied by the database must meet the service requirements. In a high-concurrency test, you need to add resources to ensure that database services are available.
diff --git a/content/en/docs/DatabaseOMGuide/performing-the-upgrade.md b/content/en/docs/DatabaseOMGuide/performing-the-upgrade.md
index 1fa430468dc051fcb717f596ffcc6d53ec663106..9c9b8fcf02d5f91eca79aff4a09079c524f92d6d 100644
--- a/content/en/docs/DatabaseOMGuide/performing-the-upgrade.md
+++ b/content/en/docs/DatabaseOMGuide/performing-the-upgrade.md
@@ -1,6 +1,6 @@
# Performing the Upgrade
-This section describes how to perform the in-place upgrade and gray upgrade.
+This section describes how to perform the gray upgrade.
## Procedure
@@ -18,7 +18,7 @@ This section describes how to perform the in-place upgrade and gray upgrade.
cd /opt/software/gaussdb_upgrade/script
```
-5. Execute the **gs\_preinstall** script before in-place upgrade or gray upgrade.
+5. Execute the **gs\_preinstall** script before gray upgrade.
```
./gs_preinstall -U omm -G dbgrp -X /opt/software/GaussDB_Kernel/clusterconfig.xml
@@ -30,15 +30,9 @@ This section describes how to perform the in-place upgrade and gray upgrade.
su - omm
```
-7. If the database is normal, run the following command to perform the in-place upgrade or gray upgrade:
+7. If the database is normal, run the following command to perform the gray upgrade:
- Example 1: Use the **gs\_upgradectl** script to perform an in-place upgrade.
-
- ```
- gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml
- ```
-
- Example 2: Execute the **gs\_upgradectl** script to perform a gray upgrade.
+ Example 1: Execute the **gs\_upgradectl** script to perform a gray upgrade.
```
gs_upgradectl -t auto-upgrade -X /opt/software/GaussDB_Kernel/clusterconfig.xml --grey
diff --git a/content/en/docs/DatabaseOMGuide/rolling-back-the-upgrade-version.md b/content/en/docs/DatabaseOMGuide/rolling-back-the-upgrade-version.md
index c07a571f25e1973a1a8e9d262eea493fbda4229e..0e52bd31ccd915ab58a83b4c183e679d487968fa 100644
--- a/content/en/docs/DatabaseOMGuide/rolling-back-the-upgrade-version.md
+++ b/content/en/docs/DatabaseOMGuide/rolling-back-the-upgrade-version.md
@@ -12,11 +12,8 @@ This section describes how to roll back to the source version.
```
> **NOTE:**
- >If the database is abnormal, run the following command to forcibly roll back the upgrade:
+ >If the database is abnormal, fix cluseter status and rollback again:
>
- >```
- >gs_upgradectl -t auto-rollback -X /opt/software/GaussDB_Kernel/clusterconfig.xml --force
- >```
>openGauss 3.X uses a new method to establish mutual trust relationship. If openGauss 2.X is upgraded to openGauss 3.X and then rolled back, perform the following steps after the rollback command is executed and before running the gs_preinstall command in the old package:
>
>1. Delete the **/root/gauss\_om/***Database username* \(for example, **omm**\) directory on each node in the cluster.
diff --git a/content/en/docs/DatabaseReference/connection-settings.md b/content/en/docs/DatabaseReference/connection-settings.md
index f3a6a7bd9187df16dfefec217bc3bd560eeeb89f..218249f9ede9e97e732e2489801227d2917b13f8 100644
--- a/content/en/docs/DatabaseReference/connection-settings.md
+++ b/content/en/docs/DatabaseReference/connection-settings.md
@@ -40,7 +40,7 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided
> **NOTE:**
>- When setting the port number, ensure that the port number is not in use. When setting the port numbers of multiple instances, ensure that the port numbers do not conflict.
>- Ports 1 to 1023 are reserved for the operating system. Do not use them.
->- When the database instance is installed using the configuration file, pay attention to the ports reserved in the communication matrix in the configuration file. For example, *dataPortBase* + 1 needs to be reserved as the port used by internal tools, and *dataPortBase* + 6 needs to be reserved as the communication port of the flow engine message queue. Therefore, during database instance installation, the maximum port number is **65529** for DNs. Ensure that the port number does not conflict with each other.
+>- When the database instance is installed using the configuration file, pay attention to the ports reserved in the communication matrix in the configuration file. For example, *dataPortBase* + 1 needs to be reserved as the port used by internal tools.
>- After changing the port number by using gs_guc set, you need to manually modify the port information in the static configuration file **static_config_files** for the change to take effect.
**Default value**: **5432** \(The actual value is specified in the configuration file during installation.\)
diff --git a/content/en/docs/DatabaseReference/enabling-write-statements-on-standby-nodes.md b/content/en/docs/DatabaseReference/enabling-write-statements-on-standby-nodes.md
index 8ca855371d275cdfd3c2197a32a7d3d33dcbcc53..c7413354764ff7fb0d27ced29b007dde0141ca3c 100644
--- a/content/en/docs/DatabaseReference/enabling-write-statements-on-standby-nodes.md
+++ b/content/en/docs/DatabaseReference/enabling-write-statements-on-standby-nodes.md
@@ -1,6 +1,6 @@
# Enabling Write Statements on Standby Nodes
-## enable\_remote\_excute
+## enable\_remote\_execute
**Parameter description:** Determines whether to allow the standby node to execute write statements. This parameter cannot be modified after being started.
@@ -11,7 +11,7 @@ This parameter is a POSTMASTER parameter. Set it based on instructions provided
**Default value**: **off**
> **NOTE:**
->- The default value of **enable\_remote\_excute** is **false** in standalone mode.
+>- The default value of **enable\_remote\_execute** is **false** in standalone mode.
>- To allow the standby node to execute write statements, set this parameter to **true**.
>- After this function is enabled, write statements and DDL statements can be executed on the standby node, and simple and extended queries are supported. In this case, read statements are still executed on the standby node, and write statements are forwarded to the primary node for execution.
>- After this function is enabled, the standby node unconditionally forwards all SQL statements, including read statements, to the primary node after starting a transaction.
diff --git a/content/en/docs/DatabaseReference/flashback.md b/content/en/docs/DatabaseReference/flashback.md
index 3829cd07ca989551a53c4634037173406dbdaf27..8c601b6dba47f1d7f110417c43c66e2cf7643004 100644
--- a/content/en/docs/DatabaseReference/flashback.md
+++ b/content/en/docs/DatabaseReference/flashback.md
@@ -17,7 +17,8 @@ This parameter is a SIGHUP parameter. Set it based on instructions provided in
## recyclebin\_retention\_time
-**Parameter description**: Specifies the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+**Parameter description**: Specifies the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired
+objects cannot be used to do flashback operations.
This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846).
diff --git a/content/en/docs/DatabaseReference/gs_wlm_user_resource_history.md b/content/en/docs/DatabaseReference/gs_wlm_user_resource_history.md
index e1a0f2e90b0f5f55013fade1b80840f453212209..09c4384b274c5ee1f9cff1e90167eed36045592b 100644
--- a/content/en/docs/DatabaseReference/gs_wlm_user_resource_history.md
+++ b/content/en/docs/DatabaseReference/gs_wlm_user_resource_history.md
@@ -31,7 +31,7 @@
integer
-
Size of the memory being used, in MB
+
Size of the memory being used(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB
total_memory
@@ -45,7 +45,7 @@
real
-
Number of CPU cores in use
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
total_cpu
@@ -73,70 +73,70 @@
bigint
-
Used temporary storage space, in KB
+
Used temporary storage space(Reserved field, not in use yet.), in KB
total_temp_space
bigint
-
Available temporary storage space, in KB. The value –1 indicates that the maximum temporary storage space is not limited.
+
Available temporary storage space(Reserved field, not in use yet.), in KB. The value –1 indicates that the maximum temporary storage space is not limited.
used_spill_space
bigint
-
Used space of operator flushing, in KB
+
Used space of operator flushing(Reserved field, not in use yet.), in KB
total_spill_space
bigint
-
Available storage space for operator flushing, in KB. The value –1 indicates that the maximum operator flushing space is not limited.
+
Available storage space for operator flushing(Reserved field, not in use yet.), in KB. The value –1 indicates that the maximum operator flushing space is not limited.
read_kbytes
bigint
-
Byte traffic of read operations in a monitoring period, in KB
+
Byte traffic of read operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB
write_kbytes
bigint
-
Byte traffic of write operations in a monitoring period, in KB
+
Byte traffic of write operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB
read_counts
bigint
-
Number of read operations in a monitoring period
+
Number of read operations in a monitoring period(Not supported currently, available only in distributed mode.)
write_counts
bigint
-
Number of write operations in a monitoring period
+
Number of write operations in a monitoring period(Not supported currently, available only in distributed mode.)
read_speed
real
-
Byte rate of read operations in a monitoring period, in KB/s
+
Byte rate of read operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB/s
write_speed
real
-
Byte rate of write operations in a monitoring period, in KB/s
+
Byte rate of write operations in a monitoring period(Not supported currently, available only in distributed mode.), in KB/s
diff --git a/content/en/docs/DatabaseReference/parameters-related-to-cm_agent.md b/content/en/docs/DatabaseReference/parameters-related-to-cm_agent.md
index 2a157cf8490bd526a2850d25fa8587bdbef62cb7..abb0abd3951c502bef6a62ac6b49518f770da57a 100644
--- a/content/en/docs/DatabaseReference/parameters-related-to-cm_agent.md
+++ b/content/en/docs/DatabaseReference/parameters-related-to-cm_agent.md
@@ -125,7 +125,7 @@
## upgrade\_from
-**Parameter description**: Specifies the internal version number of the database before an in-place upgrade. Do not modify the value of this parameter.
+**Parameter description**: Specifies the internal version number of the database before an upgrade. Do not modify the value of this parameter.
**Value range**: a non-negative integer You need to restart **cm\_agent** for the modification to take effect. For details about how to modify this parameter, see [Table 2](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t290c8f15953843db8d8e53d867cd893d).
diff --git a/content/en/docs/DatabaseReference/pg_constraint.md b/content/en/docs/DatabaseReference/pg_constraint.md
index 9b110e8cb80d08385690e69bf5bcd0a50d6ad232..85acfcce75f54d7df38d8c55ebe385ab1ac7e56f 100644
--- a/content/en/docs/DatabaseReference/pg_constraint.md
+++ b/content/en/docs/DatabaseReference/pg_constraint.md
@@ -212,6 +212,13 @@
Not for constraint, but will be included in the attribute column of INDEX.
+
condisable
+
+
boolean
+
+
Whether the constraint is disable Currently, it can be set to true only for primary key, unique and check constraints.
+
+
diff --git a/content/en/docs/DatabaseReference/pg_shdescription.md b/content/en/docs/DatabaseReference/pg_shdescription.md
index b8efb360c82ad1fdc5b8c8f36838820392190a84..fea5ce0a766bfc9f0b7dd869f119aacf194459ac 100644
--- a/content/en/docs/DatabaseReference/pg_shdescription.md
+++ b/content/en/docs/DatabaseReference/pg_shdescription.md
@@ -1,6 +1,6 @@
# PG\_SHDESCRIPTION
-**PG\_SHDESCRIPTION** records optional comments for shared database objects. Descriptions can be manipulated with the **COMMENT** command and viewed with psql's **\\d** commands.
+**PG\_SHDESCRIPTION** records optional comments for shared database objects. Descriptions can be manipulated with the **COMMENT** command and viewed with gsql's **\\d** commands.
See also **PG\_DESCRIPTION**, which provides a similar function for descriptions involving objects within a single database.
diff --git a/content/en/docs/DatabaseReference/pg_total_user_resource_info.md b/content/en/docs/DatabaseReference/pg_total_user_resource_info.md
index 5dbe0b92f1219d6b4755bd93e68a4095c2664e20..6356c671eea406447b11a8e8b263b9a4ba2e53b3 100644
--- a/content/en/docs/DatabaseReference/pg_total_user_resource_info.md
+++ b/content/en/docs/DatabaseReference/pg_total_user_resource_info.md
@@ -24,7 +24,7 @@
integer
-
Used memory, in MB
+
Used memory(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB
total_memory
@@ -66,28 +66,28 @@
bigint
-
Used temporary space, in KB
+
Used temporary space(Reserved field, not in use yet.), in KB
total_temp_space
bigint
-
Total available temporary space, in KB (-1 if the temporary space is not limited)
+
Total available temporary space(Reserved field, not in use yet.), in KB (-1 if the temporary space is not limited)
used_spill_space
bigint
-
Size of the used operator flushing space, in KB
+
Size of the used operator flushing space(Reserved field, not in use yet.), in KB
total_spill_space
bigint
-
Total size of the available operator flushing space, in KB (-1 if the space is not limited)
+
Total size of the available operator flushing space(Reserved field, not in use yet.), in KB (-1 if the space is not limited)
read_kbytes
@@ -96,6 +96,7 @@
Primary database node: total bytes read by the user's complex jobs on all database nodes in the last 5 seconds, in KB
Database node: total bytes read by the user's complex jobs from the instance startup time to the current time, in KB
+
Not supported currently, available only in distributed mode.
write_kbytes
@@ -104,6 +105,7 @@
Primary database node: total bytes written by the user's complex jobs on all database nodes in the last 5 seconds, in KB
Database node: total bytes written by the user's complex jobs from the instance startup time to the current time, in KB
+
Not supported currently, available only in distributed mode.
read_counts
@@ -112,6 +114,7 @@
Primary database node: total number of read times of the user's complex jobs on all database nodes in the last 5 seconds
Database node: total number of read times of the user's complex jobs from the instance startup time to the current time
+
Not supported currently, available only in distributed mode.
write_counts
@@ -120,6 +123,7 @@
Primary database node: total number of write times of the user's complex jobs on all database nodes in the last 5 seconds
Database node: total number of write times of the user's complex jobs from the instance startup time to the current time
+
Not supported currently, available only in distributed mode.
read_speed
@@ -128,6 +132,7 @@
Primary database node: average read rate of the user's complex jobs on a single database node in the last 5 seconds, in KB/s
Database node: average read rate of the user's complex jobs on the database node in the last 5 seconds, in KB/s
+
Not supported currently, available only in distributed mode.
write_speed
@@ -136,6 +141,7 @@
Primary database node: average write rate of the user's complex jobs on a single database node in the last 5 seconds, in KB/s
Database node: average write rate of the user's complex jobs on the database node in the last 5 seconds, in KB/s
+
Not supported currently, available only in distributed mode.
Size of the memory being used(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.), in MB.
total_memory
@@ -38,7 +38,7 @@
double precision
-
Number of CPU cores in use.
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
total_cpu
@@ -66,70 +66,70 @@
bigint
-
Used temporary storage space, in KB.
+
Used temporary storage space(Reserved field, not in use yet.), in KB.
total_temp_space
bigint
-
Total available temporary space, in KB (-1 if the temporary space is not limited).
+
Total available temporary space(Reserved field, not in use yet.), in KB (-1 if the temporary space is not limited).
used_spill_space
bigint
-
Used disk space for spilling, in KB.
+
Used disk space for spilling(Reserved field, not in use yet.), in KB.
total_spill_space
bigint
-
Total available disk space for spilling, in KB. The value -1 indicates that the space is not limited.
+
Total available disk space for spilling(Reserved field, not in use yet.), in KB. The value -1 indicates that the space is not limited.
read_kbytes
bigint
-
Amount of data read from the disk, in KB.
+
Amount of data read from the disk(Not supported currently, available only in distributed mode.), in KB.
write_kbytes
bigint
-
Amount of data written to the disk, in KB.
+
Amount of data written to the disk(Not supported currently, available only in distributed mode.), in KB.
read_counts
bigint
-
Number of disk read times.
+
Number of disk read times(Not supported currently, available only in distributed mode.).
write_counts
bigint
-
Number of disk write times.
+
Number of disk write times(Not supported currently, available only in distributed mode.).
read_speed
double precision
-
Disk read rate, in B/ms.
+
Disk read rate(Not supported currently, available only in distributed mode.), in B/ms.
write_speed
double precision
-
Disk write rate, in B/ms.
+
Disk write rate(Not supported currently, available only in distributed mode.), in B/ms.
diff --git a/content/en/docs/DatabaseReference/platform-and-client-compatibility.md b/content/en/docs/DatabaseReference/platform-and-client-compatibility.md
index d860342eea0892c97c449ddba0741fb3b1206aff..75b283a8756d4604cf834fc3089f3454d6945a30 100644
--- a/content/en/docs/DatabaseReference/platform-and-client-compatibility.md
+++ b/content/en/docs/DatabaseReference/platform-and-client-compatibility.md
@@ -28,16 +28,6 @@ This parameter is a USERSET parameter. Set it based on instructions provided in
**Default value**: **DD-Mon-YYYY HH:MI:SS.FF AM**
-## nls\_length\_semantics
-
-**Parameter description:**:Set the default semantics of the string type, set it to BYTE, calculate the string length by bytes, and set it to CHAR, calculate the string length by characters.
-
-This parameter is a USERSET parameter. Set it based on instructions provided in [Table 1](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846).
-
-**Value range**:a string
-
-**Default value**:BYTE
-
## max\_function\_args
**Parameter description**: Specifies the maximum number of parameters allowed for a function.
@@ -288,6 +278,46 @@ numeric
Controls the performance of substr(str, from, for) in different scenarios. By default, if the value of from is less than 0, substr counts from the end of the string. If the value of for is less than 1, substr returns NULL. After this parameter is enabled, if the value of from is less than 0, substr counts from the first (-from + 1) bit of the character string. If the value of for is less than 0, substr reports an error. This parameter is valid only when **sql_compatibility** is set to **PG**.
+
disable_record_type_in_dml
+
Prohibit inserting virtual columns. After enabling this option will prohibit to use record type variables as insertion values in insert statements.
+
+create table t1(col1 varchar(10),col varchar(10));
+create table t2(col1 varchar(10),col varchar(10));
+set behavior_compat_options='disable_record_type_in_dml';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+ERROR: The record type variable cannot be used as an insertion value.
+CONTEXT: SQL statement "insert into t2 values(source)"
+PL/pgSQL function inline_code_block line 7 at SQL statement
+
+set behavior_compat_options='';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+NOTICE: (one,two)
+NOTICE: (one,two)
+
+
+
diff --git a/content/en/docs/DatabaseReference/statement-behavior.md b/content/en/docs/DatabaseReference/statement-behavior.md
index c7c19aca91e49799e146478e716dfd1056547693..1ed7d709cd573d0ada1e8902a0246da499ffb970 100644
--- a/content/en/docs/DatabaseReference/statement-behavior.md
+++ b/content/en/docs/DatabaseReference/statement-behavior.md
@@ -250,3 +250,17 @@ This parameter is a USERSET parameter. Set it based on instructions provided in
- **off** indicates that case is not ignored when double quotes are used.
**Default value**: **off**
+
+## enable\_pltype\_name\_check
+
+**Parameter description**:
+Sets whether type name checking is performed when assigning a variable with a type name (including RECORD, VARRAY, TABLE OF types, and types created with CREATE TYPE).
+
+This parameter is a USERSET parameter. Set it based on instructions provided in [Table 2](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0283137176_en-us_topic_0237121562_en-us_topic_0059777490_t290c8f15953843db8d8e53d867cd893d).
+
+**Value range**: Boolean
+
+- **on** Indicates check type names.
+- **off** Indicates do not check type names.
+
+**Default value**: **off**
\ No newline at end of file
diff --git a/content/en/docs/ExtensionReference/dolphin-alter-table.md b/content/en/docs/ExtensionReference/dolphin-alter-table.md
index 3bd165552e6adb553ec557be0407afddf7a8d925..8be3ac04535601339a3cdb2754951d047ce5a80e 100644
--- a/content/en/docs/ExtensionReference/dolphin-alter-table.md
+++ b/content/en/docs/ExtensionReference/dolphin-alter-table.md
@@ -101,7 +101,7 @@ Modifies tables, including modifying table definitions, renaming tables, renamin
- **DROP PRIMARY KEY [ RESTRICT | CASCADE ]**
- Deletes the foreign key of a table.
+ Deletes the primary key of a table.
- **DROP FOREIGN KEY foreign_key_name [ RESTRICT | CASCADE ]**
diff --git a/content/en/docs/ExtensionReference/dolphin-create-table-partition.md b/content/en/docs/ExtensionReference/dolphin-create-table-partition.md
index a8ef4fe8914b0f0ffc7ec9c29a2f005f5d4c4fb7..c5b4194639d4c648f0994d110158ce783ae2d75c 100644
--- a/content/en/docs/ExtensionReference/dolphin-create-table-partition.md
+++ b/content/en/docs/ExtensionReference/dolphin-create-table-partition.md
@@ -88,6 +88,7 @@ Where create\_option is:
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
@@ -100,6 +101,7 @@ Where create\_option is:
PRIMARY KEY ( column_name [, ... ] ) index_parameters |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
@@ -467,6 +469,13 @@ Where create\_option is:
Only one primary key can be specified for a table.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
They determine whether the constraint is deferrable. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/en/docs/ExtensionReference/dolphin-guc-parameters.md b/content/en/docs/ExtensionReference/dolphin-guc-parameters.md
index 034bafccda44c43b38aed87f749f51f46016c56a..f5574eaaaa6034480ccbb663346f5551a730d958 100644
--- a/content/en/docs/ExtensionReference/dolphin-guc-parameters.md
+++ b/content/en/docs/ExtensionReference/dolphin-guc-parameters.md
@@ -50,6 +50,8 @@ Parameter description: The parameter value is a character string separated by co
| \l[+] | Lists the names, owners, character set encodings, and permissions of all the databases in the server.|
| \z [PATTERN] | Lists all tables, views, and sequences in the database and their access permissions. |
+7. no\_auto\_value\_on\_zero: affects handling of AUTO_INCREMENT columns. Normally, you generate the next sequence number for the column by inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO suppresses this behavior for 0 so that only NULL generates the next sequence number.
+
This parameter is a SIGHUP parameter. Set it based on instructions provided in [Table 1](../DatabaseAdministrationGuide/resetting-parameters.md#en-us_topic_0237121562_en-us_topic_0059777490_t91a6f212010f4503b24d7943aed6d846).
**Value range**: a string
@@ -332,4 +334,4 @@ This parameter is a USERSET parameter. Set it based on instructions provided in
- **on** indicates that the new compatibility function is used.
- **off** indicates that the compatibility function is disabled and the original kernel functions are used.
-**Default value**: **off**
\ No newline at end of file
+**Default value**: **off**
diff --git a/content/en/docs/ExtensionReference/dolphin-show-character-set.md b/content/en/docs/ExtensionReference/dolphin-show-character-set.md
index 76307c0d38539484025a26f93b2b970b2e464256..f83cce48b9ebb41503bd8392d5b913f1749d378f 100644
--- a/content/en/docs/ExtensionReference/dolphin-show-character-set.md
+++ b/content/en/docs/ExtensionReference/dolphin-show-character-set.md
@@ -1,4 +1,4 @@
-# SHOW CHARACTER SET
+# SHOW CHARACTER SET/SHOW CHARSET
## Precautions
@@ -42,4 +42,12 @@ openGauss=# SHOW CHARACTER SET LIKE 'a%';
abc | alias for WIN1258 | | 1
alt | alias for WIN866 | | 1
(2 rows)
+
+
+openGauss=# SHOW CHARSET LIKE 'a%';
+ charset | Description | default collation | maxlen
+---------+-------------------+-------------------+--------
+ abc | alias for WIN1258 | | 1
+ alt | alias for WIN866 | | 1
+(2 rows)
```
diff --git a/content/en/docs/ExtensionReference/dolphin-show_privileges.md b/content/en/docs/ExtensionReference/dolphin-show_privileges.md
index 5abed31abba99e18724f1f01edad538ab877ebd4..faa2a55f601d0de5233fb79eeb9ebd032c5296d1 100644
--- a/content/en/docs/ExtensionReference/dolphin-show_privileges.md
+++ b/content/en/docs/ExtensionReference/dolphin-show_privileges.md
@@ -40,6 +40,7 @@ opengauss=# show privileges;
Create any package | Package | To create any package
Create any sequence | Sequence | To create any sequence
Create any synonym | Synonym | To create any synonym
+ Create public synonym| Synonym | To create public synonym
Create any table | Table | To create any table
Create any trigger | Trigger | To create any trigger
Create any type | Type | To create any type
@@ -47,6 +48,7 @@ opengauss=# show privileges;
Delete any table | Table | To delete any table
Drop any sequence | Sequence | To drop any sequence
Drop any synonym | Synonym | To drop any synonym
+ Drop public synonym | Synonym | To drop public synonym
Drop any table | Table | To drop any table
Drop any trigger | Trigger | To drop any trigger
Drop any type | Type | To drop any type
diff --git a/content/en/docs/ExtensionReference/dolphin-sql-syntax.md b/content/en/docs/ExtensionReference/dolphin-sql-syntax.md
index c8682a52b091fb85d1156d93979a340953b97335..d69229aab0fd5663d835f1c25d1b7ffa65bf4d05 100644
--- a/content/en/docs/ExtensionReference/dolphin-sql-syntax.md
+++ b/content/en/docs/ExtensionReference/dolphin-sql-syntax.md
@@ -42,6 +42,7 @@
- **[SELECT](dolphin-SELECT.md)**
- **[SET CHARSET](dolphin-SET-CHARSET.md)**
- **[SET PASSWORD](dolphin-SET-PASSWORD.md)**
+- **[SHOW CHARSET](dolphin-show-character-set.md)**
- **[SHOW CHARACTER SET](dolphin-show-character-set.md)**
- **[SHOW COLLATION](dolphin-show-collation.md)**
- **[SHOW COLUMNS](dolphin-show_columns.md)**
diff --git a/content/en/docs/GettingStarted/container-based-installation-on-a-single-node.md b/content/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
index e96e4f56ef0b847864e4d79978a6c9dab66f8559..627a1d6e7dc021e6227211bca2d7f162cbae99f7 100644
--- a/content/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
+++ b/content/en/docs/GettingStarted/container-based-installation-on-a-single-node.md
@@ -16,16 +16,16 @@ Use the **buildDockerImage.sh** script to build a Docker image. This script is
> **NOTE:**
>
-> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-***X.X.X***-CentOS-64bit.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
+> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
>
> - If the **-i** option is not specified when you run the **buildDockerImage.sh** script, the SHA-256 check is performed by default. You need to manually write the check result to the **sha256\_file\_amd64** file.
> ```
## Modify the SHA-256 verification file.
- cd /soft/openGauss-server/docker/dockerfiles/3.0.0
- sha256sum openGauss-3.0.0-CentOS-64bit.tar.bz2 > sha256_file_amd64
+ cd /soft/openGauss-server/docker/dockerfiles/6.0.0
+ sha256sum openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2 > sha256_file_amd64
> ```
-> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/3.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
+> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/6.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
> ```
wget -O openEuler_aarch64.repo https://mirrors.huaweicloud.com/repository/conf/openeuler_aarch64.repo
@@ -39,7 +39,7 @@ Usage: buildDockerImage.sh -v [version] [-i] [Docker build option]
Builds a Docker Image for openGauss
Parameters:
-v: version to build
- Choose one of: 3.0.0
+ Choose one of: 6.0.0
-i: ignores the SHA-256 checksums
LICENSE UPL 1.0
@@ -74,26 +74,26 @@ Specifies the database port. The default value is **5432**.
## Starting an Instance
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:6.0.0
```
## Connecting to the Database from the OS Layer
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:2.0.0
-$ gsql -d postgres -U gaussdb -W'Enmo@123' -h your-host-ip -p8888
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:6.0.0
+$ gsql -d postgres -U gaussdb -W'Enmo@123' -h your-host-ip -p8888 # OS need install gsql client
```
## Data Persistence
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:6.0.0
```
>**Note**
>
->1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/3.0.0`. You only need to change the version number to the corresponding version number.
+>1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/6.0.0`. You only need to change the version number to the corresponding version number.
>
->2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `http://121.36.97.194/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
+>2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `https://repo.openeuler.org/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
>
>3. During the build, if the yum source download times out, check the proxy. You can also `--network host` to the end of the `docker build` command in the `buildDockerImage.sh` script to use the network of the host machine.
diff --git a/content/en/docs/GettingStarted/installation-on-a-single-node.md b/content/en/docs/GettingStarted/installation-on-a-single-node.md
index c045c63ba6d8b2d9411871318b0b54b542c33786..ed2fc8babad94bc94e1c53230e183e47bf1e9856 100644
--- a/content/en/docs/GettingStarted/installation-on-a-single-node.md
+++ b/content/en/docs/GettingStarted/installation-on-a-single-node.md
@@ -16,7 +16,7 @@
3. Log in to the host where the openGauss package is installed as user **omm** and decompress the openGauss package to the installation directory (for example, **/opt/software/openGauss**).
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
4. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/en/docs/GettingStarted/installation.md b/content/en/docs/GettingStarted/installation.md
index 446ede8bc8e1ecd8574083b7833d8ca12dd70026..664ce4e53d5d188783933ad9352f6bf3b9fd80eb 100644
--- a/content/en/docs/GettingStarted/installation.md
+++ b/content/en/docs/GettingStarted/installation.md
@@ -2,7 +2,7 @@
openGauss supports simplified installation using scripts.
-- **[Preparing Installation](#Preparing-Installation.md)**
+- **[Preparing for Installation](preparing-for-installation.md)**
- **[Container-based Installation on a Single Node ](container-based-installation-on-a-single-node.md)**
diff --git a/content/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md b/content/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
index ec7c5ec98bc79191f063fec569c4a32399b940fd..158b297cc15e93b0a1a89dbb3109de0fcf16c8c1 100644
--- a/content/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
+++ b/content/en/docs/GettingStarted/obtaining-and-verifying-an-installation-package.md
@@ -12,7 +12,7 @@
```
mkdir openGauss
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 –C openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 –C openGauss
ls -lb openGauss/
```
diff --git a/content/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md b/content/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
index f87e46f0775c3e12660a35c63b7d50346d6f5854..d732daac020fc63c425fdf0d85d411741326f1d4 100644
--- a/content/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
+++ b/content/en/docs/GettingStarted/preparing-the-software-and-hardware-installation-environment.md
@@ -63,8 +63,8 @@ Both
Linux OS
-
ARM:
openEuler 20.3 LTS (recommended)
Kirin V10
Asianux 7.5
-
X86:
openEuler 20.3LTS
CentOS 7.6
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
+
ARM:
openEuler 20.03 LTS (recommended)
openEuler 22.03 LTS
Kirin V10
Asianux 7.5
UOS V20
+
X86:
openEuler 20.03 LTS
openEuler 22.03 LTS
CentOS 7.6
Kirin V10
Asianux 7.6
Note:
The current installation package can be used only on the English operating system. Set Disk Cache Policy to Disabled to avoid data loss in an unexpected power-off.
diff --git a/content/en/docs/InstallationGuide/installation-on-a-single-node.md b/content/en/docs/InstallationGuide/installation-on-a-single-node.md
index 95bac560bbdb6c1cb99586f337cab61f977c51b7..0a8b626b3b8e6507d2c1d27f971e3029467a8ec2 100644
--- a/content/en/docs/InstallationGuide/installation-on-a-single-node.md
+++ b/content/en/docs/InstallationGuide/installation-on-a-single-node.md
@@ -13,7 +13,7 @@
1. Log in to the host where the openGauss package is installed as a common user and decompress the openGauss package to the installation directory.
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
2. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/en/docs/InstallationGuide/installation-on-a-single-node_container.md b/content/en/docs/InstallationGuide/installation-on-a-single-node_container.md
index 45e43fcf8055a88cde556169897a6158a1bac7ec..9bfba234ee73bfddd2d1a3c88a7532aee9c10d46 100644
--- a/content/en/docs/InstallationGuide/installation-on-a-single-node_container.md
+++ b/content/en/docs/InstallationGuide/installation-on-a-single-node_container.md
@@ -16,16 +16,16 @@ Use the **buildDockerImage.sh** script to build a Docker image. This script is
> **NOTE:**
>
-> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-***X.X.X***-CentOS-64bit.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
+> - Before the installation, you need to provide the openGauss binary installation package. After decompressing the package, place the package \(**openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2**\) in the **dockerfiles/**<*version*\> folder. The binary package can be downloaded from [https://opengauss.org/en/download/](https://opengauss.org/en/download/). Ensure that the correct yum source is available.
>
> - If the **-i** option is not specified when you run the **buildDockerImage.sh** script, the SHA-256 check is performed by default. You need to manually write the check result to the **sha256\_file\_amd64** file.
> ```
## Modify the SHA-256 verification file.
- cd /soft/openGauss-server/docker/dockerfiles/3.0.0
- sha256sum openGauss-3.0.0-CentOS-64bit.tar.bz2 > sha256_file_amd64
+ cd /soft/openGauss-server/docker/dockerfiles/6.0.0
+ sha256sum openGauss-Server-X.X.X-CentOS7-x86_64.tar.bz2 > sha256_file_amd64
> ```
-> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/3.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
+> - Before the installation, obtain the **openEuler\_aarch64.repo** file from Huawei open-source image website and save it to the **openGauss-server-master/docker/dockerfiles/6.0.0** folder. Run the following command to obtain the **openEuler\_aarch64.repo** file.
> ```
wget -O openEuler_aarch64.repo https://mirrors.huaweicloud.com/repository/conf/openeuler_aarch64.repo
@@ -39,7 +39,7 @@ Usage: buildDockerImage.sh -v [version] [-i] [Docker build option]
Builds a Docker Image for openGauss
Parameters:
-v: version to build
- Choose one of: 3.0.0
+ Choose one of: 6.0.0
-i: ignores the SHA-256 checksums
LICENSE UPL 1.0
@@ -74,26 +74,26 @@ Specifies the database port. The default value is **5432**.
## Starting an Instance
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 opengauss:6.0.0
```
## Connecting to the Database from the OS Layer
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -p8888:5432 opengauss:6.0.0
$ gsql -d postgres -U gaussdb -W'Enmo@123' -h your-host-ip -p8888
```
## Data Persistence
```
-$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:2.0.0
+$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:6.0.0
```
>**Note**
>
->1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/3.0.0`. You only need to change the version number to the corresponding version number.
+>1. For details about how to use a database of another version to build a container image, see the configuration file in `openGauss-server/docker/dockerfiles/6.0.0`. You only need to change the version number to the corresponding version number.
>
->2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `http://121.36.97.194/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
+>2. If the `openeuler-20.03-lts:latest` image cannot be downloaded, download the container image package `openEuler-docker.aarch64.tar.xz` from the OpenEuler official website `https://repo.openeuler.org/openEuler-20.03-LTS/docker_img/aarch64/` and use `docker load -i openEuler-docker.aarch64.tar.xz` to import the package to the local image list.
>
>3. During the build, if the yum source download times out, check the proxy. You can also `--network host` to the end of the `docker build` command in the `buildDockerImage.sh` script to use the network of the host machine.
diff --git a/content/en/docs/InstallationGuide/installation-on-primary-standby-nodes.md b/content/en/docs/InstallationGuide/installation-on-primary-standby-nodes.md
index 4526d9b5cb7d223304079fa4a7ac05a3e0686f11..dd7669c4280fee808e38b9279ad22087c5cf5301 100644
--- a/content/en/docs/InstallationGuide/installation-on-primary-standby-nodes.md
+++ b/content/en/docs/InstallationGuide/installation-on-primary-standby-nodes.md
@@ -13,7 +13,7 @@
1. Log in to the host where the package is installed as a common user and decompress the openGauss package to the installation directory.
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2 -C /opt/software/openGauss
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2 -C /opt/software/openGauss
```
2. Assume that the decompressed package is stored in the **/opt/software/openGauss** directory. Go to the **simpleInstall** directory.
diff --git a/content/en/docs/InstallationGuide/obtaining-and-verifying-an-installation-package.md b/content/en/docs/InstallationGuide/obtaining-and-verifying-an-installation-package.md
index e9f920f67d8cb82e8cb51d54eb8eea77e4df0783..7b2e2dfcd57940f735c22a445f070cf4ae52bba4 100644
--- a/content/en/docs/InstallationGuide/obtaining-and-verifying-an-installation-package.md
+++ b/content/en/docs/InstallationGuide/obtaining-and-verifying-an-installation-package.md
@@ -14,7 +14,7 @@ You can obtain the installation package from the openGauss open-source community
Decompress the installation package and check whether the installation directory and files are complete. Run the following commands in the directory where the installation package is stored:
```
- tar -zxvf openGauss-x.x.x-openEuler-64bit.tar-all.gz
+ tar -zxvf openGauss-All-x.x.x-openEuler20.03-x86_64.tar.gz
ls -lb
```
@@ -22,10 +22,10 @@ You can obtain the installation package from the openGauss open-source community
```
total 50M
- -rw------- 1 root root 65 Dec 25 15:34 openGauss-x.x.x-openEuler-64bit-om.sha256
- -rw------- 1 root root 12910775 Dec 25 15:34 openGauss-x.x.x-openEuler-64bit-om.tar.gz
- -rw------- 1 root root 65 Dec 25 15:34 openGauss-x.x.x-openEuler-64bit.sha256
- -rw------- 1 root root 73334256 Dec 25 15:34 openGauss-x.x.x-openEuler-64bit.tar.bz2
+ -rw------- 1 root root 65 Dec 25 15:34 openGauss-OM-x.x.x-openEuler20.03-x86_64.tar.gz.sha256
+ -rw------- 1 root root 12910775 Dec 25 15:34 openGauss-OM-x.x.x-openEuler20.03-x86_64.tar.gz
+ -rw------- 1 root root 65 Dec 25 15:34 openGauss-Server-x.x.x-openEuler20.03-x86_64.sha256
+ -rw------- 1 root root 73334256 Dec 25 15:34 openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2
-rw------- 1 root root 65 Dec 25 15:34 upgrade_sql.sha256
-rw------- 1 root root 134747 Dec 25 15:34 upgrade_sql.tar.gz
```
diff --git a/content/en/docs/InstallationGuide/obtaining-the-installation-package.md b/content/en/docs/InstallationGuide/obtaining-the-installation-package.md
index 8d6583bf9ab745d9ef24595b53d156c14675b3ec..6fa357dedac79062530c62b4108275e9ae2dda76 100644
--- a/content/en/docs/InstallationGuide/obtaining-the-installation-package.md
+++ b/content/en/docs/InstallationGuide/obtaining-the-installation-package.md
@@ -14,7 +14,7 @@ You can obtain the installation package from the openGauss open-source community
Decompress the installation package and check whether the installation directory and files are complete. Run the following commands in the directory where the installation package is stored:
```
- tar -jxf openGauss-x.x.x-openEuler-64bit.tar.bz2
+ tar -jxf openGauss-Server-x.x.x-openEuler20.03-x86_64.tar.bz2
ls -lb
```
diff --git a/content/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md b/content/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
index bc934b91e660f7a1e654aaaa7c4787abe408a2c4..e0b51fa846adfdc915b8b953d6b93fbcd4ce2d45 100644
--- a/content/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
+++ b/content/en/docs/InstallationGuide/preparing-the-software-and-hardware-installation-environment.md
@@ -66,8 +66,8 @@ This section describes hardware and software requirements of openGauss. It is re
Linux OS
-
ARM:
openEuler 20.03LTS (recommended)
openEuler 22.03LTS
Kirin V10
Asianux 7.5
-
x86:
openEuler 20.03LTS
openEuler 22.03LTS
CentOS 7.6
Asianux 7.6
NOTE:
The current installation package can be used only on the English operating system.
+
ARM:
openEuler 20.03 LTS (recommended)
openEuler 22.03 LTS
Kirin V10
Asianux 7.5
UOS V20
+
x86:
openEuler 20.03 LTS
openEuler 22.03 LTS
CentOS 7.6
Kirin V10
Asianux 7.6
NOTE:
The current installation package can be used only on the English operating system.
diff --git a/content/en/docs/ReleaseNotes/user-notice.md b/content/en/docs/ReleaseNotes/user-notice.md
index 5f62a99f8952a12f3d8b5799a0d261387af3831d..0213de486161ebc6758e586459b32813a1c2c0de 100644
--- a/content/en/docs/ReleaseNotes/user-notice.md
+++ b/content/en/docs/ReleaseNotes/user-notice.md
@@ -2,9 +2,8 @@
openGauss is an open-source, secure, and reliable relational OLTP database with ultimate performance. It is released with the Mulan PSL v2 protocol, allowing users to copy, use, modify, and distribute the source code.
-The version number of openGauss is named in *X.Y.Z* format. *X.0.0* indicates the LTS version, *X.Y.0* indicates the preview version, and *Z* indicates the patch version. Generally, a preview version and an LTS version are released every year. The preview version is for beta testing. The LTS version is a long-term support version and can be rolled out on a large scale. If major issues need to be resolved, patch versions will be released as required.
+The version number of openGauss follows the format of X.Y.0-RCx, which aims to distinguish different types of version updates. Specifically:
-The preliminary openGauss lifecycle plans are as follows:
-
-+ The LTS version is released every one year, and the community provides three-year maintenance support.
-+ The preview version is released every one year, and the community provides 0.5-year maintenance support.
+- LTS version (X.0.0): It is released every two years and marks a long-term stable support version, which is suitable for large-scale deployment and use in production environments. The community commits to providing maintenance support for each LTS version for a period of three years to ensure its continuous stability and security.
+- Innovation version (X.Y.0-RCx): It is launched every six months and aims for rapid iteration, providing the latest features and technology previews. These versions are mainly used for user testing and innovation cooperation. The community will provide maintenance support for a period of six months to encourage exploration and feedback.
+- Patch version (X.Y.0): When major issues are encountered, it will be released in a timely manner, aiming to quickly fix critical errors and ensure the stable operation of the system.
diff --git a/content/en/docs/SQLReference/aggregate-functions.md b/content/en/docs/SQLReference/aggregate-functions.md
index b24b42d3e430448011dba03496ff3837a459355a..3d499b578fc55ccabe2548ef9af773ba8e070a55 100644
--- a/content/en/docs/SQLReference/aggregate-functions.md
+++ b/content/en/docs/SQLReference/aggregate-functions.md
@@ -559,6 +559,97 @@
(1 row)
```
+- corr_s\(expr1, expr2, return_mode\)
+
+ Description:Spearman correlation coefficient
+
+ Return type:double precision
+
+ Return Value: The `return_mode` parameter is optional; if not specified, the function returns the Spearman's rank correlation coefficient (the return value is the same as when `return_mode=COEFFICIENT`). If specified, the value of `return_mode` must be one of the following five options.
+
+
+
+
Return Value
+
Meaning
+
+
+
COEFFICIENT
+
Coefficient of correlation
+
+
+
ONE_SIDED_SIG
+
Positive one-tailed significance of the correlation
+
+
+
ONE_SIDED_SIG_POS
+
Same as ONE_SIDED_SIG
+
+
+
ONE_SIDED_SIG_NEG
+
Negative one-tailed significance of the correlation
+
+
+
TWO_SIDED_SIG
+
Two-tailed significance of the correlation
+
+
+
+ Example:
+
+ ```
+ openGauss=# CREATE TABLE corr_t1(a int, b int);
+ CREATE TABLE
+ openGauss=# INSERT INTO corr_t1 VALUES (NULL,11),(1,2),(1,3),(2,4),(2,5),(3,6);
+ INSERT 0 6
+ openGauss=# SELECT CORR_S(a,b) FROM corr_t1;
+ corr_s
+ ------------------
+ .948683298050514
+ (1 row)
+
+ openGauss=# SELECT CORR_S(a,b,'COEFFICIENT') FROM corr_t1;
+ corr_s
+ ------------------
+ .948683298050514
+ (1 row)
+
+ openGauss=# SELECT CORR_S(a,b,'ONE_SIDED_SIG') FROM corr_t1;
+ corr_s
+ --------------------
+ .00692341649442951
+ (1 row)
+ ```
+
+- corr_k\(expr1, expr2, return_mode\)
+
+ Description: Kendall's tau-b correlation coefficient
+
+ Return type:double precision
+
+ Return Value: The `return_mode` parameter is optional; if not specified, the function returns Kendall's tau-b correlation coefficient (the return value is the same as when `return_mode=COEFFICIENT`). If specified, the description of the return value is the same as that for the `corr_s` function mentioned above.
+
+ Example:
+
+ ```
+ openGauss=# SELECT CORR_K(a,b) FROM corr_t1;
+ corr_k
+ ------------------
+ .894427190999916
+ (1 row)
+
+ openGauss=# SELECT CORR_K(a,b,'COEFFICIENT') FROM corr_t1;
+ corr_k
+ ------------------
+ .894427190999916
+ (1 row)
+
+ openGauss=# SELECT CORR_K(a,b,'ONE_SIDED_SIG') FROM corr_t1;
+ corr_k
+ -------------------
+ .0142298684581553
+ (1 row)
+ ```
+
- every\(expression\)
Description: Equivalent to **bool\_and**
@@ -929,3 +1020,172 @@
{ "D" : 5, "D" : null }
(2 rows)
```
+
+
+- cume\_dist\(expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the cumulative distribution of the assumed rows and corresponding sorting criteria identified by the parameters of the function in the aggregated group rows. in other words, The proportion of the total number of rows in the sorting partition where the value of expression is the same as the value of the last row after sorting
+
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**: Mandatory. The sorting key can be a column name or a sorting key expression.
+
+ Return type: float
+
+ Example:
+
+ Insert the input 4 into a column sorted by c1, with 4 placed at position 8. Therefore, the function returns a value of 8/14.
+
+ ```
+ openGauss=# create table aggregates_hypothetical(c1 int, c2 NUMBER(8,2), c3 varchar(20), c4 timestamp);
+ CREATE TABLE
+ openGauss=# insert into aggregates_hypothetical values
+ openGauss-# (1,0.1,'1','2024-09-01 09:22:00'),
+ openGauss-# (2,0.2,'2','2024-09-02 09:22:00'),
+ openGauss-# (3,0.1,'3','2024-09-03 09:22:00'),
+ openGauss-# (3,0.2,'3','2024-09-04 09:22:00'),
+ openGauss-# (3,0.3,'3','2024-09-05 09:22:00'),
+ openGauss-# (3,0.3,'3','2024-09-05 09:22:00'),
+ openGauss-# (4,0.2,'4','2024-09-06 09:22:00'),
+ openGauss-# (5,0.2,'5','2024-09-07 09:22:00'),
+ openGauss-# (6,0.2,'6','2024-09-08 09:22:00'),
+ openGauss-# (7,0.2,'7','2024-09-09 09:22:00'),
+ openGauss-# (8,0.2,'8','2024-09-10 09:22:00'),
+ openGauss-# (9,0.2,'9','2024-09-11 09:22:00'),
+ openGauss-# (10,0.2,'10','2024-09-12 09:22:00');
+ INSERT 0 13
+
+ openGauss=# select cume_dist(4) within group (order by c1) from aggregates_hypothetical;
+ cume_dist
+ ------------------
+ .571428571428571
+ (1 row)
+ ```
+
+ Example:
+
+ Insert the input (3,0.2) into the column sorted by c1 and c2, and place it in the 5th position. Therefore, the function returns a value of 5/14
+
+ ```
+ openGauss=# select cume_dist(3,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ cume_dist
+ ------------------
+ .357142857142857
+ (1 row)
+ ```
+
+ Example:
+
+ Insert the input string into a column sorted by c1, perform type conversion, and then perform calculations
+
+ ```
+ select cume_dist('1') within group (order by c1) from test_aggregate;
+ cume_dist
+ ------------------
+ .142857142857143
+ (1 row)
+ ```
+
+- rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the ranking of a hypothetical row identified by the parameters of a function relative to a given sorting criterion. The ranking values of the rank function are not continuous.
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: int
+
+ Example
+
+ Using c1 as the sorting column, calculate the ranking value of the input parameter in the sorting column. Duplicate columns are also included in the ranking, so the ranking is discontinuous
+
+ ```
+ openGauss=# select rank(3) within group (order by c1) from aggregates_hypothetical;
+ rank
+ ------
+ 3
+ (1 row)
+
+ openGauss=# select rank(4) within group (order by c1) from aggregates_hypothetical;
+ rank
+ ------
+ 7
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select rank(4,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ rank
+ ------
+ 7
+ (1 row)
+ ```
+
+- dense\_rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the ranking of a hypothetical row identified by the parameters of a function relative to a given sorting criterion. The ranking value of the dense_rank function is continuous
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: int
+
+ Example
+
+ Using c1 as the sorting column, calculate the ranking value of the input parameter in the sorting column. Duplicate columns are not included in the ranking, so the ranking is continuous
+
+ ```
+ openGauss=# select dense_rank(3) within group (order by c1) from aggregates_hypothetical;
+ dense_rank
+ ------------
+ 3
+ (1 row)
+
+ openGauss=# select dense_rank(4) within group (order by c1) from aggregates_hypothetical;
+ dense_rank
+ ------------
+ 4
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select dense_rank(4,0.2) within group (order by c1,c2) from aggregates_hypothetical;;
+ dense_rank
+ ------------
+ 6
+ (1 row)
+ ```
+
+- percent\_rank\( expression \[,expression\] \) WITHIN GROUP \(ORDER BY \{ order-list \[ ASC | DESC \] \[ NULLS \{ FIRST | LAST \} \] \} \[,...\]\)
+
+ Description: Calculate the percentage of the relative position of the assumed rows identified by the parameters of the function with respect to a given sorting criterion. The calculation formula is (rank -1)/(totals -1).
+
+ - **expression**: Mandatory. specify the rows to be inserted into a set of rows. This expression must return a value of a built-in data type. The expression must be a constant or variable of a constant or variable. Multiple parameters can be entered. The number of parameters must be consistent with the order list and the number of parameters.
+ - **order-list**:Mandatory.The sorting key can be a column name or a sorting key expression.
+
+ Return type: float
+
+ Example
+
+ The percentage of the input value in the position of the current ranking column sorted by c1
+ ```
+ openGauss=# select percent_rank(4) within group (order by c1) from aggregates_hypothetical;
+ percent_rank
+ -------------------
+ 0.461538461538462
+ (1 row)
+ ```
+
+ Example
+
+ Column sorted by c1, c2
+ ```
+ openGauss=# select percent_rank(3,0.2) within group (order by c1,c2) from aggregates_hypothetical;
+ percent_rank
+ -------------------
+ 0.230769230769231
+ (1 row)
+ ```
diff --git a/content/en/docs/SQLReference/alter-table.md b/content/en/docs/SQLReference/alter-table.md
index e00013a49ff01abb3ae98565613f8ab3161f619c..a46700dcaa228941b8f7a37e4f2176f34e9c400c 100644
--- a/content/en/docs/SQLReference/alter-table.md
+++ b/content/en/docs/SQLReference/alter-table.md
@@ -284,7 +284,9 @@ ADD [ COLUMN ] column_name data_type [ compress_mode ] [ COLLATE collation ] [ c
PRIMARY KEY index_parameters |
ENCRYPTED WITH ( COLUMN_ENCRYPTION_KEY = column_encryption_key, ENCRYPTION_TYPE = encryption_type_value ) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
- [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
+ [ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
+ [ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
- **compress\_mode** of a column is as follows:
@@ -296,6 +298,7 @@ ADD [ COLUMN ] column_name data_type [ compress_mode ] [ COLLATE collation ] [ c
```
[ CONSTRAINT constraint_name ]
{ UNIQUE | PRIMARY KEY } USING INDEX index_name
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
```
@@ -547,6 +550,13 @@ ADD [ COLUMN ] column_name data_type [ compress_mode ] [ COLLATE collation ] [ c
- **SET NULL**: sets the referenced field to **NULL**.
- **SET DEFAULT**: sets referenced fields to their default values.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE**
Sets whether the constraint can be deferrable.
diff --git a/content/en/docs/SQLReference/array-functions-and-operators.md b/content/en/docs/SQLReference/array-functions-and-operators.md
index 8f9906cd7cf709978bafde01d812402a74f3cd94..1156c882de12029afa8c99693d9e6a498278689e 100644
--- a/content/en/docs/SQLReference/array-functions-and-operators.md
+++ b/content/en/docs/SQLReference/array-functions-and-operators.md
@@ -501,19 +501,7 @@ Array comparisons compare the array contents element-by-element, using the defau
- array\_extendnull\(anyarray, int\)
- Description: Adds a specified number of null elements to the end of an array.
-
- Return type: anyarray
-
- Example:
-
- ```
- openGauss=# SELECT array_extendnull(ARRAY[1,8,3,7],1) AS RESULT;
- result
- --------------
- {1,8,3,7,null}
- (1 row)
- ```
+ Description: This API has been discarded and is unavailable currently.
- array\_trim\(anyarray, int\)
diff --git a/content/en/docs/SQLReference/assignment-statements.md b/content/en/docs/SQLReference/assignment-statements.md
index 3af746f570fee93c0533c153958fcb30f37860e3..bdfc00e696456a94dfd96c41ae50e2583a99f781 100644
--- a/content/en/docs/SQLReference/assignment-statements.md
+++ b/content/en/docs/SQLReference/assignment-statements.md
@@ -56,6 +56,27 @@ END;
>- In INTO mode, values can be assigned only to the columns at the first layer. Two-dimensional or above arrays are not supported.
>- When a nested column value is referenced, if an array subscript exists, only one parenthesis can exist in the first three layers of columns. You are advised to use square brackets to reference the subscript.
+## Assignment Of Variables With Type Names
+In addition to the above, openGauss supports assignment methods with type names (including RECORD, VARRAY, TABLE OF types and types created by CREATE TYPE). For compatibility with historical versions, such type names are usually ignored and treated as normal arrays or records. Only when enable_pltype_name_check switch is turned on will throw an error if the type name is different.
+
+## Examples
+
+```
+set enable_pltype_name_check = on; -- Turn on the type name detection switch (default is off)
+
+DECLARE
+ TYPE t_rec IS RECORD (val1 VARCHAR2(10), val2 VARCHAR2(10));
+ TYPE t_rec2 IS RECORD (val1 VARCHAR2(10), val2 VARCHAR2(10));
+ l_rec t_rec;
+BEGIN
+ l_rec := t_rec2('ONE', 'TWO'); -- Assignment of variables with type names
+ raise info 'l_rec is %', NVL(l_rec.val1,'NULL');
+END;
+/
+
+ERROR: "t_rec2" cannot be used to assign "l_rec"
+```
+
## INTO/BULK COLLECT INTO
**INTO** and **BULK COLLECT INTO** store values returned by statements in a stored procedure to variables. **BULK COLLECT INTO** allows some or all returned values to be temporarily stored in an array.
diff --git a/content/en/docs/SQLReference/character-types.md b/content/en/docs/SQLReference/character-types.md
index af5ce8aa4931e9ee125fce8e6fa1906905add76a..d3be4476bf92cef7fb55ce1d2119d049f308af99 100644
--- a/content/en/docs/SQLReference/character-types.md
+++ b/content/en/docs/SQLReference/character-types.md
@@ -13,26 +13,26 @@
-
CHAR(n [BYTE|CHAR])
-
CHARACTER(n [BYTE|CHAR])
-
NCHAR(n [BYTE|CHAR])
+
CHAR(n)
+
CHARACTER(n)
+
NCHAR(n)
-
Fixed-length character string, blank padded. n indicates the string length. If it is not specified, the default precision 1 is used. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Fixed-length character string, blank padded. n indicates the string length. If it is not specified, the default precision 1 is used.
The maximum size is 10 MB.
-
VARCHAR(n [BYTE|CHAR])
-
CHARACTER VARYING(n [BYTE|CHAR])
+
VARCHAR(n)
+
CHARACTER VARYING(n)
-
Variable-length string. In PostgreSQL-compatible mode, n indicates the string length. In other compatibility modes, n indicates the byte length. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Variable-length string. In PostgreSQL-compatible mode, n indicates the string length. In other compatibility modes, n indicates the byte length.
The maximum size is 10 MB.
-
VARCHAR2(n [BYTE|CHAR])
+
VARCHAR2(n)
-
Variable-length string. It is the alias of the VARCHAR(n) type. n indicates the string length. Use BYTE semantic default. If CHAR semantics are specified, n is the number of characters.
+
Variable-length string. It is the alias of the VARCHAR(n) type. n indicates the string length.
The maximum size is 10 MB.
diff --git a/content/en/docs/SQLReference/create-index.md b/content/en/docs/SQLReference/create-index.md
index 92f2976cf057d402e4eaeb08c3062104949f3cab..dcb6599ae0a3c70f59145fd551fd7a444ddcbbc4 100644
--- a/content/en/docs/SQLReference/create-index.md
+++ b/content/en/docs/SQLReference/create-index.md
@@ -262,13 +262,13 @@ The partitioned table does not support partial index creation.
- **COMPRESSTYPE**
- Sets the index compression algorithm. The value **1** indicates the PGLZ algorithm, and the value **2** indicates the ZSTD algorithm. By default, indexes are not compressed. This parameter cannot be modified after it takes effect. \(Only B-tree indexes are supported.\)
+ Sets the index compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, indexes are not compressed. This parameter cannot be modified after it takes effect. \(Only B-tree indexes are supported.\)
- Value range: 0 to 2. The default value is **0**.
+ Value range: 0 to 4. The default value is **0**.
- **COMPRESS\_LEVEL**
- Sets the index compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2**. A higher compression level indicates a better index compression effect and a slower index access speed. This parameter can be modified. The modification affects the compression level of changed data and new data. \(Only B-tree indexes are supported.\)
+ Sets the index compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better index compression effect and a slower index access speed. This parameter can be modified. The modification affects the compression level of changed data and new data. \(Only B-tree indexes are supported.\)
Value range: –31 to 31. The default value is **0**.
diff --git a/content/en/docs/SQLReference/create-synonym.md b/content/en/docs/SQLReference/create-synonym.md
index 684b477aaf297ce9f509ef0eb257aebf0e6bd359..0e5ca8c3fee9d09dea867bef468928dc00213fe5 100644
--- a/content/en/docs/SQLReference/create-synonym.md
+++ b/content/en/docs/SQLReference/create-synonym.md
@@ -14,16 +14,27 @@
- You are not advised to create synonyms for temporary tables. To create a synonym, you need to specify the schema name of the target temporary table. Otherwise, the synonym cannot be used normally. In addition, you need to run the **DROP SYNONYM** command before the current session ends.
- After an original object is deleted, the synonym associated with the object will not be deleted in cascading mode. If you continue to access the synonym, an error message is displayed, indicating that the synonym has expired.
- Users granted the CREATE ANY SYNONYM permission can create synonyms in user schemas.
+- Users granted the CREATE PUBLIC SYNONYM permission can create public synonyms.
+- Users granted the DROP PUBLIC SYNONYM permission can delete public synonyms.
+- When creating a synonym, if **PUBLIC** is specified, the schema name of synonym cannot be specified.
## Syntax
```
-CREATE [ OR REPLACE ] SYNONYM synonym_name
+CREATE [ OR REPLACE ] [ PUBLIC ] SYNONYM synonym_name
FOR object_name;
```
## Parameter Description
+- **OR REPLACE**
+
+ - If the synonym exists, replace the existing synonym.
+ - If the synonym does not exist, create a new synonym.
+
+- **PUBLIC**
+ - Specifies that the synonym is a public synonym. If **PUBLIC** is not specified, the synonym is a private synonym.
+
- **synonym**
Specifies the name of the synonym to be created, which can contain the schema name.
@@ -95,11 +106,18 @@ openGauss=# CREATE OR REPLACE SYNONYM register FOR ot.register;
-- Use synonym register to invoke the stored procedure.
openGauss=# CALL register(3,'mia');
+-- Create a public synonym.
+openGauss=# CREATE PUBLIC SYNONYM t1 FOR ot.t1;
+
+-- Use the public synonym.
+openGauss=# SELECT * FROM t1;
+
-- Delete the synonym.
openGauss=# DROP SYNONYM t1;
openGauss=# DROP SYNONYM IF EXISTS v1;
openGauss=# DROP SYNONYM IF EXISTS add;
openGauss=# DROP SYNONYM register;
+openGauss=# DROP PUBLIC SYNONYM t1;
openGauss=# DROP SCHEMA ot CASCADE;
```
diff --git a/content/en/docs/SQLReference/create-table-partition.md b/content/en/docs/SQLReference/create-table-partition.md
index 5059ad227849e73e7f1429bdf28bf8d9eb006c42..4aade10f0062dca3734052925875151f88e7ad9f 100644
--- a/content/en/docs/SQLReference/create-table-partition.md
+++ b/content/en/docs/SQLReference/create-table-partition.md
@@ -81,6 +81,7 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -241,6 +242,47 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
> **NOTICE:**
>**orientation** cannot be modified.
+ - COMPRESSTYPE
+
+ Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, indexes are not compressed. (Only common tables in the Astore engine are supported.)
+
+ Value range: 0 to 4. The default value is **0**.
+
+ - COMPRESS\_LEVEL
+
+ Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better table compression effect and a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: –31 to 31. The default value is **0**.
+
+ - COMPRESS\_CHUNK_SIZE
+
+ Specifies the size of a row-store table compression chunk. A smaller chunk size indicates a better compression effect, and a larger data dispersion degree indicates a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: subject to the page size. When the page size is 8 KB, the value can be **512**, **1024**, **2048**, or **4096**.
+
+ Default value: **4096**
+
+ - COMPRESS_PREALLOC_CHUNKS
+
+ Specifies the number of pre-allocated row-store table compression chunks. A larger number of pre-allocated chunks indicates a lower table compression ratio, and a smaller data dispersion degree indicates a better access performance. (Only common tables in the Astore engine are supported.)
+
+ Value range: 0 to 7. The default value is **0**.
+
+ - The maximum value of this parameter is **7** when **COMPRESS\_CHUNK_SIZE** is set to **512** or **1024**.
+ - The maximum value of this parameter is **3** when **COMPRESS\_CHUNK_SIZE** is set to **2048**.
+ - The maximum value of this parameter is **1** when **COMPRESS\_CHUNK_SIZE** is set to **4096**.
+
+ - COMPRESS_BYTE_CONVERT
+
+ Sets the preprocessing of row-store table compression byte conversion. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
+
+ - COMPRESS_DIFF_CONVERT
+
+ Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
- STORAGE\_TYPE
@@ -456,6 +498,13 @@ CREATE TABLE [ IF NOT EXISTS ] partition_table_name
Only one primary key can be specified for a table.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
Controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/en/docs/SQLReference/create-table-subpartition.md b/content/en/docs/SQLReference/create-table-subpartition.md
index 450ce2e4a27210c0b2db50928135e3673e9cb71b..00f27d176e68af6af884961ca27b87036742c425 100644
--- a/content/en/docs/SQLReference/create-table-subpartition.md
+++ b/content/en/docs/SQLReference/create-table-subpartition.md
@@ -59,6 +59,7 @@ PARTITION BY {RANGE | LIST | HASH} (partition_key) SUBPARTITION BY {RANGE | LIST
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -190,6 +191,53 @@ PARTITION BY {RANGE | LIST | HASH} (partition_key) SUBPARTITION BY {RANGE | LIST
> **NOTICE:**
>**ORIENTATION** cannot be modified.
+ - COMPRESSLEVEL
+
+ Specifies the table data compression ratio and duration at the same compression level. This divides a compression level into sublevels, providing more choices for compression ratio and duration. As the value becomes greater, the compression ratio becomes higher and duration longer at the same compression level.
+
+ Value range: 0 to 3. The default value is **0**.
+
+ - COMPRESSTYPE
+
+ Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, indexes are not compressed. (Only common tables in the Astore engine are supported.)
+
+ Value range: 0 to 4. The default value is **0**.
+
+ - COMPRESS\_LEVEL
+
+ Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better table compression effect and a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: –31 to 31. The default value is **0**.
+
+ - COMPRESS\_CHUNK_SIZE
+
+ Specifies the size of a row-store table compression chunk. A smaller chunk size indicates a better compression effect, and a larger data dispersion degree indicates a slower table access speed. (Only common tables in the Astore engine are supported.)
+
+ Value range: subject to the page size. When the page size is 8 KB, the value can be **512**, **1024**, **2048**, or **4096**.
+
+ Default value: **4096**
+
+ - COMPRESS_PREALLOC_CHUNKS
+
+ Specifies the number of pre-allocated row-store table compression chunks. A larger number of pre-allocated chunks indicates a lower table compression ratio, and a smaller data dispersion degree indicates a better access performance. (Only common tables in the Astore engine are supported.)
+
+ Value range: 0 to 7. The default value is **0**.
+
+ - The maximum value of this parameter is **7** when **COMPRESS\_CHUNK_SIZE** is set to **512** or **1024**.
+ - The maximum value of this parameter is **3** when **COMPRESS\_CHUNK_SIZE** is set to **2048**.
+ - The maximum value of this parameter is **1** when **COMPRESS\_CHUNK_SIZE** is set to **4096**.
+
+ - COMPRESS_BYTE_CONVERT
+
+ Sets the preprocessing of row-store table compression byte conversion. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
+
+ - COMPRESS_DIFF_CONVERT
+
+ Sets the preprocessing of row-store table compression differentiation. This parameter can be used together only with **COMPRESS\_BYTE\_CONVERT**. In some scenarios, the compression effect can be improved, but the performance deteriorates.
+
+ Value range: Boolean value. By default, this function is disabled.
- STORAGE\_TYPE
@@ -327,6 +375,13 @@ PARTITION BY {RANGE | LIST | HASH} (partition_key) SUBPARTITION BY {RANGE | LIST
Only one primary key can be specified for a table.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
They determine whether the constraint is deferrable. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/en/docs/SQLReference/create-table.md b/content/en/docs/SQLReference/create-table.md
index 4b22654fc20f75e0cf39d8f938a054e1f728f6fa..0176ea5894db16845cd0e8e8b3f39f6f4f105f8f 100644
--- a/content/en/docs/SQLReference/create-table.md
+++ b/content/en/docs/SQLReference/create-table.md
@@ -52,6 +52,7 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -73,6 +74,7 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
FOREIGN KEY [ index_name ] ( column_name [, ... ] ) REFERENCES reftable [ (refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] |
PARTIAL CLUSTER KEY ( column_name [, ... ] ) }
+ [ ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE] ]
[ DEFERRABLE | NOT DEFERRABLE | INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
[ COMMENT {=| } 'text' ]
```
@@ -287,13 +289,13 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
- COMPRESSTYPE
- Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, and the value **2** indicates the ZSTD algorithm. By default, row-store tables are not compressed. This parameter cannot be modified after it takes effect. \(Only common tables in the Astore engine are supported.\)
+ Specifies the row-store table compression algorithm. The value **1** indicates the PGLZ algorithm, the value **2** indicates the ZSTD algorithm, the value **3** indicates the PGZSTD algorithm (currently not supported), and the value **4** indicates the ZLIB algorithm. By default, row-store tables are not compressed. This parameter cannot be modified after it takes effect. \(Only common tables in the Astore engine are supported.\)
- Value range: 0 to 2. The default value is **0**.
+ Value range: 0 to 4. The default value is **0**.
- COMPRESS\_LEVEL
- Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2**. A higher compression level indicates a better table compression effect and a slower table access speed. This parameter can be modified. The modification affects the compression level of changed data and new data. \(Only common tables in the Astore engine are supported.\)
+ Specifies the row-store table compression algorithm level. This parameter is valid only when **COMPRESSTYPE** is set to **2** or **4**. A higher compression level indicates a better table compression effect and a slower table access speed. This parameter can be modified. The modification affects the compression level of changed data and new data. \(Only common tables in the Astore engine are supported.\)
Value range: –31 to 31. The default value is **0**.
@@ -485,6 +487,13 @@ CREATE [ [ GLOBAL | LOCAL ] [ TEMPORARY | TEMP ] | UNLOGGED ] TABLE [ IF NOT EXI
- **SET NULL**: sets the referencing column\(s\) to **NULL**.
- **SET DEFAULT**: sets the referencing column\(s\) to their default values.
+- **ENABLE [VALIDATE | NOVALIDATE] | DISABLE [VALIDATE | NOVALIDATE]**
+
+ - ENABLE( VALIDATE)(default): Enable constraints, create indexes, and enforce constraints on both existing data and newly added data.
+ - ENABLE NOVALIDATE: Enable constraints and create indexes. For CHECK constraints, the constraints are only enforced for newly added data, regardless of the existing data in the table. For UNIQUE and PRIMARY KEY, indexes need to be established, so the constraints will be enforced for the existing data.
+ - DISABLE( NOVALIDATE)(default): Disable constraints, delete indexes, and operations such as modifying the data of the constraint columns can be performed.
+ - DISABLE VALIDATE: Disable constraints and delete indexes. Insertion, update and deletion operations on the table cannot be performed.
+
- **DEFERRABLE | NOT DEFERRABLE**
Controls whether the constraint can be deferred. A constraint that is not deferrable will be checked immediately after every command. Checking of constraints that are deferrable can be postponed until the end of the transaction using the **SET CONSTRAINTS** command. **NOT DEFERRABLE** is the default value. Currently, only UNIQUE constraints, primary key constraints, and foreign key constraints accept this clause. All the other constraints are not deferrable.
diff --git a/content/en/docs/SQLReference/create-view.md b/content/en/docs/SQLReference/create-view.md
index e4327a56f2ccc2e61d90f30e7d578944c286d4fb..c32b5ac05a74ad741ff6dc0bbb413bbd595fa2f0 100644
--- a/content/en/docs/SQLReference/create-view.md
+++ b/content/en/docs/SQLReference/create-view.md
@@ -57,6 +57,41 @@ CREATE [ OR REPLACE ] [DEFINER = user] [ TEMP | TEMPORARY ] VIEW view_name [ ( c
Specifies a **SELECT** or **VALUES** statement that will provide the columns and rows of the view.
+## Automatically Updatable View
+
+Simple views are automatically updatable. When executing UPDATE statements on a view, the view is automatically updatable if it meets the following conditions:
+
+* The view can contain serveral entries in its FROM list, but they must be tables, subqueries or views.
+* The view definition must not contain WITH, DISTINCT, GROUP BY, HAVING, LIMIT, or OFFSET clauses at the top level.
+* The view definition must not contain set operations (UNION, INTERSECT or EXCEPT) at the top level.
+* The view's target list must not contain any aggregates, window functions or set-returning functions.
+* If the targets of the UPDATE statement are columns of a subquery or a subview of the view at the top level, then the subquery or the subview must also meet the conditions mentioned above.
+
+When executing DELETE statements, aside from conditions mentioned above, the view must also meets the following conditions:
+
+* All subqueries and subviews of the view meets the auto-updatable conditions.
+* No entries in the FROM list should be joined by cross join or full join. Besides, except for the tables joined by left join or right join, at most only one of the other tables can be without a unique key.
+
+When executing INSERT statements or when defining the view with a WITH CHECK OPTION, the view must also meets the following conditions:
+
+* The view must have exactly one entry in its FROM list, which must be a table or another automatically updatable view (a subquery is not allowed here).
+
+Simple views are automatically updatable. The system allows INSERT, UPDATE, and DELETE statements to be executed on these views. A view is automatically updatable if it meets the following conditions:
+
+* The view must have exactly one entry in its FROM list, which must be a table or another automatically updatable view.
+* The view definition must not contain WITH, DISTINCT, GROUP BY, HAVING, LIMIT, or OFFSET clauses at the top level.
+* The view definition must not contain set operations (UNION, INTERSECT or EXCEPT) at the top level.
+* The view's target list must not contain any aggregates, window functions or set-returning functions.
+
+An automatically updatable view may contain a mix of updatable and non-updatable columns. A column is updatable if it is a simple reference to an updatable column of the underlying relationship. Otherwise, the column is read-only, and an error will be raised if an INSERT or UPDATE statement attempts to assign a value to it.
+
+If the view is automatically updatable, the system will convert any INSERT, UPDATE or DELETE statement on the view into the corresponding statement on the underlying relationship.
+
+If an automatically updatable view contains a WHERE condition, the condition restricts which rows of the underlying relationship can be modified by UPDATE and DELETE statements on the view. However, a row that can be modified by UPDATE may no longer meet the WHERE condition and thus is no longer visible through the view. Similarly, an INSERT command may insert rows that do not meet the WHERE condition, so the rows are not visible through the view. CHECK OPTION can be used to prevent INSERT and UPDATE commands from creating such rows that are not visible through the view.
+
+A more complex view that does not meet the preceding conditions is read-only by default. The system does not allow INSERT, UPDATE, or DELETE statements to be executed on this view. You can get the effect of an updatable view by creating INSTEAD OF triggers on the view, which must convert attempted insert operations on the view into appropriate actions on other tables. For more information, see [CREATE TRIGGER](create-trigger.md). Another way is to create a rule (see [CREATE RULE](create-rule.md)).
+
+Note that the user who performs insert, update, or delete operations on a view must have the corresponding insert, update, or delete permissions on that view. In addition, the owner of the view must have the corresponding permissions on the underlying relationship, but the user who executes the view does not need any permissions on the underlying relationship.
## Examples
@@ -70,6 +105,29 @@ openGauss=# SELECT * FROM myView ;
-- Delete the myView view.
openGauss=# DROP VIEW myView;
+
+-- Create a view with more than one entry in it's FROM list
+openGauss=# CREATE TABLE dept(deptno INT NOT NULL, dname VARCHAR(14), loc VARCHAR(13), CONSTRAINT pk_dept PRIMARY KEY(deptno));
+openGauss=# INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK');
+openGauss=# CREATE TABLE emp (empno int NOT NULL PRIMARY KEY, ename VARCHAR(10), job VARCHAR(9), deptno int,
+openGauss-# CONSTRAINT fk_deptno FOREIGN KEY(deptno) REFERENCES dept(deptno));
+openGauss=# INSERT INTO emp VALUES (7782,'CLARK','MANAGER',10);
+openGauss=# INSERT INTO emp VALUES (7934,'MILLER','CLERK',10);
+openGauss=# CREATE VIEW multv1 AS SELECT emp.empno, emp.ename, emp.job, dept.* FROM dept, emp
+openGauss-# WHERE dept.deptno = emp.deptno;
+
+-- Update/Delete from the view with multiple FROM list entries
+openGauss=# UPDATE multv1 SET ENAME='ABCD', JOB='SALESMAN' WHERE EMPNO=7934;
+openGauss=# DELETE FROM multv1 WHERE EMPNO=7934;
+
+-- Failed to update/delete from a view whose target base table is not a table, a view, nor a subquery
+openGauss=# CREATE VIEW multv2 AS SELECT * FROM emp JOIN UPPER('foo') AS f ON true;
+openGauss=# UPDATE multv2 SET f = 'a';
+openGauss=# DELETE FROM multv2;
+
+-- Failed to delete from a view whose base tables are cross/full joined with each other
+openGauss=# CREATE VIEW multv3 AS SELECT emp.empno, emp.ename, emp.job, dept.* FROM dept CROSS JOIN emp;
+openGauss=# DELETE FROM mutlv3;
```
## Helpful Links
diff --git a/content/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md b/content/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
index 5624e463d42d1a8807b17bee9e7bffb1d289f01c..a61145e87ca2558f88a147ca51362c77863a7859 100644
--- a/content/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
+++ b/content/en/docs/SQLReference/date-and-time-processing-functions-and-operators.md
@@ -677,6 +677,30 @@
```
+- new_time(date, timezone1,timezone2)
+
+ Description: Returns the date and time in timezone2 when date and time in timezone1 are date
+
+ Parameter Type: timestamp without time zone, text, text
+
+ Return type: timestamp without time zone
+
+ Example:
+
+ ```
+ openGauss=# select new_time('2024-07-22 14:00:00', 'EST', 'PST');
+ new_time
+ ---------------------
+ 2024-07-22 11:00:00
+ (1 row)
+ ```
+
+ >  **NOTE:**
+ >
+ > 1.This function is valid only when openGauss is compatible with dbcompatibility = 'A'.
+ >
+ > 2.The first parameter date can not be timestamp with time zone.
+
- next\_day\(x,y\)
Description: Calculates the time of the next week y started from x.
diff --git a/content/en/docs/SQLReference/drop-procedure.md b/content/en/docs/SQLReference/drop-procedure.md
index 0024e33ce53c9a80a65e0481d2156257e525fe39..db6c60185fe2e04b2d0296edf8ff48a9455f71c2 100644
--- a/content/en/docs/SQLReference/drop-procedure.md
+++ b/content/en/docs/SQLReference/drop-procedure.md
@@ -11,7 +11,8 @@ None
## Syntax
```
-DROP PROCEDURE [ IF EXISTS ] procedure_name ;
+DROP PROCEDURE [ IF EXISTS ] procedure_name
+[ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];
```
## Parameter Description
diff --git a/content/en/docs/SQLReference/drop-synonym.md b/content/en/docs/SQLReference/drop-synonym.md
index 240d77624dc90b216d81cb075aab396ced15f0a6..79ee67d1a5c3ccf3ec77bf65be982ef849ab4a91 100644
--- a/content/en/docs/SQLReference/drop-synonym.md
+++ b/content/en/docs/SQLReference/drop-synonym.md
@@ -8,14 +8,20 @@
The owner of SYNONYM or a user granted with the DROP ANY SEQUENCE permission can run **DROP SYNONYM**. The system administrator has this permission by default.
+The **PUBLIC SYNONYM** can only be deleted by a user granted with the DROP PUBLIC SYNONYM permission.
+
## Syntax
```
-DROP SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
+DROP [ PUBLIC ] SYNONYM [ IF EXISTS ] synonym_name [ CASCADE | RESTRICT ];
```
## Parameter Description
+- **PUBLIC**
+
+ Deletes a public synonym. If you do not specify PUBLIC, a private synonym is deleted.
+
- **IF EXISTS**
Reports a notice instead of an error if the specified synonym does not exist.
diff --git a/content/en/docs/SQLReference/grant.md b/content/en/docs/SQLReference/grant.md
index 62523b4f4f7ff486c10d6b4c6532ae82f71e3e30..5a78ddade39e1db9862431d9bbdb4802ef8cbba1 100644
--- a/content/en/docs/SQLReference/grant.md
+++ b/content/en/docs/SQLReference/grant.md
@@ -38,7 +38,7 @@
Grant ANY permissions to a specified role or user. For details about the value range of the ANY permissions, see the syntax. If **WITH ADMIN OPTION** is specified, the grantee can grant the ANY permissions to or revoke them from other roles or users. The ANY permissions can be inherited by a role but cannot be granted to **PUBLIC**. An initial user and the system administrator when separation of duties is disabled can grant the ANY permissions to or revoke them from any role or user.
- Currently, the following ANY permissions are supported: CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE ANY FUNCTION, EXECUTE ANY FUNCTION, CREATE ANY PACKAGE, EXECUTE ANY PACKAGE, CREATE ANY TYPE, ALTER ANY TYPE, DROP ANY TYPE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, SELECT ANY SEQUENCE, ALTER ANY INDEX, DROP ANY INDEX, CREATE ANY SYNONYM, DROP ANY SYNONYM, CREATE ANY TRIGGER, ALTER ANY TRIGGER, and DROP ANY TRIGGER. For details about the ANY permission scope, see [Table 1](#table1360121832117).
+ Currently, the following ANY permissions are supported: CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, SELECT ANY TABLE, INSERT ANY TABLE, UPDATE ANY TABLE, DELETE ANY TABLE, CREATE ANY SEQUENCE, CREATE ANY INDEX, CREATE ANY FUNCTION, EXECUTE ANY FUNCTION, CREATE ANY PACKAGE, EXECUTE ANY PACKAGE, CREATE ANY TYPE, ALTER ANY TYPE, DROP ANY TYPE, ALTER ANY SEQUENCE, DROP ANY SEQUENCE, SELECT ANY SEQUENCE, ALTER ANY INDEX, DROP ANY INDEX, CREATE ANY SYNONYM, DROP ANY SYNONYM, CREATE PUBLIC SYNONYM, DROP PUBLIC SYNONYM,CREATE ANY TRIGGER, ALTER ANY TRIGGER, and DROP ANY TRIGGER. For details about the ANY permission scope, see [Table 1](#table1360121832117).
## Precautions
@@ -46,7 +46,7 @@
- The ANY permissions are database permissions and are valid only for database objects that are granted with the permissions. For example, **SELECT ANY TABLE** only allows a user to view all user table data in the current database, but the user does not have the permission to view user tables in other databases.
- Even if a user is granted with the ANY permissions, the user cannot perform INSERT, DELETE, UPDATE, and SELECT operations on the objects of private users.
- The ANY permissions and the original permissions do not affect each other.
-- If a user is granted with the CREATE ANY TABLE permission, the owner of a table created in a schema with the same name as the user is the owner of the schema. When the user performs other operations on the table, the user needs to be granted with the corresponding operation permission. Similarly, if a user is granted with the CREATE ANY FUNCTION, CREATE ANY PACKAGE, CREATE ANY TYPE, CREATE ANY SEQUENCE, or CREATE ANY INDEX permission, the owner of an object created in a schema with the same name is the owner of the schema. If a user is granted with the CREATE ANY TRIGGER or CREATE ANY SYNONYM permission, the owner of an object created in a schema with the same name is the creator.
+- If a user is granted with the CREATE ANY TABLE permission, the owner of a table created in a schema with the same name as the user is the owner of the schema. When the user performs other operations on the table, the user needs to be granted with the corresponding operation permission. Similarly, if a user is granted with the CREATE ANY FUNCTION, CREATE ANY PACKAGE, CREATE ANY TYPE, CREATE ANY SEQUENCE, or CREATE ANY INDEX permission, the owner of an object created in a schema with the same name is the owner of the schema. If a user is granted with the CREATE ANY TRIGGER or CREATE ANY SYNONYM permission, the owner of an object created in a schema with the same name is the creator. If the user is granted with the CREATE PUBLIC SYNONYM or DROP PUBLIC SYNONYM permission, user can create or drop a public synonym.
## Syntax
@@ -265,7 +265,7 @@
GRANT { CREATE ANY TABLE | ALTER ANY TABLE | DROP ANY TABLE | SELECT ANY TABLE | INSERT ANY TABLE | UPDATE ANY TABLE |
DELETE ANY TABLE | CREATE ANY SEQUENCE | CREATE ANY INDEX | CREATE ANY FUNCTION | EXECUTE ANY FUNCTION |
CREATE ANY PACKAGE | EXECUTE ANY PACKAGE | CREATE ANY TYPE | ALTER ANY TYPE | DROP ANY TYPE | ALTER ANY SEQUENCE | DROP ANY SEQUENCE |
- SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
+ SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE PUBLIC SYNONYM | DROP PUBLIC SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
} [, ...]
TO [ GROUP ] role_name [, ...]
[ WITH ADMIN OPTION ];
@@ -604,6 +604,16 @@ When a non-owner of an object attempts to GRANT permissions on the object:
Users have the DROP permission on synonyms in public and user schemas.
+
CREATE PUBLIC SYNONYM
+
+
Users have the CREATE permission on public synonyms.
+
+
+
DROP PUBLIC SYNONYM
+
+
Users have the DROP permission on public synonyms.
+
+
diff --git a/content/en/docs/SQLReference/internal-functions.md b/content/en/docs/SQLReference/internal-functions.md
index 32e6989e1404ac3638a7f79b69c15e5a09481637..263e2829b531479f59bd6382f7767270f0f3cbca 100644
--- a/content/en/docs/SQLReference/internal-functions.md
+++ b/content/en/docs/SQLReference/internal-functions.md
@@ -892,35 +892,6 @@ The following functions of openGauss use internal data types, which cannot be di
large_seq_upgrade_ntree
-
-
-
bpcharc
-
-
bpcharcin
-
-
bpcharcout
-
-
bpcharcrecv
-
-
bpcharcsend
-
-
bpcharctypmodein
-
-
bpcharctypmodout
-
-
-
varcharc
-
-
varcharcin
-
-
varcharcout
-
-
varcharcrecv
-
-
varcharcsend
-
-
varcharctypmodin
-
-
varcharctypmodout
diff --git a/content/en/docs/SQLReference/json-jsonb-functions-and-operators.md b/content/en/docs/SQLReference/json-jsonb-functions-and-operators.md
index d799529385c9928f103f4f2255eee73747cbc8ed..d7c0e86a2cd1975006636303c0f58b4b850af64f 100644
--- a/content/en/docs/SQLReference/json-jsonb-functions-and-operators.md
+++ b/content/en/docs/SQLReference/json-jsonb-functions-and-operators.md
@@ -991,6 +991,87 @@ For details about the JSON/JSONB data type, see [JSON/JSONB Types](json-jsonb-t
(1 row)
```
+ - json_exists\(text, text \[ \{TRUE | FALSE | ERROR\} ON ERROR \]\)
+
+ Description: Determine whether a JSON value exists under a certain JSON path in a JSON data, returning true if it does, and false otherwise. Specify ON ERORR clause to change json_exists' behaviour when $1 is not a well-formed JSON data text. Under such circumstances, json_exists returns false by default and when FALSE ON ERROR is specified, returns true when TRUE ON ERROR is specified, and report error when ERROR ON ERROR is specified.
+
+ Return type:bool
+
+ Attention:
+
+ - $2 must conform with json path expression's grammar, and it cannot be NULL, otherwise an error will be reported.
+ - Of all json path expression grammars, only extracting json values by array indexes or object field names are supported by now.
+
+ For example:
+
+ ```
+ openGauss=# select json_exists('[{"first":"John"}, {"middle":"Mark"}, {"last":"Smith"}]', '$[0, 1].first');
+ json_exists
+ -------------
+ t
+ (1 row)
+
+ openGauss=# select json_exists('[{"first":"John"}, {"middle":"Mark"}, {"last":"Smith"}]', '$[3 to 5].*');
+ json_exists
+ -------------
+ f
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[*].first' FALSE ON ERROR);
+ json_exists
+ -------------
+ f
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[0].first' TRUE ON ERROR);
+ json_exists
+ -------------
+ t
+ (1 row)
+
+ openGauss=# select json_exists('This is not well-formed JSON data', '$[0].first' ERROR ON ERROR);
+ ERROR: the input is not a well-formed json data
+ CONTEXT: referenced column: json_exists
+ ```
+
+- json_textcontains\(json text, path text, target cstring\)
+
+ Description: Determine whether some specified values are contained under centain JSON path in a JSON data, which are seperated by commas. The function returns true if at least one of them is contained, and false otherwise. json_textcontains returns false when $1 is not a well-formed JSON data.
+
+ - json: the JSON data text.
+ - path: the JSON path expression text
+ - target: the values needed to be tested for containing.
+
+ Return type:bool
+
+ Attention:
+
+ - $2 must conform with json path expression's grammar, and it cannot be NULL, otherwise an error will be reported.
+ - Of all json path expression grammars, only extracting json values by array indexes or object field names are supported by now.
+ - The match for containing is not case-sensitive。
+
+ 示例:
+
+ ```
+ openGauss=# SELECT JSON_TEXTCONTAINS('{"family" : {"id":12, "ages":[25,23], "address" : {"street" : "300 Oak Street", "apt" : 10}}}', '$.family', 'oak, 10');
+ json_textcontains
+ -------------------
+ t
+ (1 row)
+
+ openGauss=# SELECT JSON_TEXTCONTAINS('{"family" : {"id":12, "ages":[25,23], "address" : {"street" : "300 Oak Street", "apt" : 10}}}', '$.family', '12 25 23 300 OAK');
+ json_textcontains
+ -------------------
+ t
+ (1 row)
+
+ openGauss=# SELECT JSON_TEXTCONTAINS('This is not well-formed JSON data', '$.family', 'data');
+ json_textcontains
+ -------------------
+ f
+ (1 row)
+ ```
+
- Other functions
Description: Internal functions used by GIN indexes and JSON\\JSONB aggregate functions.
diff --git a/content/en/docs/SQLReference/keywords.md b/content/en/docs/SQLReference/keywords.md
index ab320b007c99eea423aacba078a39f2f880de69c..06fae9ad017dd5aa4acf05dc94ec3d549d32b2cb 100644
--- a/content/en/docs/SQLReference/keywords.md
+++ b/content/en/docs/SQLReference/keywords.md
@@ -547,15 +547,6 @@ The naming rules for identifiers are as follows:
Reserved
-
BYTE
-
-
Non-reserved
-
-
N/A
-
-
N/A
-
-
BYTEAWITHOUTODER
Non-reserved (excluding functions and types)
@@ -3004,6 +2995,15 @@ The naming rules for identifiers are as follows:
Reserved
+
JSON_EXISTS
+
+
Non-reserved (excluding functions and types)
+
+
N/A
+
+
N/A
+
+
K
N/A
diff --git a/content/en/docs/SQLReference/mathematical-functions-and-operators.md b/content/en/docs/SQLReference/mathematical-functions-and-operators.md
index 97035ea51407b5a5d54efe420f90c9cc59850ed0..9e56a027df30123e8cd87c8b6bdc8d0a38fc4806 100644
--- a/content/en/docs/SQLReference/mathematical-functions-and-operators.md
+++ b/content/en/docs/SQLReference/mathematical-functions-and-operators.md
@@ -154,6 +154,8 @@
Description: Factorial
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -168,6 +170,8 @@
Description: Factorial \(prefix operator\)
+ WARNING: unsupported in b compatibility mode
+
Example:
```
@@ -345,6 +349,22 @@
(1 row)
```
+- bin_to_num\(VARIADIC number[]\)
+
+ Description: Converts a bit vector to its equivalent number. Each argument to this function represents a bit in the bit vector. Each expr must evaluate to 0 or 1.
+
+ Return type: number
+
+ Example:
+
+ ```
+ openGauss=# SELECT bin_to_num(1, 0, 1);
+ bin_to_num
+ ---------------
+ 5
+ (1 row)
+ ```
+
- bitand\(integer, integer\)
Description: Performs an AND \(&\) operation on two integers.
diff --git a/content/en/docs/SQLReference/obsolete-functions.md b/content/en/docs/SQLReference/obsolete-functions.md
index 9b925843f9a0cfa8280661d729f40e6731c78300..9e86dcfce2bb61fb6db78dae2db68fcb11320b74 100644
--- a/content/en/docs/SQLReference/obsolete-functions.md
+++ b/content/en/docs/SQLReference/obsolete-functions.md
@@ -78,19 +78,84 @@ The following functions in openGauss have been discarded in the latest version:
pg_pool_validate
+
gs_stat_ustore
table_skewness(text)
table_skewness(text, text, text)
-
-
+
pg_stat_get_wlm_realtime_operator_info
+
+
pg_stat_get_wlm_realtime_ec_operator_info
+
+
pg_stat_get_wlm_ec_operator_info
+
+
gs_stat_get_wlm_plan_operator_info
+
+
+
+
pg_stat_get_wlm_operator_info
+
+
gs_wlm_get_resource_pool_info(int)
+
+
gs_wlm_get_all_user_resource_info
+
+
create_wlm_operator_info
+
+
create_wlm_session_info
+
+
gs_wlm_get_workload_records
+
+
gs_wlm_persistent_user_resource_info
+
+
+
+
gs_wlm_session_respool
+
+
gs_total_nodegroup_memory_detail
+
+
gs_wlm_user_resource_info(name text)
+
+
create_wlm_instance_statistics_info
+
+
pg_stat_get_session_wlmstat
+
+
pg_stat_get_wlm_ec_operator_info
+
+
pg_stat_get_wlm_instance_info
+
+
+
+
pg_stat_get_wlm_instance_info_with_cleanup
+
+
pg_stat_get_wlm_statistics
+
+
pg_stat_get_wlm_realtime_session_info
+
+
gs_upload_obs_file
+
+
gs_download_obs_file
+
+
gs_set_obs_file_context
+
+
gs_get_hadr_key_cn
+
+
+
+
gs_hadr_do_switchover
+
+
track_memory_context(context_list text)
+
+
track_memory_context_detail
+
+
pgxc_unlock_for_sp_database
-
-
+
local_segment_space_info
-
-
+
pg_stat_segment_extent_usage
-
-
+
GS_ALL_NODEGROUP_CONTROL_GROUP_INFO
diff --git a/content/en/docs/SQLReference/other-functions.md b/content/en/docs/SQLReference/other-functions.md
index 415533454c7b52d4828ed6432e9b27c116ca5480..e4b70f4666f9405da044eec79748e9f430eeb673 100644
--- a/content/en/docs/SQLReference/other-functions.md
+++ b/content/en/docs/SQLReference/other-functions.md
@@ -641,19 +641,11 @@
- pgxc\_unlock\_for\_sp\_database\(name Name\)
- Description: Releases a specified database lock.
-
- Parameter: database name
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- pgxc\_lock\_for\_sp\_database\(name Name\)
- Description: Locks a specified database.
-
- Parameter: database name
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- copy\_error\_log\_create\(\)
diff --git a/content/en/docs/SQLReference/other-system-functions.md b/content/en/docs/SQLReference/other-system-functions.md
index 2e7647ba27b67eef82d8bacb933288fcc4b48557..de0efdce321dd83a85ff280740a130b862024cf7 100644
--- a/content/en/docs/SQLReference/other-system-functions.md
+++ b/content/en/docs/SQLReference/other-system-functions.md
@@ -3873,51 +3873,6 @@ The built-in functions and operators of openGauss are inherited from the open-so
-
-
bpcharc_pattern_ge
-
-
bpcharc_pattern_gt
-
-
bpcharc_pattern_le
-
-
bpcharc_pattern_lt
-
-
bpcharceq
-
-
bpcharcge
-
-
bpcharcgt
-
-
-
bpcharciclike
-
-
bpcharcicnlike
-
-
bpcharcicregexeq
-
-
bpcharcicregexne
-
-
bpcharcle
-
-
bpcharclike
-
-
bpcharclt
-
-
-
bpcharcne
-
-
bpcharcnlike
-
-
bpcharccmp
-
-
bpcharcregexeq
-
-
bpcharcregexne
-
-
btbpcharc_pattern_cmp
-
-
hashbpcharc
-
-
diff --git a/content/en/docs/SQLReference/revoke.md b/content/en/docs/SQLReference/revoke.md
index b57d9f4d182051f0842ca5bc13d52dec2bb7481e..d29dc669e48932e172d7299617200d8aefb8eae8 100644
--- a/content/en/docs/SQLReference/revoke.md
+++ b/content/en/docs/SQLReference/revoke.md
@@ -234,7 +234,8 @@ If a non-owner user of an object attempts to **REVOKE** permission on the obje
{ CREATE ANY TABLE | ALTER ANY TABLE | DROP ANY TABLE | SELECT ANY TABLE | INSERT ANY TABLE | UPDATE ANY TABLE |
DELETE ANY TABLE | CREATE ANY SEQUENCE | CREATE ANY INDEX | CREATE ANY FUNCTION | EXECUTE ANY FUNCTION |
CREATE ANY PACKAGE | EXECUTE ANY PACKAGE | CREATE ANY TYPE | ALTER ANY TYPE | DROP ANY TYPE | ALTER ANY SEQUENCE | DROP ANY SEQUENCE |
- SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
+ SELECT ANY SEQUENCE | ALTER ANY INDEX | DROP ANY INDEX | CREATE ANY SYNONYM | DROP ANY SYNONYM | CREATE PUBLIC SYNONYM | DROP PUBLIC SYNONYM |
+ CREATE ANY TRIGGER | ALTER ANY TRIGGER | DROP ANY TRIGGER
} [, ...]
FROM [ GROUP ] role_name [, ...];
```
diff --git a/content/en/docs/SQLReference/security-functions.md b/content/en/docs/SQLReference/security-functions.md
index 8a08624321d6d28d348e3fc0547306a50f66e577..f2a003e5bbe21ed76462d0a8b8c2b920e7ab8bbb 100644
--- a/content/en/docs/SQLReference/security-functions.md
+++ b/content/en/docs/SQLReference/security-functions.md
@@ -412,6 +412,20 @@
Remote port
+
sha_code
+
+
text
+
+
Sha code
+
+
+
verify_result
+
+
boolean
+
+
Verify result
+
+
diff --git a/content/en/docs/SQLReference/segment-page-storage-functions.md b/content/en/docs/SQLReference/segment-page-storage-functions.md
index 2695fd5066eb6b8d6352f4f1ab292e7a7e00fd71..bef441f81f1374ec15b68d7f1086790fe93fbbc7 100644
--- a/content/en/docs/SQLReference/segment-page-storage-functions.md
+++ b/content/en/docs/SQLReference/segment-page-storage-functions.md
@@ -2,121 +2,11 @@
- local\_segment\_space\_info\(tablespacename TEXT, databasename TEXT\)
- Description: Generates usage information about all extent groups in the tablespace.
-
- Return type:
-
-
-
node_name
-
-
Node name
-
-
-
extent_size
-
-
Extent specifications of an extent group. The unit is the number of blocks.
-
-
-
forknum
-
-
Fork number
-
-
-
total_blocks
-
-
Total number of extents in a physical file
-
-
-
meta_data_blocks
-
-
Number of blocks occupied by the metadata managed in a tablespace, including the space header and map page but excluding the segment head
-
-
-
used_data_blocks
-
-
Number of extents used for storing data, including the segment head
-
-
-
utilization
-
-
Percentage of the number of used blocks to the total number of blocks, that is, (the value of used_data_blocks + the value of meta_data_block)/the value of total_blocks
-
-
-
high_water_mark
-
-
High-water mark, indicating the number of allocated extents and maximum physical page number. Blocks that exceed the high-water mark are not used and can be directly recycled.
-
-
-
-
-
- Example:
-
- ```
- select * from local_segment_space_info('pg_default', 'postgres');
- node_name | extent_size | forknum | total_blocks | meta_data_blocks | used_data_blocks | utilization | high_water_mark
- -------------------+-------------+---------+--------------+------------------+------------------+-------------+-----------------
- dn_6001_6002_6003 | 1 | 0 | 16384 | 4157 | 1 | .253784 | 4158
- dn_6001_6002_6003 | 8 | 0 | 16384 | 4157 | 8 | .254211 | 4165
- (2 rows)
- ```
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_segment\_extent\_usage\(int4 tablespace oid, int4 database oid, int4 extent\_type, int4 forknum\)
- Description: Specifies the usage information of each allocated extent in an extent group returned each time. **extent\_type** indicates the type of the extent group. The value is an integer ranging from 1 to 5. If the value is not within the range, an error is reported. **forknum** indicates the fork number. The value is an integer ranging from 0 to 4. Currently, only the following values are valid: **0** for data files, **1** for FSM files, and **2** for visibility map files.
-
- Return type:
-
-
-
Name
-
-
Description
-
-
-
-
start_block
-
-
Start physical page number of an extent
-
-
-
extent_size
-
-
Size of an extent
-
-
-
usage_type
-
-
Usage type of an extent, for example, segment head and data extent
-
-
-
ower_location
-
-
Object location of an extent to which a pointer points. For example, the owner of a data extent is the head of the segment to which the data extent belongs.
-
-
-
special_data
-
-
Position of an extent in its owner. The value of this field is related to the usage type. For example, special data of a data extent is the extent ID in the segment to which the data extent belongs.
-
-
-
-
-
- The value of **usage\_type** is enumerated. The meaning of each value is as follows:
-
- - **Non-bucket table segment head**: data segment head of a non-hash bucket table
- - **Non-bucket table fork head**: fork segment header of a non-segment-page table
- - **Data extent**: data block
-
- Example:
-
- ```
- select * from pg_stat_segment_extent_usage((select oid::int4 from pg_tablespace where spcname='pg_default'), (select oid::int4 from pg_database where datname='postgres'), 1, 0);
- start_block | extent_size | usage_type | ower_location | special_data
- -------------+-------------+------------------------+---------------+--------------
- 4157 | 1 | Data extent | 4294967295 | 0
- 4158 | 1 | Data extent | 4157 | 0
- ```
+ Description: This API has been discarded and is unavailable currently.
- local\_space\_shrink\(tablespacename TEXT, databasename TEXT\)
diff --git a/content/en/docs/SQLReference/select-into.md b/content/en/docs/SQLReference/select-into.md
index 450dd298b65a951dfb4d9bc686465d18cc8cc0ba..495305d99d74b1c32683d0a6acc924848908f42a 100644
--- a/content/en/docs/SQLReference/select-into.md
+++ b/content/en/docs/SQLReference/select-into.md
@@ -26,7 +26,7 @@ SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCNET ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ]} [...] ];
```
diff --git a/content/en/docs/SQLReference/select.md b/content/en/docs/SQLReference/select.md
index e57be94b7243323b0cfdb67545ab927869814f35..69fdf4214c3ddb2ff293eb250776173eb3950e22 100644
--- a/content/en/docs/SQLReference/select.md
+++ b/content/en/docs/SQLReference/select.md
@@ -30,7 +30,7 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ ORDER BY {expression [ [ ASC | DESC | USING operator ] | nlssort_expression_clause ] [ NULLS { FIRST | LAST } ]} [, ...] ]
[ LIMIT { [offset,] count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
-[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
+[ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ]
[ {FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ]} [...] ];
```
@@ -438,9 +438,9 @@ SELECT [/*+ plan_hint */] [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
**start** specifies the number of rows to skip before starting to return rows.
-- **FETCH \{ FIRST | NEXT \} \[ count \] \{ ROW | ROWS \} ONLY**
+- **FETCH \{ FIRST | NEXT \} \[ count \] \[ PERCENT \] \{ ROW | ROWS \} \{ ONLY | WITH TIES \} **
- If **count** is omitted in a **FETCH** clause, it defaults to **1**.
+ The **FETCH** clause restricts the total number of rows starting from the first row of the return query result, and the default value of **count** is **1**. The **PERCENT** keyword can be used to specify the number of rows returned as a percentage of the query result. The **ONLY** keyword indicates that only the specified number of rows are returned, and the **WITH TIES** keyword indicates that the specified number of rows are returned and all rows with the same values as the last row in the result set are returned in order.
- **FOR UPDATE clause**
@@ -668,4 +668,40 @@ openGauss=# SELECT * FROM tpcds.time_table TIMECAPSULE CSN 107330;
2 | 2021-04-25 17:50:10.886848 | 107324 | time2
3 | 2021-04-25 17:50:16.12921 | 107327 | time3
(3 rows)
+
+-- FETCH usage example
+openGauss=# CREATE TABLE employees(employee_id int, department_id int, last_name varchar(50));
+
+-- Insert 20 records
+openGauss=# INSERT INTO employees VALUES (1, 1, 'zhangsan1'), (2, 1, 'zhangsan2'), (3, 1, 'zhangsan3'), (4, 1, 'zhangsan4'), (5, 2, 'lisi1'), (6, 2, 'lisi2'), (7, 2, 'lisi3'), (8, 2, 'lisi4'), (9, 3, 'wangwu1'), (10, 3, 'wangwu2'), (11, 3, 'wangwu3'), (12, 3, 'wangwu4'), (13, 4, 'heliu1'), (14, 4, 'heliu2'), (15, 4, 'heliu3'), (16, 4, 'heliu4'), (17, 5, 'chenqi1'), (18, 5, 'chenqi2'), (19, 5, 'chenqi3'), (20, 5, 'chenqi4');
+
+-- FETCH ... ROWS ONLY:Get the first 3 records
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 3 ROWS ONLY;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 1 | 1 | zhangsan1
+(3 rows)
+
+-- ORDER BY ... FETCH ... ROWS WITH TIES: Get the first 3 records and all records with the same value as the last record
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 3 ROWS WITH TIES;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 1 | 1 | zhangsan1
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 4 | 1 | zhangsan4
+(4 rows)
+
+-- FETCH ... PERCENT ROWS ONLY: Get the first 25% of the records
+openGauss=# SELECT * FROM employees ORDER BY department_id FETCH NEXT 25 PERCENT ROWS ONLY;
+ employee_id | department_id | last_name
+-------------+---------------+-----------
+ 1 | 1 | zhangsan1
+ 2 | 1 | zhangsan2
+ 3 | 1 | zhangsan3
+ 4 | 1 | zhangsan4
+ 5 | 2 | lisi1
+(5 rows)
```
diff --git a/content/en/docs/SQLReference/statistics-information-functions.md b/content/en/docs/SQLReference/statistics-information-functions.md
index 6f602a09d516e448b79bcc6c14c061cc906630ef..b18c7d2aa64bd319b084be9c02e7136bf9d70699 100644
--- a/content/en/docs/SQLReference/statistics-information-functions.md
+++ b/content/en/docs/SQLReference/statistics-information-functions.md
@@ -1840,7 +1840,7 @@ Statistics information functions are divided into the following two categories:
> **NOTE:**
>This function involves distributed nodes. Currently, openGauss is a centralized database, for which the function of the value **global** is the same as that of the value **local** and the second parameter cannot set to be **BY\_CNID**.
-- get\_instr\_wait\_event\(NULL\)
+- get\_instr\_wait\_event\(NULL\) 或 get\_instr\_wait\_event\(integer\)
Description: Obtains the statistics on wait events of the current node.
@@ -1923,15 +1923,11 @@ Statistics information functions are divided into the following two categories:
- create\_wlm\_session\_info\(int flag\)
- Description: Clears top SQL query statement-level statistics recorded in the current memory. Only the administrator can execute this function.
-
- Return type: int
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_session\_info\(int flag\)
- Description: Obtains top SQL query statement-level statistics recorded in the current memory. If the input parameter is not 0, the information is cleared from the memory. Only users with the **system admin** or **monitor admin** permission can execute this function.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_paxos\_stat\_replication\(\)
@@ -2066,15 +2062,11 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_get\_resource\_pool\_info\(int\)
- Description: Obtains resource usage statistics of all users. The input parameter can be any value of the INT type or be null.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_all\_user\_resource\_info\(\)
- Description: Obtains resource usage statistics of all users.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_user\_info\(int\)
@@ -2082,11 +2074,78 @@ Statistics information functions are divided into the following two categories:
Return type: record
-- gs\_wlm\_get\_workload\_records\(\)
+ The following table describes return columns.
+
+
+
Column
+
+
Type
+
+
Description
+
+
+
userid
+
+
oid
+
+
OID of the user
+
+
+
sysadmin
+
+
boolean
+
+
Whether the user has the sysadmin permission
+
+
+
rpoid
+
+
oid
+
+
OID of the resource pool
+
+
+
parentid
+
+
oid
+
+
OID of the parent user
+
+
+
totalspace
+
+
bigint
+
+
Size of the occupied space
+
+
+
spacelimit
+
+
bigint
+
+
Upper limit of the space size
+
+
+
childcount
+
+
integer
+
+
Number of child users
+
+
+
childlist
+
+
text
+
+
Child user list
+
+
+
+
- Description: Obtains all job information in dynamic load management. This function is valid only when dynamic load management is enabled.
+- gs\_wlm\_get\_workload\_records\(\)
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_readjust\_user\_space\(\)
@@ -2108,9 +2167,7 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_session\_respool\(bigint\)
- Description: Obtains the session resource pool information about all backend threads. The input parameter can be any value of the bigint type or can be null.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- gs\_wlm\_get\_session\_info\(\)
@@ -2543,15 +2600,11 @@ Statistics information functions are divided into the following two categories:
- DBE\_PERF.track\_memory\_context\(context\_list text\)
- Description: Sets the memory context whose memory application details need to be collected. The input parameter is the memory context names, which are separated by commas \(,\), for example, **ThreadTopMemoryContext, SessionCacheMemoryContext**. Note that the memory context names are context-sensitive. In addition, the length of a single memory context is 63, and the excess part is truncated. The maximum number of memory contexts that can be collected at a time is 16. If the number of memory contexts exceeds 16, the setting fails. Each time this function is called, the previous statistics result is cleared. When the input parameter is set to **""**, the statistics function is disabled. Only the initial user \(super user\) or a user with the **monadmin **permission can execute this function.
-
- Return type: Boolean
+ Description: This API has been discarded and is unavailable currently.
- DBE\_PERF.track\_memory\_context\_detail\(\)
- Description: Obtains the memory application details of the memory context specified by the **DBE\_PERF.track\_memory\_context** function. For details, see the **DBE\_PERF.track\_memory\_context\_detail** view. Only the initial user \(super user\) or a user with the **monadmin **permission can execute this function.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_mem\_mbytes\_reserved\(tid\)
@@ -2563,9 +2616,7 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_user\_resource\_info\(name text\)
- Description: Queries a user's resource quota and resource usage.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_file\_stat\(\)
@@ -2739,17 +2790,11 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_user\_resource\_info\(name text\)
- Description: Queries a user's resource quota and resource usage. Common users can query only their own information. Administrators can query information about all users.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- create\_wlm\_instance\_statistics\_info
- Description: Saves the historical monitoring data of the current instance persistently.
-
- Parameter: **nan**
-
- Return type: integer
+ Description: This API has been discarded and is unavailable currently.
- gs\_session\_memory
@@ -2804,25 +2849,15 @@ Statistics information functions are divided into the following two categories:
- gs\_wlm\_persistent\_user\_resource\_info\(\)
- Description: Archives all user resource usage statistics to the **gs\_wlm\_user\_resource\_history** system catalog. To query this function, you must have the **sysadmin** permission.
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
- create\_wlm\_operator\_info\(int flag\)
- Description: Clears top SQL operator-level statistics recorded in the current memory. If the input parameter is greater than 0, the information is archived to **gs\_wlm\_operator\_info** and **gs\_wlm\_ec\_operator\_info**. Otherwise, the information is not archived. Only users with the **sysadmin** permission can execute this function.
-
- Return type: int
+ Description: This API has been discarded and is unavailable currently.
- GS\_ALL\_NODEGROUP\_CONTROL\_GROUP\_INFO\(text\)
- Description: Provides Cgroup information for all logical database instances. Before calling this function, you need to specify the name of the logical database instance to be queried. For example, to query the Cgroup information for the installation logical database instance, run the following command:
-
- ```
- SELECT * FROM GS_ALL_NODEGROUP_CONTROL_GROUP_INFO('installation')
- ```
-
- Return type: record
+ Description: This API has been discarded and is unavailable currently.
The following table describes return columns.
@@ -2910,9 +2945,7 @@ Statistics information functions are divided into the following two categories:
- gs\_total\_nodegroup\_memory\_detail
- Description: Returns information about the memory used by the current logical database, in MB.
-
- Return type: SETOF record
+ Description: This API has been discarded and is unavailable currently.
- local\_redo\_time\_count\(\)
diff --git a/content/en/docs/SQLReference/stored-procedure.md b/content/en/docs/SQLReference/stored-procedure.md
index 5fd5eb0634ea50b28bf0e1f11639ac3165cb801e..54bf473de624112750cff676c3dbe6b7b3ad9575 100644
--- a/content/en/docs/SQLReference/stored-procedure.md
+++ b/content/en/docs/SQLReference/stored-procedure.md
@@ -22,6 +22,8 @@
- **[Cursors](cursors.md)**
+- **[Subtype](subtype.md)**
+
- **[Retry Management](retry-management.md)**
- **[Debugging](debugging.md)**
diff --git a/content/en/docs/SQLReference/stored-procedures.md b/content/en/docs/SQLReference/stored-procedures.md
index 79edf02bbd258836c2c28fc8fd5a8f90875207e0..79bf4d9fa233a6c4d8f1b7a79daa5f763317c595 100644
--- a/content/en/docs/SQLReference/stored-procedures.md
+++ b/content/en/docs/SQLReference/stored-procedures.md
@@ -27,7 +27,8 @@ A stored procedure is a set of SQL statements that can implement a specific func
- Delete a stored procedure.
```
- DROP PROCEDURE procedure_name ;
+ DROP PROCEDURE [ IF EXISTS ] procedure_name
+ [ ( [ {[ argname ] [ argmode ] argtype} [, ...] ] ) [ CASCADE | RESTRICT ] ];
```
diff --git a/content/en/docs/SQLReference/subtype.md b/content/en/docs/SQLReference/subtype.md
new file mode 100644
index 0000000000000000000000000000000000000000..743b01bdcc8e37bc95b444e024bfea8ee4f425a1
--- /dev/null
+++ b/content/en/docs/SQLReference/subtype.md
@@ -0,0 +1,47 @@
+# SUBTYPE
+
+## Brief
+OpenGauss supprt subtype in PLSQL. Subtype allow user to build subtype from exists type, and use subtype as exits type. There are Uncontrained Subtype amd Contrained Subtype in OpenGauss.
+- Uncontrained Subtype: An unconstrained subtype has the same set of values as its base type, so it is only another name for the base type.
+ - Unconstrained subtypes of the same base type are interchangeable with each other and with the base type. No data type conversion occurs.
+- Contrained Subtype: A constrained subtype has only a subset of the values of its base type.
+ - A constrained subtype can be implicitly converted to its base type, but the base type can be implicitly converted to the constrained subtype only if the value does not violate a constraint of the subtype.
+ - A constrained subtype can be implicitly converted to another constrained subtype with the same base type only if the source value does not violate a constraint of the target subtype.
+
+## Syntax
+### Uncontrained Subtype
+```
+ SUBTYPE subtype_name IS base_type
+```
+- subtype_name: name of created subtype
+- base_type: base type of created subtype
+
+### Contrained Subtype
+```
+ SUBTYPE subtype_name IS base_type [precision [, scale ] [ NOT NULL ] ]
+```
+- subtype_name: name of created subtype
+- base_type: base type of created subtype
+- If the base type lets you specify size, precision and scale, then you can specify them for its subtypes
+
+
+## Examples
+```
+-- Uncontrained Subtype
+DECLARE
+ SUBTYPE Balance IS NUMBER;
+ a Balance(6,2); --NUMBER(6,2)
+ b Balance; --NUMBER
+BEGIN
+ a := 1000.1234;
+ b := 100000.1234;
+END;
+
+-- Contrained Subtype
+DECLARE
+ SUBTYPE Balance is NUMBER(15,2);
+ a Balance;
+BEGIN
+ a := 1000.1234;
+END;
+```
diff --git a/content/en/docs/SQLReference/system-information-functions.md b/content/en/docs/SQLReference/system-information-functions.md
index 53a49b80b204f142a4237ef68972002b1d59bc66..8f434c0c5bcfda7eb50a9c83466fbc8cdd5d4b6e 100644
--- a/content/en/docs/SQLReference/system-information-functions.md
+++ b/content/en/docs/SQLReference/system-information-functions.md
@@ -2019,75 +2019,39 @@ The following functions provide server transaction information in an exportable
- pg\_stat\_get\_wlm\_realtime\_operator\_info
- Description: Obtains the operator information of the real-time execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, pid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, status text, query\_dop integer, estimated\_rows bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, warning text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_realtime\_ec\_operator\_info
- Description: Obtains the operator information of the EC execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, ec\_operator integer, ec\_status text, ec\_execute\_datanode text, ec\_dsn text, ec\_username text, ec\_query text, ec\_libodbc\_type text, ec\_fetch\_count bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_operator\_info
- Description: Obtains the operator information of the execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, pid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, query\_dop integer, estimated\_rows bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, warning text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_node\_resource\_info
- Description: Obtains the resource information of the current node.
-
- Parameter: nan
-
- Return type: min\_mem\_util integer, max\_mem\_util integer, min\_cpu\_util integer, max\_cpu\_util integer, min\_io\_util integer, max\_io\_util integer, used\_mem\_rate integer
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_session\_wlmstat
- Description: Returns the load information of the current session.
-
- Parameter: pid integer
-
- Return type: datid oid, threadid bigint, sessionid bigint, threadpid integer, usesysid oid, appname text, query text, priority bigint, block\_time bigint, elapsed\_time bigint, total\_cpu\_time bigint, skew\_percent integer, statement\_mem integer, active\_points integer, dop\_value integer, current\_cgroup text, current\_status text, enqueue\_state text, attribute text, is\_plana boolean, node\_group text, srespool name
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_ec\_operator\_info
- Description: Obtains the operator information of the EC execution plan from the internal hash table.
-
- Parameter: nan
-
- Return type: queryid bigint, plan\_node\_id integer, plan\_node\_name text, start\_time timestamp with time zone, duration bigint, tuple\_processed bigint, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, ec\_operator integer, ec\_status text, ec\_execute\_datanode text, ec\_dsn text, ec\_username text, ec\_query text, ec\_libodbc\_type text, ec\_fetch\_count bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_instance\_info
- Description: Returns the load information of the current instance.
-
- Parameter: nan
-
- Return type: instancename text, timestamp, timestamp with time zone, used\_cpu integer, free\_memory integer, used\_memory integer, io\_await double precision, io\_util double precision, disk\_read double precision, disk\_write double precision, process\_read bigint, process\_write bigint, logical\_read bigint, logical\_write bigint, read\_counts bigint, write\_counts bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_instance\_info\_with\_cleanup
- Description: Returns the load information of the current instance and saves the information to the system catalog.
-
- Parameter: nan
-
- Return type: instancename text, timestamp, timestamp with time zone, used\_cpu integer, free\_memory integer, used\_memory integer, io\_await double precision, io\_util double precision, disk\_read double precision, disk\_write double precision, process\_read bigint, process\_write bigint, logical\_read bigint, logical\_write bigint, read\_counts bigint, write\_counts bigint
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_realtime\_session\_info
- Description: Returns the load information of the real-time session.
-
- Parameter: nan
-
- Return type: nodename text, threadid bigint, block\_time bigint, duration bigint, estimate\_total\_time bigint, estimate\_left\_time bigint, schemaname text, query\_band text, spill\_info text, control\_group text, estimate\_memory integer, min\_peak\_memory integer, max\_peak\_memory integer, average\_peak\_memory integer, memory\_skew\_percent integer, min\_spill\_size integer, max\_spill\_size integer, average\_spill\_size integer, spill\_skew\_percent integer, min\_dn\_time bigint, max\_dn\_time bigint, average\_dn\_time bigint, dntime\_skew\_percent integer, min\_cpu\_time bigint, max\_cpu\_time bigint, total\_cpu\_time bigint, cpu\_skew\_percent integer, min\_peak\_iops integer, max\_peak\_iops integer, average\_peak\_iops integer, iops\_skew\_percent integer, warning text, query text, query\_plan text, cpu\_top1\_node\_name text, cpu\_top2\_node\_name text, cpu\_top3\_node\_name text, cpu\_top4\_node\_name text, cpu\_top5\_node\_name text, mem\_top1\_node\_name text, mem\_top2\_node\_name text, mem\_top3\_node\_name text, mem\_top4\_node\_name text, mem\_top5\_node\_name text, cpu\_top1\_value bigint, cpu\_top2\_value bigint, cpu\_top3\_value bigint, cpu\_top4\_value bigint, cpu\_top5\_value bigint, mem\_top1\_value bigint, mem\_top2\_value bigint, mem\_top3\_value bigint, mem\_top4\_value bigint, mem\_top5\_value bigint, top\_mem\_dn text, top\_cpu\_dn text
+ Description: This API has been discarded and is unavailable currently.
- pg\_stat\_get\_wlm\_session\_iostat\_info
@@ -2099,8 +2063,5 @@ The following functions provide server transaction information in an exportable
- pg\_stat\_get\_wlm\_statistics
- Description: Returns session load statistics.
-
- Parameter: nan
+ Description: This API has been discarded and is unavailable currently.
- Return type: statement text, block\_time bigint, elapsed\_time bigint, total\_cpu\_time bigint, qualification\_time bigint, skew\_percent integer, control\_group text, status text, action text
diff --git a/content/en/docs/SQLReference/timecapsule-table.md b/content/en/docs/SQLReference/timecapsule-table.md
index 08378895519beb4ca620b95f0363735fbe22dc9a..cdc729684fefa79030ec303e8a5036e17a22ed3f 100644
--- a/content/en/docs/SQLReference/timecapsule-table.md
+++ b/content/en/docs/SQLReference/timecapsule-table.md
@@ -68,7 +68,7 @@ TIMECAPSULE TABLE [ schema_name.]table_name TO {CSN expr | TIMESTAMP expr | BEFO
- When a dropped table is restored, only the base table name is restored, and the names of other subobjects remain the same as those in the recycle bin. You can run the DDL command to manually change the names of subobjects as required.
- The recycle bin does not support write operations such as DML, DCL, and DDL, and does not support DQL query operations \(supported in later versions\).
- - The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.
+ - The **recyclebin\_retention\_time** parameter has been set for specifying the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires. The expired objects cannot be used to do flashback operations.
- **RENAME TO**
diff --git a/content/en/docs/SQLReference/values.md b/content/en/docs/SQLReference/values.md
index ffb340a81ed6033a5e05effcf87787650b7d557a..9b30b13e500e47a80854d57d25a980150e0512ba 100644
--- a/content/en/docs/SQLReference/values.md
+++ b/content/en/docs/SQLReference/values.md
@@ -16,7 +16,7 @@ VALUES {( expression [, ...] )} [, ...]
[ ORDER BY { sort_expression [ ASC | DESC | USING operator ] } [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
- [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ];
+ [ FETCH { FIRST | NEXT } [ count ] [ PERCENT ] { ROW | ROWS } { ONLY | WITH TIES } ];
```
## Parameter Description
@@ -51,9 +51,9 @@ VALUES {( expression [, ...] )} [, ...]
Specifies the maximum number of returned rows, whereas **start** specifies the number of rows to skip before starting to return rows.
-- **FETCH \{ FIRST | NEXT \} \[ count \] \{ ROW | ROWS \} ONLY**
+- **FETCH \{ FIRST | NEXT \} \[ count \] \[ PERCENT \] \{ ROW | ROWS \} \{ ONLY | WITH TIES \} **
- The **FETCH** clause restricts the total number of rows starting from the first row of the return query result, and the default value of **count** is **1**.
+ The **FETCH** clause restricts the total number of rows starting from the first row of the return query result, and the default value of **count** is **1**. The **PERCENT** keyword can be used to specify the number of rows returned as a percentage of the query result. The **ONLY** keyword indicates that only the specified number of rows are returned, and the **WITH TIES** keyword indicates that the specified number of rows are returned and all rows with the same values as the last row in the result set are returned in order.
## Examples
diff --git a/content/en/docs/SQLReference/variable-definition-statements.md b/content/en/docs/SQLReference/variable-definition-statements.md
index ddcf54503f9504af32bb36a11691972acb2d2c07..5933add7fafaf8695f3add675a4bf3dd080539d0 100644
--- a/content/en/docs/SQLReference/variable-definition-statements.md
+++ b/content/en/docs/SQLReference/variable-definition-statements.md
@@ -74,27 +74,31 @@ ROWTYPE for cursor supports the following features:
Test case:
```
+-- Turn on the precompile switch
set behavior_compat_options='allow_procedure_compile_check';
+-- Creating the table used by the cursor and inserting data
create table int4_table(a NUMBER, b VARCHAR2(5));
-insert into int4_table(a) values(3,'johan');
+insert into int4_table(a, b) values(3,'johan');
create table int_table(a NUMBER, d NUMBER, b VARCHAR2(5));
insert into int_table(a, d, b) values(3, 6,'johan');
+-- Creating package
create or replace package pck1 is
cursor cur1 is select * from int4_table;
-var1 cur1%rowtype:=(3, 'ada');
+var1 cur1%rowtype:=(3, 'ada');-- Use rowtype to get the actual type of the cursor and define a public variable
procedure ppp1;
procedure ppp2(a cur1%rowtype);
end pck1;
/
+-- Creating package body
create or replace package body pck1 is
procedure ppp1() is
cursor cur2 is select * from int_table;
begin
open cur2;
-fetch cur2 into var1;
+fetch cur2 into var1;-- when var1 and cursor cur2 have different query lengths throw error
ppp2(var1);
raise info '%', var1.a;
end;
@@ -106,14 +110,30 @@ end;
end pck1;
/
-call pck1.ppp1();
-ALTER TABLE int_table DROP COLUMN d;
-call pck1.ppp1();
+openGauss=# call pck1.ppp1();-- var1 has 2 columns that do not match the length of the cursor cur2 query result
+ERROR: number of source and target fields in assignment does not match
+DETAIL: strict_multi_assignment check is active.
+HINT: Make sure the query returns the exact list of columns.
+CONTEXT: PL/pgSQL function ppp1() line 4 at FETCH
+
+openGauss=# ALTER TABLE int_table DROP COLUMN d;-- Delete 1 column of the table
+ALTER TABLE
+
+openGauss=# call pck1.ppp1();-- Success
+INFO: 3
+CONTEXT: SQL statement "CALL ppp2(var1)"
+PL/pgSQL function ppp1() line 5 at PERFORM
+INFO: 3
+ ppp1
+------
+
+(1 row)
```
> **NOTICE:**
>- **%TYPE** cannot reference the type of a composite variable or a record variable, a column type of the record type, a column type of a variable of the cross-package composite type, or a column type of a cursor variable of the cross-package type.
>- **%ROWTYPE** cannot reference the type of a composite variable or a record variable and the type of a cross-package cursor.
+>- **%ROWTYPE** cannot reference nested cursors.
## Scope of a Variable
diff --git a/content/en/docs/SQLReference/wlm_user_resource_runtime.md b/content/en/docs/SQLReference/wlm_user_resource_runtime.md
index e2ee469ece561e1aaf814fc6909750b15f1cc56e..5a0ad6cceab611d6ce427ce8dc664c99ebfa5079 100644
--- a/content/en/docs/SQLReference/wlm_user_resource_runtime.md
+++ b/content/en/docs/SQLReference/wlm_user_resource_runtime.md
@@ -24,7 +24,7 @@
integer
-
Used memory (unit: MB)
+
Used memory(The total size of memory used by the user's current active session. If no business is running or the session has ended, the dynamic memory will be automatically reclaimed, resulting in a size of 0.) (unit: MB)
total_memory
@@ -38,7 +38,7 @@
integer
-
Number of CPU cores in use
+
Number of CPU cores in use. CPU usage data is collected only in complex jobs, and the value is the CPU usage of the related Cgroup.
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACCUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
+
In a logical replication process, logic replication slots are used to prevent Xlogs from being reclaimed by the system or VACUUM. A logical replication slot in openGauss is an object that records logical decoding positions. It can be created, deleted, read, and pushed by invoking SQL functions.
diff --git a/content/en/docs/ToolandCommandReference/gs_cgroup.md b/content/en/docs/ToolandCommandReference/gs_cgroup.md
index a960a5314b7cd38b453018a11277e98bad7edf86..e798c1e751fe096bc7a913a1ff91a10856c564a6 100644
--- a/content/en/docs/ToolandCommandReference/gs_cgroup.md
+++ b/content/en/docs/ToolandCommandReference/gs_cgroup.md
@@ -8,6 +8,8 @@ When jobs are batch processed in a cluster, loads on servers significantly vary
For details, see [Resource Load Management](../PerformanceTuningGuide/resource-load-management.md).
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_cgroup directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
## Examples
- Commands executed by a common user or the database administrator:
diff --git a/content/en/docs/ToolandCommandReference/gs_ctl.md b/content/en/docs/ToolandCommandReference/gs_ctl.md
index 14609f6868a600500e4260501adf06c101f24eb4..a0a6763791261be1093ffd471953d572a566fa59 100644
--- a/content/en/docs/ToolandCommandReference/gs_ctl.md
+++ b/content/en/docs/ToolandCommandReference/gs_ctl.md
@@ -12,6 +12,8 @@ The **gs_ctl** utility is executed by the operating system user **omm**.
The **gs_ctl build** tool supports printing progress based on the ratio of the size of the files that have been transferred to the total size of the files that need to be transferred.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_ctl directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
## Parameter Description
The **gs\_ctl** tool can use the following types of parameters:
@@ -132,6 +134,11 @@ The **gs\_ctl** tool can use the following types of parameters:
Set the running mode.
+
startwalrcv
+
+
Find a valid Xlog tail by preparsing Xlogs and start walreceiver thread for receiving Xlogs.
+
+
@@ -679,4 +686,4 @@ The **gs\_ctl** tool can use the following types of parameters:
-
\ No newline at end of file
+
diff --git a/content/en/docs/ToolandCommandReference/gs_dump.md b/content/en/docs/ToolandCommandReference/gs_dump.md
index 4fb979a667f18d687972fc27f5feb82bb2256191..7d5fa5fb8beb4b5fad70315b967364ed761cc04f 100644
--- a/content/en/docs/ToolandCommandReference/gs_dump.md
+++ b/content/en/docs/ToolandCommandReference/gs_dump.md
@@ -16,6 +16,8 @@ The generated columns are not dumped during **gs\_dump** is used.
**gs\_dump** can export database information to a plain-text SQL script file or archive file.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_dump directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
- Plain-text SQL script: It contains the SQL statements required to restore the database. You can use [**gsql**](gsql.md) to execute the SQL script. With only a little modification, the SQL script can rebuild a database on other hosts or database products.
- Archive file: It contains data required to restore the database. It can be a tar-, directory-, or custom-format archive. For details, see [Table 1](#en-us_topic_0287275988_en-us_topic_0237152335_en-us_topic_0058967678_t17db29a12e7342cfbf02b2f6e50ff1a5). The export result must be used with [**gs\_restore**](gs_restore.md) to restore the database. The system allows users to select or even to sort the content to be imported.
diff --git a/content/en/docs/ToolandCommandReference/gs_dumpall.md b/content/en/docs/ToolandCommandReference/gs_dumpall.md
index 3dc0eafcac5cea48b8862d9b921228998f32b8d9..960a68e19dc268bf788d5c51c86a74b397dc135f 100644
--- a/content/en/docs/ToolandCommandReference/gs_dumpall.md
+++ b/content/en/docs/ToolandCommandReference/gs_dumpall.md
@@ -19,6 +19,8 @@ The generated columns are not dumped during **gs\_dumpall** is used.
The exported files are both plain-text SQL scripts. Use [gsql](gsql.md) to execute them to restore openGauss databases.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_dumpall directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
## Precautions
- Do not modify an exported file or its content. Otherwise, restoration may fail.
diff --git a/content/en/docs/ToolandCommandReference/gs_encrypt.md b/content/en/docs/ToolandCommandReference/gs_encrypt.md
index 8d55af99c730b0afe8fca3c2fab2d3c71a12551d..360119a6570f68b8b4d50bd47477c57cb2e73ea4 100644
--- a/content/en/docs/ToolandCommandReference/gs_encrypt.md
+++ b/content/en/docs/ToolandCommandReference/gs_encrypt.md
@@ -4,6 +4,8 @@
**gs\_encrypt** provided by openGauss is used to encrypt the entered plaintext strings.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_encrypt directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
## Syntax
```
diff --git a/content/en/docs/ToolandCommandReference/gs_guc.md b/content/en/docs/ToolandCommandReference/gs_guc.md
index d4f8cc8973fbc856219ad8dcf900944ff46366e9..58ea4a02a563704938344724df1806f42453fe15 100644
--- a/content/en/docs/ToolandCommandReference/gs_guc.md
+++ b/content/en/docs/ToolandCommandReference/gs_guc.md
@@ -4,6 +4,8 @@
The current default values for parameters in the openGauss configuration file (**postgresql.conf** or **pg\_hba.conf**) are all for standalone deployment. Application programs can set parameters as needed by invoking **gs\_guc**.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_guc directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
**gs\_guc** is executed by OS user **omm**.
- **gs\_guc-current.log**
diff --git a/content/en/docs/ToolandCommandReference/gs_initdb.md b/content/en/docs/ToolandCommandReference/gs_initdb.md
index 1a851f4a50b7afa186691be1beeca3984cdb857b..c9a069e891e50d9b8bf98f45d381b986706777fb 100644
--- a/content/en/docs/ToolandCommandReference/gs_initdb.md
+++ b/content/en/docs/ToolandCommandReference/gs_initdb.md
@@ -6,6 +6,8 @@
When a database is initialized using **gs\_initdb**, a database directory is created, a system catalog is generated, and a default database and a template database are created.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_initdb directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
+
**System catalog**
A large number of system catalogs and views are generated when a database is initialized, many of which allow access from any database user.
diff --git a/content/en/docs/ToolandCommandReference/gs_probackup.md b/content/en/docs/ToolandCommandReference/gs_probackup.md
index e87144b66fc52a05c34fedaed6bc155658d34627..da78196388c7f6c8ccd5e9893bd35fc24d6ab9e9 100644
--- a/content/en/docs/ToolandCommandReference/gs_probackup.md
+++ b/content/en/docs/ToolandCommandReference/gs_probackup.md
@@ -56,9 +56,11 @@
```
- Initialize a new backup instance in the _backup-path_ and generate the **pg\_probackup.conf** file, which saves the gs\_probackup settings of the specified data directory _pgdata-path_ (in non-DSS mode).
+- If the - D option is not specified, the default is the database raw data directory $PGDATA
```
- gs_probackup add-instance -B backup-path -D pgdata-path --instance=instance_name
+ gs_probackup add-instance -B backup-path --instance=instance_name
+ [-D pgdata-path]
[-E external-directories-paths]
[remote_options]
[--help]
diff --git a/content/en/docs/ToolandCommandReference/gs_restore.md b/content/en/docs/ToolandCommandReference/gs_restore.md
index 5aa55507f2f5507973964488f72772b737a5ddc0..5e38f8ddffc1a278c2928e766f113ac4920d1120 100644
--- a/content/en/docs/ToolandCommandReference/gs_restore.md
+++ b/content/en/docs/ToolandCommandReference/gs_restore.md
@@ -16,6 +16,7 @@ It has the following functions:
If the database storing imported data is not specified, a script containing the SQL statement to recreate the database is created and written to a file or standard output. This script output is equivalent to the plain text output format of **gs\_dump**.
+Log files generated by the tool are located in the $GAUSSLOG/bin/gs\_restore directory. Each log is limited to a maximum of 16MB, and up to 50 logs are retained. If the GAUSSLOG environment variable is not configured, no log files will be generated.
## Command Format
diff --git a/content/en/docs/ToolandCommandReference/gs_sdr.md b/content/en/docs/ToolandCommandReference/gs_sdr.md
index 086f6c9a13d769fdaec2b94cf076f7e33b45aef1..e325b169fa8a779f9699275dcad5f66ff1f12d31 100644
--- a/content/en/docs/ToolandCommandReference/gs_sdr.md
+++ b/content/en/docs/ToolandCommandReference/gs_sdr.md
@@ -87,6 +87,7 @@ Log in to the OS as the OS user **omm** to run the **gs\_sdr** command.
>
>1. Before the DR relationship is established, you need to create a DR user on the primary cluster for DR authentication. The primary and standby clusters must use the same DR username and password. After a DR relationship is established, the user password cannot be changed. You can remove the DR relationship, modify the username and password, and establish the DR relationship again. The DR user password cannot contain blank characters and the following characters: |;&$<>`\'"{}()[]~*?!\n
>2. If the **-U** and **-W** parameters are not input in the command line, they can be input in interactive mode during the establishment.
+ >3. When the **-W** parameter is entered in the command line, other terminals can view the password through the PS command, which poses a security risk. Suggest inputting through interactive mode.
- -X
diff --git a/content/en/docs/ToolandCommandReference/gs_upgradectl.md b/content/en/docs/ToolandCommandReference/gs_upgradectl.md
index dff4a6aa2472440f850e9828d824328850abf9e9..0d1592d774378f467e9c613e676da2bb156c93cc 100644
--- a/content/en/docs/ToolandCommandReference/gs_upgradectl.md
+++ b/content/en/docs/ToolandCommandReference/gs_upgradectl.md
@@ -8,10 +8,16 @@ Currently, in-place upgrade and gray upgrade are supported. The upgrade modes ar
After you select an upgrade mode, the system automatically determines and selects a proper upgrade policy.
-In-place upgrade: During the upgrade, services must be stopped and all nodes must be upgraded at a time.
+In-place upgrade: During the upgrade, services must be stopped and all nodes must be upgraded at a time . (Starting from version 6.0.0, the In-place upgrade function will no longer be maintained, and gray upgrade will be used by default.)
Gray upgrade: supports operations on all service during the upgrade and upgrades all nodes at a time. \(This function is supported in versions later than openGauss 1.1.0.\)
+Upgrade of specified nodes: Upgrade a specified node to support full-service operations, you can upgrade some specified nodes first, and then upgrade the remaining nodes (versions later than openGauss 3.1.0 support this function).
+
+Upgrade status query: The upgrade status is automatically recorded after each upgrade operation, and the upgrade status can be queried in real time.
+
+Grayscale upgrade supports progress printing, and the progress is printed according to the process executed by the program.
+
## Precautions
- Do not perform the upgrade, scale-out, and scale-in at the same time.
@@ -40,100 +46,111 @@ Gray upgrade: supports operations on all service during the upgrade and upgrades
## Syntax
-- Display help information.
+- Display help information.
+
+ ```shell
+ gs_upgradectl -? | --help
+ ```
+
+- Display version information.
- ```
- gs_upgradectl -? | --help
- ```
+ ```shell
+ gs_upgradectl -V | --version
+ ```
-- Display version information.
+- Select an upgrade policy.
- ```
- gs_upgradectl -V | --version
- ```
+ ```shell
+ gs_upgradectl -t chose-strategy [-l LOGFILE]
+ ```
-- Select an upgrade policy.
+- Automatically upgrade openGauss
- ```
- gs_upgradectl -t chose-strategy [-l LOGFILE]
- ```
+ ```shell
+ gs_upgradectl -t auto-upgrade -X XMLFILE [-l LOGFILE] [--grey]
+ ```
-- Automatically upgrade openGauss
+- Automatically roll back the upgrade.
- ```
- gs_upgradectl -t auto-upgrade -X XMLFILE [-l LOGFILE] [--grey]
- ```
+ ```shell
+ gs_upgradectl -t auto-rollback -X XMLFILE [-l LOGFILE] [--force]
+ ```
-- Automatically roll back the upgrade.
+- Upgrade status query.
- ```
- gs_upgradectl -t auto-rollback -X XMLFILE [-l LOGFILE] [--force]
- ```
+ ```shell
+ gs_upgradectl -S show-step
+ ```
-- Submit the upgrade project.
+- Submit the upgrade project.
- ```
- gs_upgradectl -t commit-upgrade -X XMLFILE [-l LOGFILE]
- ```
+ ```shell
+ gs_upgradectl -t commit-upgrade -X XMLFILE [-l LOGFILE]
+ ```
- > **NOTE:**
- >
- >- Once the operation is complete, the rollback operation cannot be performed.
+ > **NOTE:**
+ >
+ >- Once the operation is complete, the rollback operation cannot be performed.
## Parameter Description
-- -t
+- -t
- Specifies the **gs\_upgradectl** command type.
+ Specifies the **gs\_upgradectl** command type.
- Valid value: chose-strategy, auto-upgrade, auto-rollback, and commit-upgrade
+ Valid value: chose-strategy, auto-upgrade, auto-rollback, and commit-upgrade
-- -l
+- -S
- Records log information during the upgrade or rollback.
+ Upgrade status query.
- Value range: any existing absolute path that can be accessed
+- -l
- Default value: **/var/log/gaussdb/**_User name_**/om/gs\_upgradectl-YYYY-MM-DD\_hhmmss.log**
+ Records log information during the upgrade or rollback.
-- -?, --help
+ Value range: any existing absolute path that can be accessed
- Displays help information.
+ Default value: **/var/log/gaussdb/**_User name_**/om/gs\_upgradectl-YYYY-MM-DD\_hhmmss.log**
-- -V, --version
+- -?, --help
- Displays version information.
+ Displays help information.
-- -X
+- -V, --version
- Specifies the openGauss configuration file.
+ Displays version information.
- Value range: storage paths of XML files
+- -X
-- --grey
+ Specifies the openGauss configuration file.
- Perform gray upgrade.
+ Value range: storage paths of XML files
-- -h
- upgrade specified and partial nodes, this parameter must be used with --grey.
+- --grey
- Value range: single node or multiple node
+ Perform gray upgrade.
-- --continue
+- -h
+ upgrade specified and partial nodes, this parameter must be used with --grey.
- upgrade the remaining upgrade, this parameter must be used with --grey.
+ Value range: single node or multiple node
-- --force
+- --continue
- If openGauss is abnormal and does not support normal rollback, use this parameter to perform a forcible rollback.
+ upgrade the remaining upgrade, this parameter must be used with --grey.
+
+- --force
+
+ If openGauss is abnormal and does not support normal rollback, use this parameter to perform a forcible rollback.
+ (Starting from version 6.0.0, force rollback parameter is no longer maintained.)
## Examples
Example 1: Use the new package to perform pre-upgrade operations.
-```
+```shell
./gs_preinstall -U roach -G users -X /data/xml/3node_3c3d_1m2s_etcd.xml
Parsing the configuration file.
Successfully parsed the configuration file.
@@ -184,7 +201,7 @@ Preinstallation succeeded.
Example 2: Execute the **gs\_upgradectl** script to perform the upgrade.
-```
+```shell
gs_upgradectl -t upgrade -X /data/xml/3node_3c3d_1m2s_etcd.xml
Static configuration matched with old static configuration files.
Performing inplace rollback.
@@ -220,7 +237,7 @@ Once the check done, please execute following command to commit upgrade:
Example 3: Execute the **gs\_upgradectl** script to perform automatic rollback on the upgrade.
-```
+```shell
gs_upgradectl -t auto-rollback -X /data/xml/3node_3c3d_1m2s_etcd.xml
Static configuration matched with old static configuration files.
Performing inplace rollback.
@@ -245,7 +262,7 @@ Rollback succeeded.
Example 4: Execute the **gs\_upgradectl** script to submit the upgrade in in-place mode.
-```
+```shell
gs_upgradectl -t commit -X /data/xml/3node_3c3d_1m2s_etcd.xml
Old cluster app path is /data/gauss/app_e67b8bcd
Successfully Cleaned old install path.
@@ -255,7 +272,7 @@ Commit binary upgrade succeeded.
Example 5: Execute the **gs\_upgradectl** script to perform rolling upgrade.
upgrade specified node
-```
+```shell
gs_upgradectl -t auto-upgrade -X /data/node2.xml --grey -h hostname0
Static configuration matched with old static configuration files.
Successfully set upgrade_mode to 0.
@@ -291,7 +308,7 @@ The nodes ['hostname0']ve been successfully upgraded.Then can upgrade the remain
```
upgrade the remaining node
-```
+```shell
gs_upgradectl -t auto-upgrade -X /data/node2.xml --grey --continue
Static configuration matched with old static configuration files.
Checking upgrade environment.
@@ -326,4 +343,42 @@ gs_upgradectl -t commit-upgrade -X /data/node2.xml
Successfully upgrade all nodes.
```
+Example 6: Use the gs_upgradectl script to perform incremental upgrades of cluster management components.
+
+```shell
+gs_upgradectl -t upgrade-cm --upgrade-package /data/openGauss-3.1.0-CentOS-64bit-cm.tar.gz
+Start ot perform the upgrade of CM component in cluster.
+Ready to transform CM package to all nodes.
+Send CM package to all nodes successfully.
+Start to record origin cluster state.
+cluster origin state is : [Normal]
+Start to prepare CM componet files on all nodes.
+Prepare upgrade CM component files successfully.
+Start to upgrade CM component on all nodes.
+Upgrade CM component files successfully.
+Finial check cluster:
+Cluster state check unavailale.
+Cluster state is : [Normal]
+Cluster state is : [Normal]
+Cluster state is : [Normal]
+The cluster status check is available.
+Upgrade CM component successfully.
+```
+
+Example 7: Use gs_upgradectl script to perform an upgrade status query.
+
+```shell
+gs_upgradectl -S show-step
+doShowUpgradeStep in UpgradeImpl
+Cluster Nodes are ['node1', 'node2'].
+Successfully execute command on all nodes.
+
+Output:
+[SUCCESS] node1:
+gsql (openGauss 6.0.0-RC1 build ed7f8e37) compiled at 2024-03-31 11:59:31 commit 0 last mr
+[SUCCESS] node2:
+gsql (openGauss 6.0.0-RC1 build ed7f8e37) compiled at 2024-03-31 11:59:31 commit 0 last mr
+
+Cluster Not in Upgrading or have been run `upgrade-commit`.
+```
diff --git a/content/en/docs/ToolandCommandReference/parameters-related-to-cm_server.md b/content/en/docs/ToolandCommandReference/parameters-related-to-cm_server.md
index 9713307efb3c72b2a46ea8703d3b6107dc78218b..e51b1666d48d0b477801dcecb2fff385b66732aa 100644
--- a/content/en/docs/ToolandCommandReference/parameters-related-to-cm_server.md
+++ b/content/en/docs/ToolandCommandReference/parameters-related-to-cm_server.md
@@ -202,7 +202,7 @@
## datastorage\_threshold\_value\_check
-**Parameter description**: Specifies the usage threshold of a read-only disk in a database. When the disk usage of the data directory exceeds the specified value, the database is automatically set to read-only.
+**Parameter description**: Specifies the usage threshold of a read-only disk in a database. When the disk usage of the data directory or the symbolic links (mainly for base、global、pg_xlog、pg_tblspc and the following tablespaces) correspond to the real directory exceeds the specified value, the database is automatically set to read-only.
**Value range**: an integer, in the range \[1,99\]. The modification of this parameter takes effect after reloading. For details, see [Options of set cm](cm_ctl.md#table10437204416514).
diff --git a/content/en/docs/ToolandCommandReference/pg_config.md b/content/en/docs/ToolandCommandReference/pg_config.md
index d3d8d5e46d595d882e892f90b1b5dbf6597316f3..4f8ed3b7ceabc42bad257b45ff7a085b32be05b4 100644
--- a/content/en/docs/ToolandCommandReference/pg_config.md
+++ b/content/en/docs/ToolandCommandReference/pg_config.md
@@ -16,7 +16,7 @@ The **pg\_config** tool supports one or more of the following options. If more
- --bindir
- Prints the path of the executable file of a user. For example, you can use this option to find the **psql** program. Generally, this is the path of the **pg\_config** program.
+ Prints the path of the executable file of a user. For example, you can use this option to find the **gsql** program. Generally, this is the path of the **pg\_config** program.
- --docdir
diff --git a/content/en/docs/ToolandCommandReference/server-tools.md b/content/en/docs/ToolandCommandReference/server-tools.md
index 2cbb5c29c35c788797a38101c98d86107a122374..ab9f095ecf7ef3affe56f74c909e9b01c7aacc0f 100644
--- a/content/en/docs/ToolandCommandReference/server-tools.md
+++ b/content/en/docs/ToolandCommandReference/server-tools.md
@@ -22,4 +22,4 @@ During the use of openGauss, installation, upgrade, and health management are re
- **[gs\_ssh](gs_ssh.md)**
-- **[gs_sdr](gs_sdr.md)**
+- **[gs_sdr](gs_sdr.md)**
\ No newline at end of file
diff --git a/content/en/menu/index.md b/content/en/menu/index.md
index 6bbabd586440bd1927a5b197321738db8f2f08b5..8e554b7862bef2d95dcaddcd123cb5d1b0129db9 100644
--- a/content/en/menu/index.md
+++ b/content/en/menu/index.md
@@ -923,6 +923,7 @@ headless: true
- [SELECT]({{< relref "./docs/ExtensionReference/dolphin-SELECT.md" >}})
- [SET CHARSET]({{< relref "./docs/ExtensionReference/dolphin-SET-CHARSET.md" >}})
- [SET PASSWORD]({{< relref "./docs/ExtensionReference/dolphin-SET-PASSWORD.md" >}})
+ - [SHOW CHARSET]({{< relref "./docs/ExtensionReference/dolphin-show-character-set.md" >}})
- [SHOW CHARACTER SET]({{< relref "./docs/ExtensionReference/dolphin-show-character-set.md" >}})
- [SHOW COLLATION]({{< relref "./docs/ExtensionReference/dolphin-show-collation.md" >}})
- [SHOW COLUMNS]({{< relref "./docs/ExtensionReference/dolphin-show_columns.md" >}})
@@ -1288,6 +1289,7 @@ headless: true
- [Support and Constraints]({{< relref "./docs/SQLReference/incremental-materialized-view-support-and-constraints.md" >}})
- [Cursors]({{< relref "./docs/SQLReference/cursors.md" >}})
- [Anonymous Blocks]({{< relref "./docs/SQLReference/anonymous-blocks.md" >}})
+ - [Subtype]({{< relref "./docs/SQLReference/subtype.md" >}})
- [Stored Procedure]({{< relref "./docs/SQLReference/stored-procedure.md" >}})
- [Stored Procedure]({{< relref "./docs/SQLReference/stored-procedures.md" >}})
- [Data Types]({{< relref "./docs/SQLReference/data-types-22.md" >}})
@@ -2902,4 +2904,5 @@ headless: true
- [Usage-related FAQs]({{< relref "./docs/Appendix/usage-related-faqs.md" >}})
- [Error Log Reference]({{< relref "./docs/Appendix/error-log-reference.md" >}})
- [Kernel Error Information]({{< relref "./docs/Appendix/kernel-error-information.md" >}})
+ - [References]({{< relref "./docs/Appendix/references.md" >}})
- [Glossary]({{< relref "./docs/Appendix/glossary.md" >}})
diff --git "a/content/zh/docs/AIFeatureGuide/Slow-Query-Diagnosis-\346\205\242SQL\346\240\271\345\233\240\345\210\206\346\236\220\344\275\277\347\224\250\346\214\207\345\257\274.md" "b/content/zh/docs/AIFeatureGuide/Slow-Query-Diagnosis-\346\205\242SQL\346\240\271\345\233\240\345\210\206\346\236\220\344\275\277\347\224\250\346\214\207\345\257\274.md"
index 9ccd045c590ccdfdca2a3ae959bf6e94e3cc65a6..eb43f7ded9a4c7d828a11acc26ad5d6bed61d455 100644
--- "a/content/zh/docs/AIFeatureGuide/Slow-Query-Diagnosis-\346\205\242SQL\346\240\271\345\233\240\345\210\206\346\236\220\344\275\277\347\224\250\346\214\207\345\257\274.md"
+++ "b/content/zh/docs/AIFeatureGuide/Slow-Query-Diagnosis-\346\205\242SQL\346\240\271\345\233\240\345\210\206\346\236\220\344\275\277\347\224\250\346\214\207\345\257\274.md"
@@ -5,7 +5,7 @@
- 仅启动慢SQL诊断功能(输出Top3根因),启动命令如下(更多用法参考对service子命令的说明):
```
- gs_dbmind service start -c confpath --only-run slow_query_diagnosis
+ gs_dbmind service start -c confpath --only-run slow_sql_diagnosis
```
- 用户交互式慢SQL诊断,命令如下:
diff --git "a/content/zh/docs/AIFeatureGuide/service\345\255\220\345\221\275\344\273\244.md" "b/content/zh/docs/AIFeatureGuide/service\345\255\220\345\221\275\344\273\244.md"
index 1c7c651a9081bfe41349c9a68056c85aaef2a533..6bbb8196ed400db601ddc033c68dad289a8dc64c 100644
--- "a/content/zh/docs/AIFeatureGuide/service\345\255\220\345\221\275\344\273\244.md"
+++ "b/content/zh/docs/AIFeatureGuide/service\345\255\220\345\221\275\344\273\244.md"
@@ -145,7 +145,7 @@ gs_dbmind service start -c confpath
当执行上述命令后,会提示服务已启动。在未指定任何附加参数时,该命令默认会启动所有的后台任务。如果用户只想启动某一个后台任务,需要添加参数 --only-run. 例如,用户只想启动慢SQL根因分析服务,则为:
```
-gs_dbmind service start -c confpath --only-run slow_query_diagnosis
+gs_dbmind service start -c confpath --only-run slow_sql_diagnosis
```
## 关闭服务
@@ -173,18 +173,23 @@ gs_dbmind service --help
```
```
-usage: service [-h] -c DIRECTORY [--only-run {slow_query_diagnosis,forecast}] [--interactive | --initialize] {setup,start,stop}
+usage: service [-h] -c DIRECTORY
+ [--only-run {anomaly_detection,discard_expired_results,daily_inspection,weekly_inspection,monthly_inspection,index_recommend,knob_recommend,slow_query_killer,slow_sql_diagnosis}] [--dry-run]
+ [-f] [--interactive | --initialize]
+ {setup,start,stop,restart,reload}
positional arguments:
- {setup,start,stop}
+ {setup,start,stop,restart,reload}
perform an action for service
-optional arguments:
+options:
-h, --help show this help message and exit
-c DIRECTORY, --conf DIRECTORY
set the directory of configuration files
- --only-run {slow_query_diagnosis,forecast}
+ --only-run {anomaly_detection,discard_expired_results,daily_inspection,weekly_inspection,monthly_inspection,index_recommend,knob_recommend,slow_query_killer,slow_sql_diagnosis}
explicitly set a certain task running in the backend
+ --dry-run run the backend task(s) once. the task to run can be specified by the --only-run argument
+ -f, --force force to stop the process and cancel all in-progress tasks
--interactive configure and initialize with interactive mode
--initialize initialize and check configurations after configuring.
```
@@ -204,7 +209,7 @@ optional arguments:
- 2. 修改部署脚本ock\_rpc\_opengauss.sh参数。
+**表 2** OS和OFED配套关系
- ```
- # Deployment user, which is the same as the opengauss user.
- # It is a non-root user. Ensure that this user exists on all servers.
- USER_NAME="${USER}"
-
- # Deployment server, which can contain native
- HOST_IP=(30.30.xx.7 30.30.xx.8)
-
- # Deployment package. The package name starts with OCK_platform_rpc.
- PACKAGES="OCK_platform_rpc_aarch64_EulerOS.tar.gz"
-
- # Specifies the path from the SCP package to the server.
- # If the path does not exist, the path is automatically created.
- PATH_TO_SCP="/home/ock/test"
-
- # Opengauss environment variable
- GAUSSHOME="/home/ock/mppdb_temp_install"
-
- # OCK_RPC environment variable. Do not change
- OCK_RPC_LIB_PATH="${GAUSSHOME}/lib"
- ```
+
+
在 A 兼容模式下,开启此选项后,FLOAT[(p)] 映射至 numeric,二进制精度 p 取值范围为 [1, 126];未开启时取值范围为 [1, 53]。
+
+
disable_record_type_in_dml
+
禁止虚拟列插入配置项。开启此项后禁止在insert语句中使用record类型变量作为插入值。
+
+create table t1(col1 varchar(10),col varchar(10));
+create table t2(col1 varchar(10),col varchar(10));
+set behavior_compat_options='disable_record_type_in_dml';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+ERROR: The record type variable cannot be used as an insertion value.
+CONTEXT: SQL statement "insert into t2 values(source)"
+PL/pgSQL function inline_code_block line 7 at SQL statement
+
+set behavior_compat_options='';
+insert into t1 values('one','two');
+declare
+ cursor cur1 is select * from t1;
+ source cur1%rowtype:=('ten','wtu');
+begin
+ for source in cur1
+ loop
+ raise notice '%',source;
+ insert into t2 values(source);
+ end loop;
+end;
+/
+NOTICE: (one,two)
+NOTICE: (one,two)
+
+
+
+
+
accept_float_str_as_int
+
是否允许float类型的字符串转成整型(int1,int2, int4, int8)类型。
+
+openGauss=# create table t1(c1 int);
+CREATE TABLE
+openGauss=#
+openGauss=# insert into t1 values ('1.5');
+ERROR: invalid input syntax for integer: "1.5"
+LINE 1: insert into t1 values ('1.5');
+ ^
+CONTEXT: referenced column: c1
+openGauss=#
+openGauss=# set behavior_compat_options ='accept_float_str_as_int';
+SET
+openGauss=# insert into t1 values ('1.5');
+INSERT 0 1
+