华为云用户手册

  • 语法格式 修改策略描述: 1 ALTER MASKING POLICY policy_name COMMENTS policy_comments; 修改脱敏方式: 123 ALTER MASKING POLICY policy_name [ADD | REMOVE | MODIFY] masking_actions[, ...]*;其中masking_action: masking_function ON LABEL(label_name[, ...]*) 修改脱敏策略生效场景: 1 ALTER MASKING POLICY policy_name MODIFY(FILTER ON FILTER_TYPE(filter_value[, ...]*)[, ...]*); 移除脱敏策略生效场景,使策略对所用场景生效: 1 ALTER MASKING POLICY policy_name DROP FILTER; 修改脱敏策略开启/关闭: 1 ALTER MASKING POLICY policy_name [ENABLE | DISABLE];
  • 参数说明 policy_name 脱敏策略名称,需要唯一,不可重复。 取值范围:字符串,要符合标识符的命名规范。 policy_comments 需要为脱敏策略添加或修改的描述信息。 masking_function 指的是预置的八种脱敏方式或者用户自定义的函数,支持模式。 maskall不是预置函数,硬编码在代码中,不支持\df展示。 预置时脱敏方式如下: maskall | randommasking | creditcardmasking | basicemailmasking | fullemailmasking | shufflemasking | alldigitsmasking | regexpmasking label_name 资源标签名称。 FILTER_TYPE 指定脱敏策略的过滤信息,过滤类型包括:IP、ROLES、APP。 filter_value 指具体过滤信息内容,例如具体的IP,具体的APP名称,具体的用户名。 ENABLE|DISABLE 可以打开或关闭脱敏策略。若不指定ENABLE|DISABLE,语句默认为ENABLE。
  • 示例 1 2 3 4 5 6 7 8 9101112131415161718192021222324252627282930313233343536 --创建dev_mask和bob_mask用户。openGauss=# CREATE USER dev_mask PASSWORD 'dev@1234';openGauss=# CREATE USER bob_mask PASSWORD 'bob@1234';--创建一个表tb_for_maskingopenGauss=# CREATE TABLE tb_for_masking(col1 text, col2 text, col3 text);--创建资源标签标记敏感列col1openGauss=# CREATE RESOURCE LABEL mask_lb1 ADD COLUMN(tb_for_masking.col1);--创建资源标签标记敏感列col2openGauss=# CREATE RESOURCE LABEL mask_lb2 ADD COLUMN(tb_for_masking.col2);--对访问敏感列col1的操作创建脱敏策略openGauss=# CREATE MASKING POLICY maskpol1 maskall ON LABEL(mask_lb1);--为脱敏策略maskpol1添加描述openGauss=# ALTER MASKING POLICY maskpol1 COMMENTS 'masking policy for tb_for_masking.col1';--修改脱敏策略maskpol1,新增一项脱敏方式openGauss=# ALTER MASKING POLICY maskpol1 ADD randommasking ON LABEL(mask_lb2);--修改脱敏策略maskpol1,移除一项脱敏方式openGauss=# ALTER MASKING POLICY maskpol1 REMOVE randommasking ON LABEL(mask_lb2);--修改脱敏策略maskpol1,修改一项脱敏方式openGauss=# ALTER MASKING POLICY maskpol1 MODIFY randommasking ON LABEL(mask_lb1);--修改脱敏策略maskpol1使之仅对用户dev_mask和bob_mask,客户端工具为psql和gsql,IP地址为'10.20.30.40', '127.0.0.0/24'场景生效。openGauss=# ALTER MASKING POLICY maskpol1 MODIFY (FILTER ON ROLES(dev_mask, bob_mask), APP(psql, gsql), IP('10.20.30.40', '127.0.0.0/24'));--修改脱敏策略maskpol1,使之对所有用户场景生效openGauss=# ALTER MASKING POLICY maskpol1 DROP FILTER;--禁用脱敏策略maskpol1openGauss=# ALTER MASKING POLICY maskpol1 DISABLE;
  • 参数说明 role_name 现有角色名。 取值范围:已存在的用户名。 IN DATABASE database_name 表示修改角色在指定数据库上的参数。 SET configuration_parameter 设置角色的参数。ALTER ROLE中修改的会话参数只针对指定的角色,且在下一次该角色启动的会话中有效。 取值范围: configuration_parameter和value的取值请参见SET。 DEFAULT:表示清除configuration_parameter参数的值,configuration_parameter参数的值将继承本角色新产生的SESSION的默认值。 FROM CURRENT:取当前会话中的值设置为configuration_parameter参数的值。 RESET configuration_parameter/ALL 清除configuration_parameter参数的值。与SET configuration_parameter TO DEFAULT的效果相同。 取值范围:ALL表示清除所有参数的值。 ACCOUNT LOCK | ACCOUNT UNLOCK ACCOUNT LOCK:锁定帐户,禁止登录数据库。 ACCOUNT UNLOCK:解锁帐户,允许登录数据库。 PGUSER 当前版本不允许修改角色的PGUSER属性 PASSWORD/IDENTIFIED BY 'password' 重置或修改用户密码。除了初始用户外其他管理员或普通用户修改自己的密码需要输入正确的旧密码。只有初始用户、系统管理员(sysadmin)或拥有创建用户(CREATEROLE)权限的用户才可以重置普通用户密码,无需输入旧密码。初始用户可以重置系统管理员的密码,系统管理员不允许重置其他系统管理员的密码。应当使用单引号将用户密码括起来。 EXPIRED 设置密码失效。只有初始用户、系统管理员(sysadmin)或拥有创建用户(CREATEROLE)权限的用户才可以设置用户密码失效,其中系统管理员也可以设置自己或其他系统管理员密码失效。不允许设置初始用户密码失效。 密码失效的用户可以登录数据库但不能执行查询操作,只有修改密码或由管理员重置密码后才可以恢复正常查询操作。 其他参数请参见CREATE ROLE的参数说明。
  • 注意事项 只有函数的所有者或者被授予了函数ALTER权限的用户才能执行ALTER FUNCTION命令,系统管理员默认拥有该权限。针对所要修改属性的不同,还有以下权限约束: 如果函数中涉及对临时表相关的操作,则无法使用ALTER FUNCTION。 修改函数的所有者或修改函数的模式,当前用户必须是该函数的所有者或者系统管理员,且该用户是新所有者角色的成员。 只有系统管理员和初始化用户可以将function的schema修改成public。
  • 语法格式 修改自定义函数的附加参数。 ALTER FUNCTION function_name ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) action [ ... ] [ RESTRICT ]; 其中附加参数action子句语法为。 {CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT} | {IMMUTABLE | STABLE | VOLATILE} | {SHIPPABLE | NOT SHIPPABLE} | {NOT FENCED | FENCED} | [ NOT ] LEAKPROOF | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER } | AUTHID { DEFINER | CURRENT_USER } | COST execution_cost | ROWS result_rows | SET configuration_parameter { { TO | = } { value | DEFAULT }| FROM CURRENT} | RESET {configuration_parameter | ALL} 修改自定义函数的名称。 ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) RENAME TO new_name; 修改自定义函数的所属者。 ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) OWNER TO new_owner; 修改自定义函数的模式。 ALTER FUNCTION funname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) SET SCHEMA new_schema;
  • 参数说明 function_name 要修改的函数名称。 取值范围:已存在的函数名。 argmode 标识该参数是输入、输出参数。 取值范围:IN/OUT/INOUT/VARIADIC。 argname 参数名称。 取值范围:字符串,符合标识符命名规范。 argtype 函数参数的类型。 CALLED ON NULL INPUT 表明该函数的某些参数是NULL的时候可以按照正常的方式调用。缺省时与指定此参数的作用相同。 RETURNS NULL ON NULL INPUT STRICT STRICT用于指定如果函数的某个参数是NULL,此函数总是返回NULL。如果声明了这个参数,则如果存在NULL参数时不会执行该函数;而只是自动假设一个NULL结果。 RETURNS NULL ON NULL INPUT和STRICT的功能相同。 IMMUTABLE 表示该函数在给出同样的参数值时总是返回同样的结果。 STABLE 表示该函数不能修改数据库,对相同参数值,在同一次表扫描里,该函数的返回值不变,但是返回值可能在不同SQL语句之间变化。 VOLATILE 表示该函数值可以在一次表扫描内改变,不会做任何优化。 LEAKPROOF 表示该函数没有副作用,指出参数只包括返回值。LEAKPROOF只能由系统管理员设置。 EXTERNAL (可选)目的是和SQL兼容,这个特性适合于所有函数,而不仅是外部函数。 SECURITY INVOKER AUTHID CURRENT_USER 表明该函数将以调用它的用户的权限执行。缺省时与指定此参数的作用相同。 SECURITY INVOKER和AUTHID CURRENT_USER的功能相同。 SECURITY DEFINER AUTHID DEFINER 声明该函数将以创建它的用户的权限执行。 AUTHID DEFINER和SECURITY DEFINER的功能相同。 COST execution_cost 用来估计函数的执行成本。 execution_cost以cpu_operator_cost为单位。 取值范围:正数。 ROWS result_rows 估计函数返回的行数。用于函数返回的是一个集合。 取值范围:正数,默认值是1000行。 configuration_parameter value 把指定的数据库会话参数值设置为给定的值。如果value是DEFAULT或者RESET,则在新的会话中使用系统的缺省设置。OFF关闭设置。 取值范围:字符串。 DEFAULT OFF RESET 指定默认值。 from current 取当前会话中的值设置为configuration_parameter的值。 new_name 函数的新名称。要修改函数的所属模式,必须拥有新模式的CREATE权限。 取值范围:字符串,符合标识符命名规范。 new_owner 函数的新所有者。要修改函数的所有者,新所有者必须拥有该函数所属模式的CREATE权限。 取值范围:已存在的用户角色。 new_schema 函数的新模式。 取值范围:已存在的模式。
  • 语法格式 修改自定义存储过程的附加参数。 ALTER PROCEDURE procedure_name ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) action [ ... ] [ RESTRICT ]; 其中附加参数action子句语法为。 {CALLED ON NULL INPUT | STRICT} | {IMMUTABLE | STABLE | VOLATILE} | {SHIPPABLE | NOT SHIPPABLE} | {NOT FENCED | FENCED} | [ NOT ] LEAKPROOF | { [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER } | AUTHID { DEFINER | CURRENT_USER } | COST execution_cost | ROWS result_rows | SET configuration_parameter { { TO | = } { value | DEFAULT }| FROM CURRENT} | RESET {configuration_parameter | ALL} 修改自定义存储过程的名称。 ALTER PROCEDURE proname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) RENAME TO new_name; 修改自定义存储过程的所属者。 ALTER PROCEDURE proname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) OWNER TO new_owner; 修改自定义存储过程的模式。 ALTER PROCEDURE proname ( [ { [ argname ] [ argmode ] argtype} [, ...] ] ) SET SCHEMA new_schema;
  • 语法格式 修改角色的权限。 ALTER ROLE role_name [ [ WITH ] option [ ... ] ]; 其中权限项子句option为。 {CREATEDB | NOCREATEDB} | {CREATEROLE | NOCREATEROLE} | {INHERIT | NOINHERIT} | {AUDITADMIN | NOAUDITADMIN} | {SYSADMIN | NOSYSADMIN} | {MONADMIN | NOMONADMIN} | {OPRADMIN | NOOPRADMIN} | {POLADMIN | NOPOLADMIN} | {USEFT | NOUSEFT} | {LOGIN | NOLOGIN} | {REPLICATION | NOREPLICATION} | {INDEPENDENT | NOINDEPENDENT} | {VCADMIN | NOVCADMIN} | {PERSISTENCE | NOPERSISTENCE} | CONNECTION LIMIT connlimit | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password' [EXPIRED] | [ ENCRYPTED | UNENCRYPTED ] IDENTIFIED BY 'password' [ REPLACE 'old_password' | EXPIRED ] | [ ENCRYPTED | UNENCRYPTED ] PASSWORD { 'password' | DISABLE | EXPIRED } | [ ENCRYPTED | UNENCRYPTED ] IDENTIFIED BY { 'password' [ REPLACE 'old_password' ] | DISABLE } | VALID BEGIN 'timestamp' | VALID UNTIL 'timestamp' | RESOURCE POOL 'respool' | PERM SPACE 'spacelimit' | PGUSER 修改角色的名称。 ALTER ROLE role_name RENAME TO new_name; 锁定或解锁。 ALTER ROLE role_name ACCOUNT { LOCK | UNLOCK }; 设置角色的配置参数。 ALTER ROLE role_name [ IN DATABASE database_name ] SET configuration_parameter {{ TO | = } { value | DEFAULT } | FROM CURRENT}; 重置角色的配置参数。 ALTER ROLE role_name [ IN DATABASE database_name ] RESET {configuration_parameter|ALL};
  • 参数说明 procedure_name 要修改的存储过程名称。 取值范围:已存在的存储过程名。 argmode 标识该参数是输入、输出参数。 取值范围:IN/OUT/INOUT/VARIADIC。 argname 参数名称。 取值范围:字符串,符合标识符命名规范。 argtype 存储过程参数的类型。 CALLED ON NULL INPUT 表明该存储过程的某些参数是NULL的时候可以按照正常的方式调用。缺省时与指定此参数的作用相同。 IMMUTABLE 表示该存储过程在给出同样的参数值时总是返回同样的结果。 STABLE 表示该存储过程不能修改数据库,对相同参数值,在同一次表扫描里,该函数的返回值不变,但是返回值可能在不同SQL语句之间变化。 VOLATILE 表示该存储过程值可以在一次表扫描内改变,不会做任何优化。 LEAKPROOF 表示该存储过程没有副作用,指出参数只包括返回值。LEAKPROOF只能由系统管理员设置。 EXTERNAL (可选)目的是和SQL兼容,这个特性适合于所有函数,而不仅是外部函数。 SECURITY INVOKER AUTHID CURRENT_USER 表明该存储过程将以调用它的用户的权限执行。缺省时与指定此参数的作用相同。 SECURITY INVOKER和AUTHID CURRENT_USER的功能相同。 SECURITY DEFINER AUTHID DEFINER 声明该存储过程将以创建它的用户的权限执行。 AUTHID DEFINER和SECURITY DEFINER的功能相同。 COST execution_cost 用来估计存储过程的执行成本。 execution_cost以cpu_operator_cost为单位。 取值范围:正数。 ROWS result_rows 估计存储过程返回的行数。用于存储过程返回的是一个集合。 取值范围:正数,默认值是1000行。 configuration_parameter value 把指定的数据库会话参数值设置为给定的值。如果value是DEFAULT或者RESET,则在新的会话中使用系统的缺省设置。OFF关闭设置。 取值范围:字符串。 DEFAULT OFF RESET 指定默认值。 from current 取当前会话中的值设置为configuration_parameter的值。 new_name 存储过程的新名称。要修改存储过程的所属模式,必须拥有新模式的CREATE权限。 取值范围:字符串,符合标识符命名规范。 new_owner 存储过程的新所有者。要修改存储过程的所有者,新所有者必须拥有该存储过程所属模式的CREATE权限。 取值范围:已存在的用户角色。 new_schema 存储过程的新模式。 取值范围:已存在的模式。
  • 注意事项 只有存储过程的所有者或者被授予了存储过程ALTER权限的用户才能执行ALTER PROCEDURE命令,系统管理员默认拥有该权限。针对所要修改属性的不同,还有以下权限约束: 如果存储过程中涉及对临时表相关的操作,则无法使用ALTER PROCEDURE。 修改存储过程的所有者或修改存储过程的模式,当前用户必须是该存储过程的所有者或者系统管理员,且该用户是新所有者角色的成员。 只有系统管理员和初始化用户可以将procedure的schema修改成public。
  • 示例 --开始一个事务。openGauss=# START TRANSACTION;--定义一个名为cursor1的游标。openGauss=# CURSOR cursor1 FOR SELECT * FROM tpcds.reason;--忽略游标cursor1的前3行。openGauss=# MOVE FORWARD 3 FROM cursor1;--抓取游标cursor1的前4行。openGauss=# FETCH 4 FROM cursor1; r_reason_sk | r_reason_id | r_reason_desc -------------+------------------+------------------------------------------------------------------------------------------------------ 4 | AAAAAAAAEAAAAAAA | Not the product that was ordred 5 | AAAAAAAAFAAAAAAA | Parts missing 6 | AAAAAAAAGAAAAAAA | Does not work with a product that I have 7 | AAAAAAAAHAAAAAAA | Gift exchange (4 rows)--关闭游标。openGauss=# CLOSE cursor1;--结束一个事务。openGauss=# END;
  • 参数说明 plan_hint子句 以/*+ */的形式在MERGE关键字后,用于对MERGE对应的语句块生成的计划进行hint调优,详细用法请参见章节使用Plan Hint进行调优。每条语句中只有第一个/*+ plan_hint */注释块会作为hint生效,里面可以写多条hint。 INTO子句 指定正在更新或插入的目标表。 talbe_name 目标表的表名。 partition_clause 指定分区MERGE操作: PARTITION { ( partition_name ) | FOR ( partition_value [, ...] ) } |SUBPARTITION { ( subpartition_name ) | FOR ( subpartition_value [, ...] ) } 关键字详见SELECT一节介绍。 如果value子句的值和指定分区不一致,会抛出异常。 示例详见CREATE TABLE SUBPARTITION。 alias 目标表的别名。 取值范围:字符串,符合标识符命名规范。 USING子句 指定源表,源表可以为表、视图或子查询。 ON子句 关联条件,用于指定目标表和源表的关联条件。不支持更新关联条件中的字段。 WHEN MATCHED子句 当源表和目标表中数据针对关联条件可以匹配上时,选择WHEN MATCHED子句进行UPDATE操作。 不支持更新系统表、系统列。 WHEN NOT MATCHED子句 当源表和目标表中数据针对关联条件无法匹配时,选择WHEN NOT MATCHED子句进行INSERT操作。 不支持INSERT子句中包含多个VALUES。 WHEN MATCHED和WHEN NOT MATCHED子句顺序可以交换,可以缺省其中一个,但不能同时缺省,不支持同时指定两个WHEN MATCHED或WHEN NOT MATCHED子句。 DEFAULT 用对应字段的缺省值填充该字段。 如果没有缺省值,则为NULL。 WHERE condition UPDATE子句和INSERT子句的条件,只有在条件满足时才进行更新操作,可缺省。不支持WHERE条件中引用系统列。不建议使用int等数值类型作为condition,因为int等数值类型可以隐式转换为bool值(非0值隐式转换为true,0转换为false),可能导致非预期的结果。
  • 示例 -- 创建目标表products和源表newproducts,并插入数据openGauss=# CREATE TABLE products(product_id INTEGER,product_name VARCHAR2(60),category VARCHAR2(60));openGauss=# INSERT INTO products VALUES (1501, 'vivitar 35mm', 'electrncs');openGauss=# INSERT INTO products VALUES (1502, 'olympus is50', 'electrncs');openGauss=# INSERT INTO products VALUES (1600, 'play gym', 'toys');openGauss=# INSERT INTO products VALUES (1601, 'lamaze', 'toys');openGauss=# INSERT INTO products VALUES (1666, 'harry potter', 'dvd');openGauss=# CREATE TABLE newproducts(product_id INTEGER,product_name VARCHAR2(60),category VARCHAR2(60));openGauss=# INSERT INTO newproducts VALUES (1502, 'olympus camera', 'electrncs');openGauss=# INSERT INTO newproducts VALUES (1601, 'lamaze', 'toys');openGauss=# INSERT INTO newproducts VALUES (1666, 'harry potter', 'toys');openGauss=# INSERT INTO newproducts VALUES (1700, 'wait interface', 'books');-- 进行MERGE INTO操作openGauss=# MERGE INTO products p USING newproducts np ON (p.product_id = np.product_id) WHEN MATCHED THEN UPDATE SET p.product_name = np.product_name, p.category = np.category WHERE p.product_name != 'play gym' WHEN NOT MATCHED THEN INSERT VALUES (np.product_id, np.product_name, np.category) WHERE np.category = 'books';MERGE 4-- 查询更新后的结果openGauss=# SELECT * FROM products ORDER BY product_id; product_id | product_name | category ------------+----------------+----------- 1501 | vivitar 35mm | electrncs 1502 | olympus camera | electrncs 1600 | play gym | toys 1601 | lamaze | toys 1666 | harry potter | toys 1700 | wait interface | books(6 rows)-- 删除表openGauss=# DROP TABLE products;openGauss=# DROP TABLE newproducts;
  • 语法格式 MOVE [ direction [ FROM | IN ] ] cursor_name; 其中direction子句为可选参数。 NEXT | PRIOR | FIRST | LAST | ABSOLUTE count | RELATIVE count | count | ALL | FORWARD | FORWARD count | FORWARD ALL | BACKWARD | BACKWARD count | BACKWARD ALL
  • 语法格式 MERGE [/*+ plan_hint */] INTO table_name [ partition_clause ] [ [ AS ] alias ]USING { { table_name | view_name } | subquery } [ [ AS ] alias ]ON ( condition )[ WHEN MATCHED THEN UPDATE SET { column_name = { expression | subquery | DEFAULT } | ( column_name [, ...] ) = ( { expression | subquery | DEFAULT } [, ...] ) } [, ...] [ WHERE condition ]][ WHEN NOT MATCHED THEN INSERT { DEFAULT VALUES | [ ( column_name [, ...] ) ] VALUES ( { expression | subquery | DEFAULT } [, ...] ) [, ...] [ WHERE condition ] }];NOTICE: 'subquery' in the UPDATE and INSERT clauses are only avaliable in CENTRALIZED mode!
  • 示例 --SELECT语句,用一个游标读取一个表。开始一个事务。openGauss=# START TRANSACTION;--建立一个名为cursor1的游标。openGauss=# CURSOR cursor1 FOR SELECT * FROM tpcds.customer_address ORDER BY 1;--抓取头3行到游标cursor1里。openGauss=# FETCH FORWARD 3 FROM cursor1; ca_address_sk | ca_address_id | ca_street_number | ca_street_name | ca_street_type | ca_suite_number | ca_city | ca_county | ca_state | ca_zip | ca_country | ca_gmt_offset | ca_location_type ---------------+------------------+------------------+--------------------+-----------------+-----------------+-----------------+-----------------+----------+------------+---------------+---------------+---------------------- 1 | AAAAAAAABAAAAAAA | 18 | Jackson | Parkway | Suite 280 | Fairfield | Maricopa County | AZ | 86192 | United States | -7.00 | condo 2 | AAAAAAAACAAAAAAA | 362 | Washington 6th | RD | Suite 80 | Fairview | Taos County | NM | 85709 | United States | -7.00 | condo 3 | AAAAAAAADAAAAAAA | 585 | Dogwood Washington | Circle | Suite Q | Pleasant Valley | York County | PA | 12477 | United States | -5.00 | single family (3 rows)--关闭游标并提交事务。openGauss=# CLOSE cursor1;--结束一个事务。openGauss=# END;--VALUES子句,用一个游标读取VALUES子句中的内容。开始一个事务。openGauss=# START TRANSACTION;--建立一个名为cursor2的游标。openGauss=# CURSOR cursor2 FOR VALUES(1,2),(0,3) ORDER BY 1;--抓取头2行到游标cursor2里。openGauss=# FETCH FORWARD 2 FROM cursor2;column1 | column2---------+---------0 | 31 | 2(2 rows)--关闭游标并提交事务。openGauss=# CLOSE cursor2;--结束一个事务。openGauss=# END;--WITH HOLD游标的使用,开启事务。openGauss=# START TRANSACTION;--创建一个with hold游标。openGauss=# DECLARE cursor1 CURSOR WITH HOLD FOR SELECT * FROM tpcds.customer_address ORDER BY 1;--抓取头2行到游标cursor1里。openGauss=# FETCH FORWARD 2 FROM cursor1; ca_address_sk | ca_address_id | ca_street_number | ca_street_name | ca_street_type | ca_suite_number | ca_city | ca_county | ca_state | ca_zip | ca_country | ca_gmt_offset | ca_location_type ---------------+------------------+------------------+--------------------+-----------------+-----------------+-----------------+-----------------+----------+------------+---------------+---------------+---------------------- 1 | AAAAAAAABAAAAAAA | 18 | Jackson | Parkway | Suite 280 | Fairfield | Maricopa County | AZ | 86192 | United States | -7.00 | condo 2 | AAAAAAAACAAAAAAA | 362 | Washington 6th | RD | Suite 80 | Fairview | Taos County | NM | 85709 | United States | -7.00 | condo (2 rows)--结束事务。openGauss=# END;--抓取下一行到游标cursor1里。openGauss=# FETCH FORWARD 1 FROM cursor1; ca_address_sk | ca_address_id | ca_street_number | ca_street_name | ca_street_type | ca_suite_number | ca_city | ca_county | ca_state | ca_zip | ca_country | ca_gmt_offset | ca_location_type ---------------+------------------+------------------+--------------------+-----------------+-----------------+-----------------+-----------------+----------+------------+---------------+---------------+---------------------- 3 | AAAAAAAADAAAAAAA | 585 | Dogwood Washington | Circle | Suite Q | Pleasant Valley | York County | PA | 12477 | United States | -5.00 | single family (1 row)--关闭游标。openGauss=# CLOSE cursor1;
  • 功能描述 创建一个预备语句。 预备语句是服务端的对象,可以用于优化性能。在执行PREPARE语句的时候,指定的查询被解析、分析、重写。当随后发出EXECUTE语句的时候,预备语句被规划和执行。这种设计避免了重复解析、分析工作。PREPARE语句创建后在整个数据库会话期间一直存在,一旦创建成功,即便是在事务块中创建,事务回滚,PREPARE也不会删除。只能通过显式调用DEALLOCATE进行删除,会话结束时,PREPARE也会自动删除。
  • 语法格式 FETCH [ direction { FROM | IN } ] cursor_name; 其中direction子句为可选参数。 NEXT | PRIOR | FIRST | LAST | ABSOLUTE count | RELATIVE count | count | ALL | FORWARD | FORWARD count | FORWARD ALL | BACKWARD | BACKWARD count | BACKWARD ALL
  • 注意事项 如果游标定义了NO SCROLL,则不允许使用例如FETCH BACKWARD之类的反向抓取。 NEXT,PRIOR,FIRST,LAST,ABSOLUTE,RELATIVE形式在恰当地移动游标之后抓取一条记录。如果后面没有数据行,就返回一个空的结果,此时游标就会停在查询结果的最后一行之后(向后查询时)或者第一行之前(向前查询时)。 FORWARD和BACKWARD形式在向前或者向后移动的过程中抓取指定的行数,然后把游标定位在最后返回的行上;或者是,如果count大于可用的行数,则在所有行之后(向后查询时)或者之前(向前查询时)。 RELATIVE 0,FORWARD 0,BACKWARD 0都要求在不移动游标的前提下抓取当前行,也就是重新抓取最近刚抓取过的行。除非游标定位在第一行之前或者最后一行之后,这个动作都应该成功,而在那两种情况下,不返回任何行。 当FETCH的游标上涉及列存表时,不支持BACKWARD、PRIOR等涉及反向获取操作。
  • 参数说明 direction_clause 定义抓取数据的方向。 取值范围: NEXT(缺省值) 从当前关联位置开始,抓取下一行。 PRIOR 从当前关联位置开始,抓取上一行。 FIRST 抓取查询的第一行(和ABSOLUTE 1相同)。 LAST 抓取查询的最后一行(和ABSOLUTE -1相同)。 ABSOLUTE count 抓取查询中第count行。 ABSOLUTE抓取不会比用相对位移移动到需要的数据行更快,因为下层的实现必须遍历所有中间的行。 count取值范围:有符号的整数 count为正数,就从查询结果的第一行开始,抓取第count行。 count为负数,就从查询结果末尾抓取第abs(count)行。 count为0时,定位在第一行之前。 RELATIVE count 从当前关联位置开始,抓取随后或前面的第count行。 取值范围:有符号的整数 count为正数就抓取当前关联位置之后的第count行。 count为负数就抓取当前关联位置之前的第abs(count)行。 如果当前行没有数据的话,RELATIVE 0返回空。 count 抓取随后的count行(和FORWARD count一样)。 ALL 从当前关联位置开始,抓取所有剩余的行(和FORWARD ALL一样)。 FORWARD 抓取下一行(和NEXT一样)。 FORWARD count 从当前关联位置开始,抓取随后或前面的count行。 FORWARD ALL 从当前关联位置开始,抓取所有剩余行。 BACKWARD 从当前关联位置开始,抓取前面一行(和PRIOR一样) 。 BACKWARD count 从当前关联位置开始,抓取前面的count行(向后扫描)。 取值范围:有符号的整数 count为正数就抓取当前关联位置之前的count行。 count为负数就抓取当前关联位置之后的abs(count)行。 如果有数据的话,BACKWARD 0重新抓取当前行。 BACKWARD ALL 从当前关联位置开始,抓取所有前面的行(向后扫描) 。 { FROM | IN } cursor_name 使用关键字FROM或IN指定游标名称。 取值范围:已创建的游标的名称。
  • 功能描述 FETCH通过已创建的游标来检索数据。 每个游标都有一个供FETCH使用的关联位置。游标的关联位置可以在查询结果的第一行之前,或者在结果中的任意行,或者在结果的最后一行之后: 游标刚创建完之后,关联位置在第一行之前的。 在抓取了一些移动行之后,关联位置在检索到的最后一行上。 如果FETCH抓取完了所有可用行,它就停在最后一行后面,或者在反向抓取的情况下是停在第一行前面。 FETCH ALL或FETCH BACKWARD ALL将总是把游标的关联位置放在最后一行或者在第一行前面。
  • 示例 -- 创建表空间reason_table_spaceopenGauss=# CREATE TABLESPACE REASON_TABLE_SPACE1 owner tpcds RELATIVE location 'tablespace/tsp_reason1';-- 在表空间创建表tpcds.reason_t1openGauss=# CREATE TABLE tpcds.reason_t1 ( r_reason_sk integer, r_reason_id character(16), r_reason_desc character(100) ) tablespace reason_table_space1;-- 在表空间创建表tpcds.reason_t2openGauss=# CREATE TABLE tpcds.reason_t2 ( r_reason_sk integer, r_reason_id character(16), r_reason_desc character(100) ) tablespace reason_table_space1;-- 在表空间创建表tpcds.reason_t3openGauss=# CREATE TABLE tpcds.reason_t3 ( r_reason_sk integer, r_reason_id character(16), r_reason_desc character(100) ) tablespace reason_table_space1;-- 对表tpcds.reason_t1创建索引openGauss=# CREATE INDEX index_t1 on tpcds.reason_t1(r_reason_id); openGauss=# DROP TABLE tpcds.reason_t1;openGauss=# DROP TABLE tpcds.reason_t2;openGauss=# DROP TABLE tpcds.reason_t3;--查看回收站openGauss=# SELECT rcyname,rcyoriginname,rcytablespace FROM GS_RECYCLEBIN; rcyname | rcyoriginname | rcytablespace -----------------------+---------------+--------------- BIN$16409$2CEE988==$0 | reason_t1 | 16408 BIN$16412$2CF2188==$0 | reason_t2 | 16408 BIN$16415$2CF2EC8==$0 | reason_t3 | 16408 BIN$16418$2CF3EC8==$0 | index_t1 | 0(4 rows)--PURGE清除表openGauss=# PURGE TABLE tpcds.reason_t3;openGauss=# SELECT rcyname,rcyoriginname,rcytablespace FROM GS_RECYCLEBIN; rcyname | rcyoriginname | rcytablespace -----------------------+---------------+--------------- BIN$16409$2CEE988==$0 | reason_t1 | 16408 BIN$16412$2CF2188==$0 | reason_t2 | 16408 BIN$16418$2CF3EC8==$0 | index_t1 | 0(3 rows)--PURGE清除索引openGauss=# PURGE INDEX tindex_t1;openGauss=# SELECT rcyname,rcyoriginname,rcytablespace FROM GS_RECYCLEBIN; rcyname | rcyoriginname | rcytablespace -----------------------+---------------+--------------- BIN$16409$2CEE988==$0 | reason_t1 | 16408 BIN$16412$2CF2188==$0 | reason_t2 | 16408(2 rows)--PURGE清除回收站所有对象openGauss=# PURGE recyclebin;openGauss=# SELECT rcyname,rcyoriginname,rcytablespace FROM GS_RECYCLEBIN; rcyname | rcyoriginname | rcytablespace -----------------------+---------------+---------------(0 rows)
  • 功能描述 为当前事务做两阶段提交的准备。 在命令之后,事务就不再和当前会话关联了;它的状态完全保存在磁盘上,它被提交成功的可能性非常高,即使是在请求提交之前数据库发生了崩溃也如此。 一旦准备好了,一个事务就可以在稍后用COMMIT PREPARED或 ROLLBACK PREPARED命令分别进行提交或者回滚。这些命令可以从任何会话中发出,而不光是最初执行事务的那个会话。 从发出命令的会话的角度来看,PREPARE TRANSACTION不同于ROLLBACK:在执行它之后,就不再有活跃的当前事务了,并且预备事务的效果无法见到 (在事务提交的时候其效果会再次可见)。 如果PREPARE TRANSACTION因为某些原因失败,那么它就会变成一个ROLLBACK,当前事务被取消。
  • CM报错信息 ERRMSG: "Fail to access the cluster static config file." SQLSTATE: c3000 CAUSE: "The cluster static config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to open the cluster static file." SQLSTATE: c3000 CAUSE: "The cluster static config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to read the cluster static file." SQLSTATE: c3001 CAUSE: "The cluster static file permission is insufficient." ACTION: "Please check the cluster static config file." ERRMSG: "Failed to read the static config file." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Could not find the current node in the cluster by the node id %u." SQLSTATE: c3002 CAUSE: "The static config file probably contained content error." ACTION: "Please check static config file." ERRMSG: "Failed to open the logic config file." SQLSTATE: c3000 CAUSE: "The logic config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to read the logic static config file." SQLSTATE: c3001 CAUSE: "The logic static config file permission is insufficient." ACTION: "Please check the logic static config file." ERRMSG: "Failed to open or read the static config file." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Failed to open the log file '%s'." SQLSTATE: c3000 CAUSE: "Log file not found." ACTION: "Please check the log file." ERRMSG: "Failed to open the log file '%s'." SQLSTATE: c3000 CAUSE: "The log file permission is insufficient." ACTION: "please check the log file." ERRMSG: "Failed to open the dynamic config file '%s'." SQLSTATE: c3000 CAUSE: "The dynamic config file permission is insufficient." ACTION: "Please check the dynamic config file." ERRMSG: "Failed to malloc memory, size = %lu." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "unrecognized AZ name '%s'." SQLSTATE: c3000 CAUSE: "The parameter(%s) entered by the user is incorrect." ACTION: "Please check the parameter entered by the user and try again." ERRMSG: "unrecognized minorityAz name '%s'." SQLSTATE: c3000 CAUSE: "The parameter(%s) entered by the user is incorrect." ACTION: "Please check the parameter entered by the user and try again." ERRMSG: "Get GAUSSHOME failed." SQLSTATE: c3000 CAUSE: "The environment variable('GAUSSHOME') is incorrectly configured." ACTION: "Please check the environment variable('GAUSSHOME')." ERRMSG: "Get current user name failed." SQLSTATE: c3000 CAUSE: "N/A" ACTION: "Please check the environment." ERRMSG: "-B option must be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-T option must be specified.\n" SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one node or instance with -m normal." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one node or instance with -m resume." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one availability zone with -m resume." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "log level or cm server arbitration mode must be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "log level or cm server arbitration mode need not be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-R is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -R are needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -D are needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no operation specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no cm directory specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "Please check the usage of switchover." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -z cannot be specified at the same time." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-m cannot be specified at the same time with -n or -z." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node(%d) is invalid." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node is needed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "%s: -C is needed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-z value must be 'ALL' when query mppdb cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-v is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-C is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-Cv is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-L value must be 'ALL' when query logic cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized LC name '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "There is no '%s' information in cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D path is too long.\n" SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D path is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node(%s) is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-R only support when the cluster is single-inst." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-t time is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-votenum is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized build mode." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized build mode '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "too many command-line arguments (first is '%s')." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized operation mode '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no cm directory specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "Failed to malloc memory." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Failed to open etcd: %s." SQLSTATE: c4000 CAUSE: "Etcd is abnoraml." ACTION: "Please check the Cluster Status and try again." ERRMSG: "[PATCH-ERROR] hotpatch command or path set error." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no standby datanode in single node cluster." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "restart logic cluster failed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "restart logic cluster failed" SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "The option parameter is not specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." 父主题: 错误日志信息参考
  • 内核错误信息 ERRMSG: "unsupported syntax: ENCRYPTED WITH in this operation" SQLSTATE: 42601 CAUSE: "client encryption feature is not supported this operation." ACTION: "Check client encryption feature whether supported this operation." ERRMSG: "invalid grant operation" SQLSTATE: 0LP01 CAUSE: "Grant options cannnot be granted to public." ACTION: "Grant grant options to roles." ERRMSG: "unrecognized object kind: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "unrecognized GrantStmt.targtype: %d" SQLSTATE: XX004 CAUSE: "The target type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported target types." ERRMSG: "invalid grant operation" SQLSTATE: 0LP01 CAUSE: "Grant to public operation is forbidden in security mode." ACTION: "Don't grant to public in security mode." ERRMSG: "unrecognized object type" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "invalid grant/revoke operation" SQLSTATE: 0LP01 CAUSE: "Column privileges are only valid for relations in GRANT/REVOKE." ACTION: "Use the column privileges only for relations." ERRMSG: "invalid AccessPriv node" SQLSTATE: 0LP01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized GrantStmt.objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "undefined client master key" SQLSTATE: 42705 CAUSE: "The client master key does not exist." ACTION: "Check whether the client master key exists." ERRMSG: "undefined column encryption key" SQLSTATE: 42705 CAUSE: "The column encryption key does not exist." ACTION: "Check whether the column encryption key exists." ERRMSG: "large object %u does not exist" SQLSTATE: 42704 CAUSE: "The large object does not exist." ACTION: "Check whether the large object exists." ERRMSG: "redundant options" SQLSTATE: 42601 CAUSE: "The syntax 'schemas' is redundant in ALTER DEFAULT PRIVILEGES statement." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "redundant options" SQLSTATE: 42601 CAUSE: "The syntax 'roles' is redundant in ALTER DEFAULT PRIVILEGES statement." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "option '%s' not recognized" SQLSTATE: 42601 CAUSE: "The option in ALTER DEFAULT PRIVILEGES statement is not supported." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "unrecognized GrantStmt.objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for ALTER DEFAULT PRIVILEGES." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "invalid alter default privileges operation" SQLSTATE: 0LP01 CAUSE: "Default privileges cannot be set for columns." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "unrecognized objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for default privileges." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "could not find tuple for default ACL %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unexpected default ACL type: %d" SQLSTATE: 0LP01 CAUSE: "The object type is not supported for default privilege." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "invalid object id" SQLSTATE: 0LP01 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "undefined column" SQLSTATE: 42703 CAUSE: "The column of the relation does not exist." ACTION: "Check whether the column exists." ERRMSG: "column number out of range" SQLSTATE: 0LP01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for attribute %d of relation %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for relation %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unsupported object type" SQLSTATE: 42809 CAUSE: "Index type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "unsupported object type" SQLSTATE: 42809 CAUSE: "Composite type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "wrong object type" SQLSTATE: 42809 CAUSE: "GRANT/REVOKE SEQUENCE only support sequence objects." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "invalid privilege type USAGE for table" SQLSTATE: 0LP01 CAUSE: "GRANT/REVOKE TABLE do not support USAGE privilege." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for tables." ERRMSG: "invalid privilege type %s for column" SQLSTATE: 0LP01 CAUSE: "The privilege type is not supported for column object." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for column object." ERRMSG: "cache lookup failed for database %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for foreign-data wrapper %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for foreign server %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for function %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for language %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "Grant/revoke on untrusted languages if forbidden." SQLSTATE: 0LP01 CAUSE: "Grant/revoke on untrusted languages if forbidden." ACTION: "Support grant/revoke on trusted C languages" ERRMSG: "Forbid grant language c to user with grant option." SQLSTATE: 0A000 CAUSE: "Forbid grant language c to user with grant option." ACTION: "Only support grant language c to user." ERRMSG: "Forbid grant language c to public." SQLSTATE: 0A000 CAUSE: "Forbid grant language c to public." ACTION: "Grant language c to specified users." ERRMSG: "cache lookup failed for large object %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for namespace %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for tablespace %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for type %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cannot set privileges of array types" SQLSTATE: 0LP01 CAUSE: "Cannot set privileges of array types." ACTION: "Set the privileges of the element type instead." ERRMSG: "wrong object type" SQLSTATE: 42809 CAUSE: "GRANT/REVOKE DOMAIN only support domain objects." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "cache lookup failed for data source %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for client master key %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for column encryption key %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for directory %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized privilege type '%s'" SQLSTATE: 42601 CAUSE: "The privilege type is not supported." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." ERRMSG: "unrecognized privilege: %d" SQLSTATE: XX004 CAUSE: "The privilege type is not supported." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." ERRMSG: "unrecognized AclResult" SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "permission denied for column '%s' of relation '%s'" SQLSTATE: 42501 CAUSE: "Insufficient privileges for the column." ACTION: "Select the system tables to get the acl of the column." ERRMSG: "role with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized objkind: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for privilege check." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "attribute %d of relation with OID %u does not exist" SQLSTATE: 42703 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "the column has been dropped" SQLSTATE: 42703 CAUSE: "The column does not exist." ACTION: "Check whether the column exists." ERRMSG: "relation with OID %u does not exist" SQLSTATE: 42P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "invalid group" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "database with OID %u does not exist" SQLSTATE: 3D000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "directory with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "function with OID %u does not exist" SQLSTATE: 42883 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "client master key with OID %u does not exist" SQLSTATE: 42705 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "language with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "large object %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "schema with OID %u does not exist" SQLSTATE: 3F001 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "tablespace with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "foreign-data wrapper with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "foreign server with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "data source with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "type with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator with OID %u does not exist" SQLSTATE: 42883 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "column encryption key with OID %u does not exist" SQLSTATE: 42705 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator class with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator family with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "text search dictionary with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "text search configuration with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "collation with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "conversion with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "extension with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "synonym with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "package can not create the same name with schema." SQLSTATE: 22023 CAUSE: "Package name conflict" ACTION: "Please rename package name" ERRMSG: "type is not exists %s." SQLSTATE: 22023 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "This input type is not supported for tdigest_in()" SQLSTATE: 0A000 CAUSE: "input type is not supported" ACTION: "Check tdigest_in syntax to obtain the supported privilege types" ERRMSG: "Failed to apply for memory" SQLSTATE: 53200 CAUSE: "palloc failed" ACTION: "Check memory" ERRMSG: "Failed to get tde info from relation '%s'." SQLSTATE: XX005 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "SPI_connect failed: %s" SQLSTATE: SP001 CAUSE: "System error." ACTION: "Analyze the error message before the error" ERRMSG: "permission denied for terminate snapshot thread" SQLSTATE: 42501 CAUSE: "The user does not have system admin privilege" ACTION: "Grant system admin to user" ERRMSG: "terminate snapshot thread failed" SQLSTATE: OP001 CAUSE: "Execution failed due to: %s" ACTION: "check if snapshot thread exists" ERRMSG: "terminate snapshot thread failed" SQLSTATE: OP001 CAUSE: "restart wdr snapshot thread timeoutor The thread did not respond to the kill signal" ACTION: "Check the wdr snapshot thread is restarted" ERRMSG: "set lockwait_timeout failed" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "permission denied for create WDR Snapshot" SQLSTATE: 42501 CAUSE: "The user does not have system admin privilege" ACTION: "Grant system admin to user" ERRMSG: "WDR snapshot request can not be accepted, please retry later" SQLSTATE: OP001 CAUSE: "wdr snapshot thread does not exist" ACTION: "Check if wdr snapshot thread exists" ERRMSG: "Cannot respond to WDR snapshot request" SQLSTATE: OP001 CAUSE: "Execution failed due to: %s" ACTION: "Check if wdr snapshot thread exists" ERRMSG: "query(%s) can not get datum values" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create sequence failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check if sequence can be created" ERRMSG: "update snapshot end time stamp filled" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "query can not get datum values" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "SPI_connect failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "query(%s) execute failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "clean table of snap_%s is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "analyze table failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "insert into tables_snap_timestamp start time stamp is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "insert data failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" ERRMSG: "update tables_snap_timestamp end time stamp is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "clean snapshot id %lu is failed in snapshot table" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" ERRMSG: "clean snapshot failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "can not create snapshot stat table" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create WDR snapshot data table failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "insert into tables_snap_timestamp start time stamp failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "insert into snap_%s is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "update tables_snap_timestamp end time stamp failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create index failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "analyze table, connection failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "snapshot thread SPI_connect failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "Distributed key column can't be transformed" SQLSTATE: 42P10 CAUSE: "There is a risk of violating uniqueness when transforming distribution columns." ACTION: "Change transform column." ERRMSG: "cannot convert %s to %s" SQLSTATE: 42804 CAUSE: "There is no conversion path in pg_cast." ACTION: "Rewrite or cast the expression." ERRMSG: "create matview on TDE table failed" SQLSTATE: 0A000 CAUSE: "create materialized views is not supported on TDE table" ACTION: "check CREATE syntax about create the materialized views" ERRMSG: "schema name can not same as package" SQLSTATE: 22023 CAUSE: "schema name conflict" ACTION: "rename schema name" ERRMSG: "Unrecognized commandType when checking read-only attribute." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Fail to generate subquery plan." SQLSTATE: XX005 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Unrecognized node type when processing qual condition." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Unrecognized node type when processing const parameters." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "SELECT FOR UPDATE/SHARE is not allowed with UNION/INTERSECT/EXCEPT" SQLSTATE: 0A000 CAUSE: "SQL uses unsupported feature." ACTION: "Modify SQL statement according to the manual." ERRMSG: "GROUP BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "GROUP BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "TSDB functions cannot be used if enable_tsdb is off." SQLSTATE: D0011 CAUSE: "Functions are not loaded." ACTION: "Turn on enable_tsdb according to manual." ERRMSG: "Unrecognized node type when extracting index." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Ordering operator cannot be identified." SQLSTATE: 42883 CAUSE: "Grouping set columns must be able to sort their inputs." ACTION: "Modify SQL statement according to the manual." ERRMSG: "DISTINCT cannot be implemented." SQLSTATE: 0A000 CAUSE: "DISTINCT uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Failed to locate grouping columns." SQLSTATE: 55000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Resjunk output columns are not implemented." SQLSTATE: 20000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "PARTITION BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "PARTITION BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "ORDER BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "ORDER BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Failed to deconstruct sort operators into partitioning/ordering operators." SQLSTATE: D0011 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "OBS and HDFS foreign table can NOT be in the same plan." SQLSTATE: XX008 CAUSE: "SQL uses unsupported feature." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Pool size should not be zero" SQLSTATE: 22012 CAUSE: "Compute pool configuration file contains error." ACTION: "Please check the value of 'pl' in cp_client.conf." ERRMSG: "Failed to get the runtime info from the compute pool." SQLSTATE: 22004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Version is not compatible between local cluster and the compute pool." SQLSTATE: XX008 CAUSE: "Compute pool is not installed appropriately." ACTION: "Configure compute pool according to manual." ERRMSG: "No optional index path is found." SQLSTATE: 01000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "MERGE INTO on replicated table does not yet support using distributed tables." SQLSTATE: 0A000 CAUSE: "SQL uses unsupported feature." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Fail to find ForeignScan node!" SQLSTATE: P0002 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "sql advisor don't support none table, temp table, system table." SQLSTATE: 42601 CAUSE: "sql advisor don't support none table, temp table, system table." ACTION: "check query component" ERRMSG: "Invalid autonomous transaction return datatypes" SQLSTATE: P0000 CAUSE: "PL/SQL uses unsupported feature." ACTION: "Contact Huawei Engineer." ERRMSG: "new row for relation '%s' violates check constraint '%s'" SQLSTATE: 23514 CAUSE: "some rows copy failed" ACTION: "check table defination" ERRMSG: "new row for relation '%s' violates check constraint '%s'" SQLSTATE: 23514 CAUSE: "some rows copy failed" ACTION: "set client_min_messages = info for more details" ERRMSG: "get gauss home path is NULL" SQLSTATE: XX005 CAUSE: "gauss home path not set" ACTION: "check if $GAUSSHOME is exist" ERRMSG: "unable to open kms_iam_info.json file" SQLSTATE: 58P03 CAUSE: "file not exist or broken" ACTION: "check the kms_iam_info.json file" ERRMSG: "can not get password plaintext" SQLSTATE: XX005 CAUSE: "file not exist or broken" ACTION: "check the password cipher rand file" ERRMSG: "IAM info json key is NULL" SQLSTATE: XX005 CAUSE: "IAM info value error" ACTION: "check tde_config kms_iam_info.json file" ERRMSG: "get internal password is NULL" SQLSTATE: XX005 CAUSE: "cipher rand file missing" ACTION: "check password cipher rand file" ERRMSG: "KMS info json key is NULL" SQLSTATE: XX005 CAUSE: "KMS info value error" ACTION: "check tde_config kms_iam_info.json file" ERRMSG: "unable to get json file" SQLSTATE: 58P03 CAUSE: "parse json file failed" ACTION: "check the kms_iam_info.json file format" ERRMSG: "get JSON tree is NULL" SQLSTATE: XX005 CAUSE: "get KMS JSON tree failed" ACTION: "check input prarmeter or config.ini file" ERRMSG: "failed to get json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input prarmeter or config.ini file" ERRMSG: "failed to set the value of json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input prarmeter or config.ini file" ERRMSG: "http request failed" SQLSTATE: XX005 CAUSE: "http request error" ACTION: "check KMS or IAM connect or config parameter" ERRMSG: "get iam token or iam agency token is NULL" SQLSTATE: XX005 CAUSE: "connect IAM failed" ACTION: "check if your env can connect with IAM server" ERRMSG: "KMS dek json key is NULL" SQLSTATE: XX005 CAUSE: "KMS return value error" ACTION: "check KMS config paramenter" ERRMSG: "get kms dek is NULL" SQLSTATE: XX005 CAUSE: "connect KMS failed" ACTION: "check if your env can connect with KMS server" ERRMSG: "get http header is NULL" SQLSTATE: XX005 CAUSE: "http request failed" ACTION: "check IAM config parameter" ERRMSG: "create KMS dek failed" SQLSTATE: XX005 CAUSE: "KMS error" ACTION: "check KMS connect or config parameter" ERRMSG: "get KMS dek failed" SQLSTATE: XX005 CAUSE: "KMS error" ACTION: "check KMS connect or config parameter" ERRMSG: "get KMS DEK is NULL" SQLSTATE: XX005 CAUSE: "get KMS dek_plaintext failed" ACTION: "check KMS network or cipher is right" ERRMSG: "create matview with TDE failed" SQLSTATE: 0A000 CAUSE: "TDE feature is not supported for Create materialized views" ACTION: "check CREATE syntax about create the materialized views" ERRMSG: "failed to add item to the index page" SQLSTATE: XX002 CAUSE: "System error." ACTION: "Check WARNINGS for the details." ERRMSG: "index row size %lu exceeds maximum %lu for index '%s'" SQLSTATE: 54000 CAUSE: "Values larger than 1/3 of a buffer page cannot be indexed." ACTION: "Consider a function index of an MD5 hash of the value, or use full text indexing." 父主题: 错误日志信息参考
  • aclitem类型 aclitem数据类型是用来存储对象权限信息的,它的内部实现是int类型,支持的格式为‘user1=privs/user2’。 aclitem[]数据类型为aclitem组成的数组,支持的格式为‘{user1=privs1/user3,user2=privs2/user3}’。 其中user1,user2和user3为数据库中已存在的用户/角色名,privs为数据库中支持的权限(参见表1)。 示例: openGauss=# create table table_acl (id int,priv aclitem,privs aclitem[]);-- 新建一张数据表table_acl,有三个字段,类型分别为int,aclitem,aclitem[]openGauss=# insert into table_acl values (1,'user1=arw/omm','{omm=d/user2,omm=w/omm}');--向数据表table_acl插入一条内容为(1,'user1=arw/omm','{omm=d/user2,omm=w/omm}')的数据openGauss=# insert into table_acl values (2,'user1=aw/omm','{omm=d/user2}');--向数据表table_acl再插入一条内容为(2,'user1=aw/omm','{omm=d/user2}')的数据openGauss=# select * from table_acl; id | priv | privs----+---------------+------------------------- 1 | user1=arw/omm | {omm=d/user2,omm=w/omm} 2 | user1=aw/omm | {omm=d/user2}(2 rows) 父主题: 数据类型
  • 获取驱动包 根据不同版本的实例,下载不同版本的发布包,如表1所示。 表1 驱动包下载列表 版本 下载地址 3.x 驱动包 驱动包校验包 2.x 驱动包 驱动包校验包 为了防止软件包在传递过程或存储期间被恶意篡改,下载软件包时需下载对应的校验包对软件包进行校验,校验方法如下: 上传软件包和软件包校验包到虚拟机(Linux操作系统)的同一目录下。 执行如下命令,校验软件包完整性。 cat GaussDB_driver.zip.sha256 | sha256sum --check 如果回显OK,则校验通过。 GaussDB_driver.zip: OK
  • global_syscache_threshold 参数说明:全局系统缓存内存最大占用大小。 该参数属于SIGHUP类型参数,请参考表1中对应设置方法进行设置。 需要打开enable_global_syscache参数。 取值范围:整型,16384~1073741824,单位为kB。 默认值:163840 推荐计算公式:热点DB个数和线程个数的最小值乘以每个DB分配的内存大小 即global_syscache_threshold = min(count(hot dbs),count(threads)) * memofdb 热点DB数即访问较为频繁的数据库,线程数在线程池模式下取线程池线程个数和后台线程个数之和,非线程池模式不需要计算这个值,直接使用热点DB数。 memofdb即平均每个db应该分配的内存,每个DB的底噪内存是2M,平均每增加一个表或者索引,增加11k内存。 如果设置的值过小,会导致内存频繁淘汰,内存存在大量碎片无法回收,导致内存控制失效。
  • 预留参数 下列参数为预留参数,该版本不生效。 acce_min_datasize_per_thread cstore_insert_mode enable_constraint_optimization enable_hadoop_env enable_hdfs_predicate_pushdown enable_orc_cache schedule_splits_threshold backend_version undo_zone_count version_retention_age 父主题: GUC参数说明
共100000条