云服务器内容精选

  • fix_func_selection 参数说明:是否优化函数匹配策略。 catlist顺序问题:当用户自定义函数与系统函数存在冲突,数据库系统在选择函数时,会受该系统函数在数据库系统中的注册顺序影响,从而导致选择函数结果不同。 参数类型:字符串 参数单位:无 取值范围:''、catlist。 '':不进行优化,与505.1.0版本之前的版本保持一致。 catlist :优化catlist顺序问题(对非B兼容模式进行优化,非B兼容模式下始终优先选择系统函数并执行。B兼容模式与505.1.0版本之前的版本保持一致,可能提示函数不唯一的错误,也可能选中系统函数进行执行)。 默认值: catlist:新安装的数据库的默认值 '':505.1.0版本之前的数据库升级后的默认值 设置方式:该参数属于USERSET类型参数,请参见表1中对应设置方法进行设置。
  • max_allowed_packet 参数说明:M-Compatibility模式数据库行为配置项。 参数原本含义为M-Compatibility兼容模式下数据库和客户端通信单个数据包的长度上限;当前此参数并未用来限制数据库和客户端通信的数据包长度上限,仅用来限制部分函数的返回值上限。影响字符串函数REPEAT、REPLACE、SPACE返回值的上限,以及影响CAST(expr AS BINARY(N))、CONVERT(expr AS BINARY(N))函数中N的取值。该参数属于PGC_SIGHUP类型参数。 参数类型:整型 参数单位:字节 取值范围:1024 ~ 1073741824(取值只能是1024的倍数,非倍数时将向下舍入到最接近的倍数)。 默认值:4194304 设置建议:缺省值4194304。
  • enable_m_format_hook 参数说明:M-Compatibility模式数据库行为配置项。 该参数控制M-Compatibility模式hook是否生效。 参数类型:布尔型 参数单位:无 取值范围: ON:表示M-Compatibility模式数据库允许挂载对应解析执行hook。 OFF:表示M-Compatibility模式数据库不挂载对应解析执行hook。 默认值:ON 设置建议:当前参数仅针对当前未完全适配的外部工具使用,不允许用户使用。
  • gs_format_behavior_compat_options 参数说明:gs_format_behavior_compat_options用于选择GaussDB内部系统函数配置项。 参数类型:字符串 参数单位:无 取值范围:当前只支持表14中的兼容性配置项,当设置多个兼容性配置项时,相邻配置项之间用逗号隔开。 默认值:'sqrt_karatsuba' 表14 gs_format_behavior兼容性配置项 兼容性配置项 兼容性行为控制 'sqrt_karatsuba' 设置此参数:表示在调用sqrt平方根函数时使用Karatsuba平方根算法,karatsuba算法性能更高但是在极少数情况下精度可能会和牛顿迭代算法不一致。 不设置此参数:在计算sqrt平方根算法时会使用默认的牛顿迭代算法进行平方根的计算。 'allow_textconcat_null' 设置此参数:在PG兼容模式下字符串和null值拼接会返回对应的字符串的值。 -- 在PG兼容模式下执行 gaussdb=# set gs_format_behavior_compat_options='allow_textconcat_null'; SET gaussdb=# select 'a' || null || 'b'; ?column? ---------- ab (1 row) 不设置此参数:在PG兼容模式下字符串和null值拼接会返回NULL。 设置方式:该参数属于USERSET类型参数,请参考表1中对应设置方法进行设置。 设置建议:控制一些兼容性特性是否可用,若要更改,请在理解参数含义后谨慎操作,避免因误操作产生意料之外的风险。
  • enable_convert_illegal_char 参数说明:对输出结果中的非法编码是否设置不进行校验并以占位符替换显示。 参数类型:布尔型 参数单位:无 取值范围: on表示开启,特殊字符在查询时将替换为convert_illegal_char_mode参数指定符号的编码。 off表示关闭,查询结果中包含的超出当前字符集编码规则外的编码会校验后报错。 默认值:off 设置方式:该参数属于USERSET类型参数,请参见表2中对应设置方法进行设置。 设置建议:设置为默认值,仅在数据中存在特殊字符且需要对特殊字符进行强制不报错处理时开启该参数。 当数据库字符集为:utf8、zhs16gbk、gb18030、gb18030-2022、latin1时,enable_convert_illegal_char = on时生效,且在数据库客户端与服务端字符集不相同时非法编码将以占位符形式显示。 特殊字符范围:本文所指的特殊字符范围仅包括完全异常编码和混合编码,不支持\u0000字符。若字符编码中包含\u0000字符,在使用时通常会在\u0000处截断,无法保证数据的完整性。 在数据库客户端与服务端字符集不相同时,超出当前服务端字符集外的特殊字符只能通过函数dbe_raw.cast_to_varchar2()写入或导入导出工具写入数据库。 当开启GUC参数时,特殊字符在下表所列的函数、高级包函数中的表现为: 在客户端与服务端字符集一致时:特殊字符在查询时不报错,与开启GUC参数前的行为保持一致。 在客户端与服务端字符集不一致时:特殊字符在查询时显示为占位符(默认为?)。 不建议客户使用函数处理包含特殊字符的字符串,下表所列函数处理包含特殊字符的字符串不会产生报错,但无法保证结果的正确性。 表13 特殊字符支持的函数及高级包函数 序号 函数名/高级包函数名 1 bit_length(string) 2 btrim(string text [, characters text]) 3 char_length(string) character_length(string) 4 chr(cvalue int|bigint) chr(integer) 5 concat(str1,str2) 6 concat_ws(sep text, str"any" [, str"any" [, ...] ]) 7 decode(string text, format text) 8 dump(expr[, return_fmt [, start_position [, length ] ] ]) 9 encode(data bytea, format text) 10 find_in_set(text, set) 11 format(formatstr text [, str"any" [, ...] ]) 12 left(str text, n int) 13 length(string) 14 lengthb(text/bpchar) 15 ltrim(string [, characters]) 16 md5(string) 17 notlike(x bytea name text, y bytea text) 18 octet_length(string) 19 overlay(string placing string FROM int [for int]) 20 quote_ident(string text) 21 quote_literal(string text) 22 quote_nullable(string text) 23 rawcat(raw,raw) 24 regexp_count(string text, pattern text [, position int [, flags text]]) 25 regexp_instr(string text, pattern text [, position int [, occurrence int [, return_opt int [, flags text]]]]) 26 regexp_like(source_string, pattern [, match_parameter]) regexp_like(text,text,text) 27 regexp_matches(string text, pattern text [, flags text]) 28 regexp_replace(string, pattern, replacement [,flags ]) 29 regexp_split_to_array(string text, pattern text [, flags text ]) 30 regexp_split_to_table(string text, pattern text [, flags text]) 31 regexp_substr(source_char, pattern) regexp_substr(string text, pattern text [, position int [, occurrence int [, flags text]]]) 32 repeat(string text, number int ) 33 repexp_replace(string text, pattern text [, replacement text [, position int [, occurrence int [, flags text]]]]) 34 replace(string text, from text, to text) 35 replace(string, substring) 36 reverse(str) 37 right(str text, n int) 38 rtrim(string [, characters]) 39 sha(string) 40 sha1(string) 41 sha2(string,hash_length) 42 split_part(string text, delimiter text, field int) 43 substring(string [from int] [for int]) substring(string from pattern for escape) substring(string from pattern) 44 substring_inner(string [from int] [for int]) 45 tconvert(key text, value text) 46 to_single_byte(char) 47 translate(string text, from text, to text) 48 trim([leading |trailing |both] [characters] from string) 49 unistr(string) 50 vsize(expr) 51 PKG_UTIL.RAW_CAST_FROM_VARCHAR2 52 PKG_UTIL.LOB_CONVERTTOCLOB 53 PKG_UTIL.LOB_RAWTOTEXT 54 PKG_UTIL.LOB_TEXTTORAW 55 PKG_UTIL.RAW_CAST_TO_VARCHAR2 56 DBE_OUTPUT.PUT 57 DBE_OUTPUT.PUT_LINE
  • enable_object_special_character 参数说明:控制执行CREATE EXTENSION语句时,若脚本文件中使用"@extschema@",此时control文件中schema参数的值是否可以包含["$'\]中任意特殊字符。 该参数属于SIGHUP类型参数,请参见表2中对应设置方法进行设置。 取值范围:布尔型 on表示开启,可以包含["$'\]中任意特殊字符。 off表示关闭,不可以包含["$'\]中任意特殊字符。 默认值:off 扩展功能为内部使用功能,不建议用户使用。
  • enable_immutable_optimization 参数说明:控制immutable类型函数是否可以被优化执行,仅当在DBCOMPATIBILITY 为A的数据库中生效。如果带有immutable定义的函数违反immutable语义,则其调用结果、其值以及对其调用者的影响均未定义。 参数类型:布尔型 参数单位:无 取值范围: on:表示开启。 off:表示关闭。 默认值:on 设置方式:该参数属于USERSET类型参数,请参见表2中对应设置方法进行设置。 设置建议:无。
  • a_format_disable_func 参数说明:禁用指定的系统函数。该参数的值由若干个系统函数OID值用逗号隔开组成。设置该参数的系统函数将不能被调用。 当某一系统函数不能满足用户需求并且需要使用相同函数名的自定义函数时可使用该功能。 参数类型:字符串 参数单位:无 取值范围:字符串,由若干个系统函数OID值用逗号隔开组成。 该参数仅支持禁用数据库平台兼容性行为配置项(a_format_version,a_format_dev_version)对应新增的系统函数,请参见表12。 表12 支持被禁用的系统函数 数据库平台兼容性行为配置项 支持被禁用的系统函数 10c,s1 anyarray array_extendnull(anyarray,int4,int4); -- funcoid: 6018 clob empty_clob(); -- funcoid: 3825 int4 instrb(text,text); -- funcoid: 3240 int4 instrb(text,text,int4); -- funcoid: 3241 int4 instrb(text,text,int4,int4); -- funcoid: 3242 numeric months_between(timestamp,timestamp); -- funcoid: 1522 timestamp round(timestamp); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='round' and pronamespace=11 and pronargs=1 and allargtypes[0]=1114; timestamp round(timestamp,text); -- funcoid: 4465 timestamp to_date(text,text,bool); -- funcoid: 1524 timestamp to_date(text,text,text,bool); -- funcoid: 1525 numeric to_number(text,text,bool); -- funcoid: 1787 numeric to_number(text,text,text,bool); -- funcoid: 1788 timestamp to_timestamp(text,text,bool); -- funcoid: 606 timestamp to_timestamp(text,text,text,bool); -- funcoid: 607 timestamptz to_timestamp_tz(text); -- funcoid: 1806 timestamptz to_timestamp_tz(text,text); -- funcoid: 1807 timestamptz to_timestamp_tz(text,text,bool); -- funcoid: 1808 timestamptz to_timestamp_tz(text,text,text,bool); -- funcoid: 1809 10c,s2 text DBTimezone(); -- funcoid: 5562 int8 ascii2(text); -- funcoid: 1625 text asciistr(text); -- funcoid: 1626 text asciistr(blob); -- funcoid: 1629 int4 bit2coding(text); -- funcoid: 9311 int4 bit4coding(text); -- funcoid: 9325 float8 cosh(float8); -- funcoid: 1548 numeric cosh(numeric); -- funcoid: 1549 timestamptz current_timestamp(numeric); -- funcoid: 3257 text dump(any); -- funcoid: 9086 text dump(any,int4); -- funcoid: 9088 text dump(any,int4,int4); -- funcoid: 9089 text dump(any,int4,int4,int4); -- funcoid: 9090 float4 nanvl(float4,float4); -- funcoid: 7112 float4 nanvl(float4,numeric); -- funcoid: 7115 float8 nanvl(float8,float8); -- funcoid: 7113 float4 nanvl(numeric,float4); -- funcoid: 7116 numeric nanvl(numeric,numeric); -- funcoid: 7114 timestamp new_time(timestamp,text,text); -- funcoid: 374 text nls_lower(text); -- funcoid: 4082 text nls_lower(text,text); -- funcoid: 4083 text nls_upper(text); -- funcoid: 4084 text nls_upper(text,text); -- funcoid: 4085 interval numtoyminterval(numeric,text); -- funcoid: 9333 int8 ora_hash(any); -- funcoid: 6127 int8 ora_hash(any,int8); -- funcoid: 6128 text rawtohex2(any); -- funcoid: 9540 numeric remainder(int8,int8); -- funcoid: 9767 numeric remainder(int2,int2); -- funcoid: 9765 numeric remainder(int4,int4); -- funcoid: 9766 float4 remainder(float4,float4); -- funcoid: 9771 float4 remainder(float4,numeric); -- funcoid: 9768 float8 remainder(float8,float8); -- funcoid: 9770 float4 remainder(numeric,float4); -- funcoid: 9769 numeric remainder(numeric,numeric); -- funcoid: 9761 numeric remainder(int1,int1); -- funcoid: 9764 text session_time_zone(); -- funcoid: 9571 float8 sinh(float8); -- funcoid: 1546 numeric sinh(numeric); -- funcoid: 1547 timestamp sys_extract_utc(timestamp); -- funcoid: 5258 timestamp sys_extract_utc(timestamptz); -- funcoid: 5259 float8 tanh(float8); -- funcoid: 9762 numeric tanh(numeric); -- funcoid: 9763 float8 to_binary_double(text); -- funcoid: 9669 float8 to_binary_double(text,text); -- funcoid: 9670 float8 to_binary_double(text,text,bool); -- funcoid: 9671 float8 to_binary_double(text,text,text,bool); -- funcoid: 9672 float4 to_binary_float(text); -- funcoid: 9673 float4 to_binary_float(text,text); -- funcoid: 9674 float4 to_binary_float(text,text,bool); -- funcoid: 9675 float4 to_binary_float(text,text,text,bool); -- funcoid: 9676 blob to_blob(any); -- funcoid: 6990 interval to_dsinterval(text); -- funcoid: 9126 interval to_dsinterval(text,text,bool); -- funcoid: 9127 text to_multi_byte(text); -- funcoid: 9537 text to_multi_byte(blob); -- funcoid: 9539 varchar to_nchar(int8); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=20; varchar to_nchar(int2); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=21; varchar to_nchar(int4); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=23; text to_nchar(text); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=25; varchar to_nchar(float4); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=700; varchar to_nchar(float8); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=701; varchar to_nchar(numeric); -- funcoid: 通过查询语句获取 select oid from pg_proc where proname='to_nchar' and pronamespace=11 and pronargs=1 and allargtypes[0]=1700; text to_nchar(timestamp); -- funcoid: 5698 text to_nchar(timestamptz); -- funcoid: 5699 text to_nchar(anyset); -- funcoid: 5700 text to_nchar(int8,text); -- funcoid: 5694 text to_nchar(int4,text); -- funcoid: 5693 text to_nchar(float4,text); -- funcoid: 5695 text to_nchar(float8,text); -- funcoid: 5696 text to_nchar(timestamp,text); -- funcoid: 5697 text to_nchar(timestamptz,text); -- funcoid: 5691 text to_nchar(interval,text); -- funcoid: 5690 text to_nchar(numeric,text); -- funcoid: 5692 text to_single_byte(text); -- funcoid: 9536 text to_single_byte(blob); -- funcoid: 9538 interval to_yminterval(text); -- funcoid: 9124 interval to_yminterval(text,text,bool); -- funcoid: 9125 text tz_offset(text); -- funcoid: 706 text unistr(text); -- funcoid: 9081 text unistr(blob); -- funcoid: 9082 int4 vsize(any); -- funcoid: 9083 10c,s4 clob getclobval(xml); -- funcoid: 8011 varchar getstringval(xml); -- funcoid: 6976 nvarchar2 nchr(int8); -- funcoid: 1694 timestamptz to_timestamp_tz(text,text,text); -- funcoid: 1804 timestamptz to_timestamp_tz(text,text,text,text,bool); -- funcoid: 1805 默认值:'' 设置方式:该参数属于SUSET类型参数,请参见表2中对应设置方法进行设置。 设置建议:数据库平台兼容性行为配置项(a_format_version,a_format_dev_version)未开启时其对应新增的系统函数默认不可用,无须使用该参数进行禁用。
  • auto_increment_cache 参数说明:对自动增长列批量插入或导入触发自增时,预留自增缓存值的个数。预留自增值时刷新自增计数器为自增缓存值的最大值,缓存值使用完毕之前,自增计数器值不变,触发自增使用缓存的值。 预留的缓存值仅在语句内有效,若预留的自增缓存值没有全部被使用,后续插入语句基于自增计数器触发自增,会出现表中自动增长列的值不连续的情况。 并行导入或插入自动增长列触发自增时,每个并行线程预留的缓存值也只在其线程中使用,未完全使用完毕的话,也会出现表中自动增长列的值不连续的情况。 对已有数据的表添加自动增长列或修改某列为自动增长列时,已有数据触发自增,预留自增缓存值也受此参数影响。 此参数不影响本地临时表中的自动增长列。 仅在b_format_version='5.7'且b_format_dev_version='s2'时生效。 默认值:0 参数类型:整型 参数单位:无 取值范围:0 ~ INT_MAX 参数值为0时,自动预留自增缓存值。 第一次触发自增时,若已知即将插入自动增长列的行数,预留已知数量的值。 例如:“INSERT INTO table SELECT ...”和COPY FROM触发自增值无法获取即将插入的行数。ALTER TABLE命令表数据重写时,若触发自增,使用统计信息中的reltuples作为即将预留的行数。 “INSERT INTO table VALUES(...),(...),...”由于要分布到不同DN,在某些执行计划中,DN获取不到即将插入的行数。 若行数未知,每次预留2^n个值,例如,第一次自增预留1个值,第二次自增预留2个值,第三次预留4个值,第四次预留8个值,以此类推,若预留值个数超过65535,预留65535个值。 参数值不为0时,预留缓存值的数量为参数值。 第一次触发自增时,若已知即将插入自动增长列的行数,预留已知数量的值。 若行数未知,每次预留auto_increment_cache数量的自增值。 默认值:0 设置方式:该参数属于USERSET类型参数,请参考表1中对应设置方法进行设置。 设置建议:推荐使用默认值,若默认情况产生自增值不连续的情况,可以根据用户即将批量插入数据量调整参数值。参数值越大,批量插入性能越优,也更可能产生不连续的自增值。
  • disable_plsql_keyword_options 参数说明:用于将设置的标识符当作非关键字使用。数据库兼容性行为配置项,该参数的值由若干个配置项用逗号隔开构成。 参数类型:字符串 参数单位:无 取值范围: PIPE PIPELINED RANGE REPLACE SUBTYPE '' 默认值:'' 设置方式:该参数属于USERSET类型参数,请参见表1中对应设置方法进行设置。 设置建议:无 该参数打开后,作为关键字使用的部分功能会失效,请谨慎使用。 如需取消屏蔽plsql关键字功能,请将该参数设置为空值。
  • plpgsql.variable_conflict 参数说明:设置同名的存储过程变量和表的列的使用优先级。 该参数属于USERSET类型参数,仅支持表1中对应设置方法3进行设置。 取值范围:字符串 error表示遇到存储过程变量和表的列名同名则编译报错。 use_variable表示存储过程变量和表的列名同名则优先使用变量。 use_column表示存储过程变量和表的列名同名则优先使用列名。 默认值:error
  • td_compatible_truncation 参数说明:控制是否开启与Teradata数据库相应兼容的特征。该参数在用户连接上与TD兼容的数据库时,可以将参数设置成为on(即超长字符串自动截断功能启用),该功能启用后,在后续的insert语句中,对目标表中char和varchar类型的列插入超长字符串时,会按照目标表中相应列定义的最大长度对超长字符串进行自动截断。保证数据都能插入目标表中,而不是报错。 超长字符串自动截断功能不适用于insert语句包含外表的场景。 如果向字符集为字节类型编码(SQL_ASCII、LATIN1等)的数据库中插入多字节字符数据(如汉字等),且字符数据跨越截断位置,这种情况下,按照字节长度自动截断,自动截断后会在尾部产生非预期结果。如果用户有对于截断结果正确性的要求,建议用户采用UTF8等能够按照字符截断的输入字符集作为数据库的编码集。 该参数属于USERSET类型参数,请参见表1中对应设置方法进行设置。 取值范围:布尔型 on表示启动超长字符串自动截断功能。 off表示停止超长字符串自动截断功能。 默认值:off
  • enable_volatile_match_index 参数说明:控制volatile类型函数是否可以匹配索引,仅当在DBCOMPATIBILITY 为A的数据库中生效。volatile函数匹配索引存在语义风险,stable、immutable函数默认可以匹配索引,且符合语义。强烈建议根据函数实际易变性进行设置,而不是开启该参数。 该参数属于SUSET类型参数,请参见表1中对应设置方法进行设置。 取值范围:布尔型 on表示开启。 off表示关闭。 默认值:off
  • disable_keyword_options 参数说明:数据库兼容性行为配置项,该参数的值由若干个配置项用逗号隔开构成。设置该参数的标识符将不会作为关键字使用。 该参数属于USERSET类型参数,请参见表1中对应设置方法进行设置。 非M-Compatibility下取值范围:字符串,支持设置以下关键字:auto_increment、change、charset、columns、compile、completion、containing、convert、csn、datetime、db4aishot、dbtimezone、discard_path、distributed、dumpfile、ends、entityescaping、escaped、evalname、event、events、expdp、extend、gsiusable、gsivalid、gsiwaitall、finish、ilm_pidx_list、impdp、ifnull、invisible、json_object、lines、link、lnnvl、load_discard、locked、mark、nocache、noentityescaping、noextend、noscale、nvl2、ordinality、outfile、performance、pivot、public、recover、regexp_like、scale、schedule、separator、sessiontimezone、shrink、slave、specification、starting、starts、subpartitions、substr、unpivot、verify、visible、wellformed、xmltype、regexp、rlike、zerofill。 非M-Compatibility下默认值:"datetime,regexp,rlike,zerofill"。 M-Compatibility下取值范围:字符串,支持设置以下关键字:active、admin、array、authentication、buckets、bulk、challenge_response、clone、component、cume_dist、definition、dense_rank、description、empty、enforced、engine_attribute、except、exclude、factor、failed_login_attempts、finish、first_value、following、generate、geomcollection、get_master_public_key、get_source_public_key、grouping、groups、gtid_only、histogram、history、inactive、initial、initiate、intersect、invisible、json_table、json_value、keyring、lag、last_value、lateral、lead、locked、master_compression_algorithms、master_public_key_path、master_tls_ciphersuites、master_zstd_compression_level、member、nested、nowait、nth_value、ntile、nulls、of、off、oj、old、optional、ordinality、organization、others、over、password_lock_time、path、percent_rank、persist、persist_only、preceding、privilege_checks_user、process、random、rank、recursive、reference、registration、replica、replicas、require_row_format、resource、respect、restart、retain、returning、reuse、role、row_number、secondary、secondary_engine、secondary_engine_attribute、secondary_load、secondary_unload、skip、source_auto_position、source_bind、source_compression_algorithms、source_connect_retry、source_delay、source_heartbeat_period、source_host、source_log_file、source_log_pos、source_password、source_port、source_public_key_path、source_retry_count、source_ssl、source_ssl_ca、source_ssl_capath、source_ssl_cert、source_ssl_cipher、source_ssl_crl、source_ssl_crlpath、source_ssl_key、source_ssl_verify_server_cert、source_tls_ciphersuites、source_tls_version、source_user、source_zstd_compression_level、srid、stream、system、thread_priority、ties、tls、unbounded、unregister、url、vcpu、visible、window、zone、lc_collate、least、load_bad、load_discard、location、minvalue、move、nocycle、node、nomaxvalue、nominvalue、nvl、nvl2、oids、operator、owned、prepared、recyclebin、reindex、reject、relative、scroll、sequence、setof、shippable、size、slice、smalldatetime、smalldatetime_format、split、stable、stdin、stdout、strict、substring、sysdate、trim、unusable、vacuum、valid、varchar2、verbose、version、within、xmlattributes、xmlconcat、xmlelement、xmlforest、xmlpi、xmlroot、xmltype。 M-Compatibility下默认值:"" 该参数打开后,作为关键字使用的部分功能会失效,请谨慎使用。
  • sql_mode 参数说明:B兼容模式下和M-Compatibility模式下SQL行为控制配置项。 依赖sql_compatibility兼容性参数设置为B、b_format_version设置为'5.7'、b_format_dev_version 设置为's1'时,sql_mode才会生效;或者sql_compatibility兼容性参数设置为M时生效。 参数类型:字符串 参数单位:无 取值范围: B模式下空字符串''或 'strict_trans_tables,only_full_group_by,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_auto_create_user,no_engine_substitution,pad_char_to_full_length,no_auto_value_on_zero'中的选项值。 M-Compatibility模式下除支持B模式参数外,还新增了no_unsigned_subtraction、ansi_quotes、allow_invalid_dates、real_as_float。 每个选项值的含义如表9所述。 表9 兼容性配置项 兼容性配置项 兼容性行为控制 B模式参数配置说明 M-Compatibility模式参数配置说明 strict_trans_tables 当前仅支持对B兼容模式数据库和M-Compatibility数据库数据类型及系统函数做校验。 设置时,对输入的参数格式和范围做严格校验。无效值输入或者超过范围时,解析报error。 不设置时,对输入的参数格式和范围做宽松校验,无效值输入或者超过范围时,解析报warning,返回对应数据的0值。 strict_trans_tables、only_full_group_by、no_zero_in_date、no_zero_date、error_for_division_by_zero这五个选项只支持同时设置和取消,不支持只设置其中部分选项。 可独立设置和取消。 only_full_group_by 不允许出现非group by的key值、且不是常量和聚集函数的投影列。 可独立设置和取消。 no_zero_in_date 不允许日期中的年、月、日是0值。 可独立设置和取消。 no_zero_date 不允许日期是0值(0000-00-00)。 可独立设置和取消。 error_for_division_by_zero 不允许被0除。 可独立设置和取消。 no_auto_create_user 无实际作用,仅用作SET SQL_MODE语句包含此选项时不报错的兼容作用。 可独立设置和取消。 可独立设置和取消。 no_engine_substitution 无实际作用,仅用作SET SQL_MODE语句包含此选项时不报错的兼容作用。 可独立设置和取消。 可独立设置和取消。 pad_char_to_full_length 用于表中的char类型列格式化输出,包含时输出带有尾部空格的字符串,否则输出不带尾部空格字符串。 可独立设置和取消。 可独立设置和取消。 no_auto_value_on_zero 包含此选项后,向AUTO_INCREMENT自动增长列插入0值将不会自增。 可独立设置和取消。 可独立设置和取消。 no_unsigned_subtraction 禁止无符号数减法,如果使用无符号整数进行减法操作,且结果为负数,则会返回一个错误。 - 可独立设置和取消。 ansi_quotes 启用ANSI_QUOTES模式,该模式下双引号被视为标识符引用符号,而不是字符串引用符号。在该模式下,如果使用双引号引用表名或列名,则必须使用双引号引用整个名称,而不能使用反引号。 - 可独立设置和取消。 allow_invalid_dates 允许插入无效日期,如果启用该选项,则MySQL将允许插入无效的日期,例如'0000-00-00'。 - 可独立设置和取消。 real_as_float 默认将REAL类型视为DOUBLE类型,如果启用该选项,则将REAL类型视为FLOAT类型。 - 可独立设置和取消。 默认值:'strict_trans_tables,only_full_group_by,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_auto_create_user,no_engine_substitution' 设置方式:该参数属于USERSET类型参数,请参考表1中对应设置方法进行设置。 设置建议:无。