display_leading_zero
|
Specifies how floating point numbers are displayed.
- If this item is not specified, for a decimal number between -1 and 1, the 0 before the decimal point is not displayed. For example, 0.25 is displayed as .25.
- If this item is specified, for a decimal number between -1 and 1, the 0 before the decimal point is displayed. For example, 0.25 is displayed as 0.25.
|
ORA
TD
|
end_month_calculate
|
Specifies the calculation logic of the add_months function.
Assume that the two parameters of the add_months function are param1 and param2, and that the sum of param1 and param2 is result.
- If this item is not specified, and the Day of param1 indicates the last day of a month shorter than result, the Day in the calculation result will equal that in param1. For example:
| select add_months('2018-02-28',3) from dual;
add_months
---------------------
2018-05-28 00:00:00
(1 row)
|
- If this item is specified, and the Day of param1 indicates the last day of a month shorter than result, the Day in the calculation result will equal that in result. For example:
| select add_months('2018-02-28',3) from dual;
add_months
---------------------
2018-05-31 00:00:00
(1 row)
|
|
ORA
TD
|
compat_analyze_sample
|
Specifies the sampling behavior of the ANALYZE operation.
If this item is specified, the sample collected by the ANALYZE operation will be limited to around 30,000 records, controlling CN memory consumption and maintaining the stability of ANALYZE.
|
ORA
TD
MySQL
|
bind_schema_tablespace
|
Binds a schema with the tablespace with the same name.
If a tablespace name is the same as sche_name, default_tablespace will also be set to sche_name if search_path is set to sche_name.
|
ORA
TD
MySQL
|
bind_procedure_searchpath
|
Specifies the search path of the database object for which no schema name is specified.
If no schema name is specified for a stored procedure, the search is performed in the schema to which the stored procedure belongs.
If the stored procedure is not found, the following operations are performed:
- If this item is not specified, the system reports an error and exits.
- If this item is specified, the search continues based on the settings of search_path. If the issue persists, the system reports an error and exits.
|
ORA
TD
MySQL
|
correct_to_number
|
Controls the compatibility of the to_number() result.
If this item is specified, the result of the to_number() function is the same as that of PG11. Otherwise, the result is the same as that of Oracle.
|
ORA
|
unbind_divide_bound
|
Controls the range check on the result of integer division.
- If this item is not specified, the division result is checked. If the result is out of the range, an error is reported. In the following example, an out-of-range error is reported because the value of INT_MIN/(-1) is greater than the value of INT_MAX.
SELECT (-2147483648)::int / (-1)::int;
ERROR: integer out of range
- If this item is specified, the range of the division result does not need to be checked. In the following example, INT_MIN/(-1) can be used to obtain the output result INT_MAX+1.
SELECT (-2147483648)::int / (-1)::int;
?column?
------------
2147483648
(1 row)
|
ORA
TD
|
merge_update_multi
|
Performs an update if multiple rows are matched for MERGE INTO.
If this item is specified, no error is reported if multiple rows are matched. Otherwise, an error is reported (same as Oracle).
|
ORA
TD
|
return_null_string
|
Specifies how to display the empty result (empty string '') of the lpad(), rpad(), repeat(), regexp_split_to_table(), and split_part() functions.
- If this item is not specified, the empty string is displayed as NULL.
| select length(lpad('123',0,'*')) from dual;
length
--------
(1 row)
|
- If this item is specified, the empty string is displayed as single quotation marks ('').
| select length(lpad('123',0,'*')) from dual;
length
--------
0
(1 row)
|
|
ORA
|
compat_concat_variadic
|
Specifies the compatibility of variadic results of the concat() and concat_ws() functions.
If this item is specified and a concat function has a parameter of the variadic type, different result formats in Oracle and Teradata are retained. If this item is not specified and a concat function has a parameter of the variadic type, the result format of Oracle is retained for both Oracle and Teradata.
|
ORA
TD
|
convert_string_digit_to_numeric
|
Specifies the type casting priority for binary BOOL operations on the CHAR type and INT type.
- If this item is not specified, the type casting priority is the same as that of PG9.6.
- After this item is configured, all binary BOOL operations of the CHAR type and INT type are forcibly converted to the NUMERIC type for computation.
After this configuration item is set, the CHAR types that are affected include BPCHAR, VARCHAR, NVARCHAR2, and TEXT, and the INT types that are affected include INT1, INT2, INT4, and INT8.
CAUTION: This configuration item is valid only for binary BOOL operation, for example, INT2>TEXT and INT4=BPCHAR. Non-BOOL operation is not affected. This configuration item does not support conversion of UNKNOWN operations such as INT>'1.1'. After this configuration item is enabled, all BOOL operations of the CHAR and INT types are preferred to be converted to the NUMERIC type for computation, which affects the computation performance of the database. When the JOIN column is a combination of affected types, the execution plan is affected.
|
ORA
TD
MySQL
|
check_function_conflicts
|
Controls the check of the custom plpgsql/SQL function attributes.
- If this parameter is not specified, the IMMUTABLE/STABLE/VOLATILE attributes of a custom function are not checked.
- If this parameter is specified, the IMMUTABLE attribute of a custom function is checked. If the function contains a table or the STABLE/VOLATILE function, an error is reported during the function execution. In a custom function, a table or the STABLE/VOLATILE function conflicts with the IMMUTABLE attribute, thus function behaviors are not IMMUTABLE in this case.
For example, when this parameter is specified, an error is reported in the following scenarios:
CREATE OR replace FUNCTION sql_immutable (INTEGER)
RETURNS INTEGER AS 'SELECT a+$1 from shipping_schema.t4 where a=1;'
LANGUAGE SQL IMMUTABLE
RETURNS NULL
ON NULL INPUT;
select sql_immutable(1);
ERROR: IMMUTABLE function cannot contain SQL statements with relation or Non-IMMUTABLE function.
CONTEXT: SQL function "sql_immutable" during startup
referenced column: sql_immutable
|
ORA
TD
MySQL
|
varray_verification
|
Indicates whether to verify the array length and array type length. Compatible with GaussDB(DWS) versions earlier than 8.1.0.
If this parameter is specified, the array length and array type length are not verified.
Scenario 1
CREATE OR REPLACE PROCEDURE varray_verification
AS
TYPE org_varray_type IS varray(5) OF VARCHAR2(2);
v_org_varray org_varray_type;
BEGIN
v_org_varray(1) := '111'; --If the value exceeds the limit of VARCHAR2(2), the setting will be consistent with that in the historical version and no verification is performed after configuring this option.
END;
/
Scenario 2
CREATE OR REPLACE PROCEDURE varray_verification_i3_1
AS
TYPE org_varray_type IS varray(2) OF NUMBER(2);
v_org_varray org_varray_type;
BEGIN
v_org_varray(3) := 1; --If the value exceeds the limit of varray(2) specified for array length, the setting will be consistent with that in the historical version and no verification is performed after configuring this option.
END;
/
|
ORA
TD
|
strict_concat_functions
|
Indicates whether the textanycat() and anytextcat() functions are compatible with the return value if there are null parameters. This parameter and strict_text_concat_td are mutually exclusive.
In MySQL-compatible mode, this parameter has no impact.
- If this configuration item is not specified, the returned values of the textanycat() and anytextcat() functions are the same as those in the Oracle database.
- When this configuration item is specified, if there are null parameters in the textanycat() and anytextcat() functions, the returned value is also null. Different result formats in Oracle and Teradata are retained.
If this configuration item is not specified, the returned values of the textanycat() and anytextcat() functions are the same as those in the Oracle database.
SELECT textanycat('gauss', cast(NULL as BOOLEAN));
textanycat
------------
gauss
(1 row)
SELECT 'gauss' || cast(NULL as BOOLEAN); -- In this case, the || operator is converted to the textanycat function.
?column?
----------
gauss
(1 row)
When setting this configuration item, retain the results that are different from those in Oracle and Teradata:
SELECT textanycat('gauss', cast(NULL as BOOLEAN));
textanycat
------------
(1 row)
SELECT 'gauss' || cast(NULL as BOOLEAN); -- In this case, the || operator is converted to the textanycat function.
?column?
----------
(1 row)
|
ORA
TD
|
strict_text_concat_td
|
In Teradata compatible mode, whether the textcat(), textanycat() and anytextcat() functions are compatible with the return value if there are null parameters. This parameter and strict_concat_functions are mutually exclusive.
- If this parameter is not specified, the return values of the textcat(), textanycat(), and anytextcat() functions in Teradata-compatible mode are the same as those in GaussDB(DWS).
- When this parameter is specified, if the textcat(), textanycat(), and anytextcat() functions contain any null parameter values, the return value is null in the Teradata-compatible mode.
If this parameter is not specified, the returned values of the textcat(), textanycat(), and anytextcat() functions are the same as those in the GaussDB(DWS).
td_data_compatible_db=# SELECT textcat('abc', NULL);
textcat
---------
abc
(1 row)
td_data_compatible_db=# SELECT 'abc' || NULL; -- In this case, the operator || is converted to the textcat() function.
?column?
----------
abc
(1 row)
When this parameter is specified, NULL is returned if any of the textcat(), textanycat(), and anytextcat() functions returns a null value.
td_data_compatible_db=# SELECT textcat('abc', NULL);
textcat
---------
(1 row)
td_data_compatible_db=# SELECT 'abc' || NULL;
?column?
----------
(1 row)
|
TD
|
compat_display_ref_table
|
Sets the column display format in the view.
- If this parameter is not specified, the prefix is used by default, in the tab.col format.
- Specify this parameter to the same original definition. It is displayed only when the original definition contains a prefix.
SET behavior_compat_options='compat_display_ref_table';
CREATE OR REPLACE VIEW viewtest2 AS SELECT a.c1, c2, a.c3, 0 AS c4 FROM viewtest_tbl a;
SELECT pg_get_viewdef('viewtest2');
pg_get_viewdef
-----------------------------------------------------
SELECT a.c1, c2, a.c3, 0 AS c4 FROM viewtest_tbl a;
(1 row)
|
ORA
TD
|
para_support_set_func
|
Whether the input parameters of the COALESCE(), NVL(), GREATEST(), and LEAST() functions in a column-store table support multiple result set expressions.
- If this item is not specified and the input parameter contains multiple result set expressions, an error is reported, indicating that the function is not supported.
| SELECT COALESCE(regexp_split_to_table(c3,'#'), regexp_split_to_table(c3,'#')) FROM regexp_ext2_tb1 ORDER BY 1 LIMIT 5;
ERROR: set-valued function called in context that cannot accept a set
|
- When this configuration item is specified, the function input parameter can contain multiple result set expressions.
| SELECT COALESCE(regexp_split_to_table(c3,'#'), regexp_split_to_table(c3,'#')) FROM regexp_ext2_tb1 ORDER BY 1 LIMIT 5;
coalesce
----------
a
a
a
a
a
(5 rows)
|
|
ORA
TD
|
disable_select_truncate_parallel
|
Controls the DDL lock level such as TRUNCATE in a partitioned table.
- If this item is specified, the concurrent execution of TRUNCATE and DML operations (such as SELECT) on different partitions is forbidden, and the fast query shipping (FQS) of the SELECT operation on the partitioned table is allowed. You can set this parameter in the OLTP database, where there are many simple queries on partitioned tables, and there is no requirement for concurrent TRUNCATE and DML operations on different partitions.
- If this item is not specified, SELECT and TRUNCATE operations can be concurrently performed on different partitions in a partitioned table, and the FQS of the partitioned table is disabled to avoid possible inconsistency.
|
ORA
TD
MySQL
|
bpchar_text_without_rtrim
|
In Teradata-compatible mode, controls the space to be retained on the right during the character conversion from bpchar to text. If the actual length is less than the length specified by bpchar, spaces are added to the value to be compatible with the Teradata style of the bpchar character string.
Currently, ignoring spaces at the end of a string for comparison is not supported. If the concatenated string contains spaces at the end, the comparison is space-sensitive.
The following is an example:
td_compatibility_basic_db=# select length('a'::char(10)::text);
length
--------
10
(1 row)
td_compatibility_basic_db=# select length('a'||'a'::char(10));
length
--------
11
(1 row)
|
TD
|
convert_empty_str_to_null_td
|
In Teradata-compatible mode, controls the to_date, to_timestamp, and to_number type conversion functions to return null when they encounter empty strings, and controls the format of the return value when the to_char function encounters an input parameter of the date type.
Example:
If this parameter is not specified:
td_compatibility_db=# select to_number('');
to_number
-----------
0
(1 row)
td_compatibility_db=# select to_date('');
ERROR: the format is not correct
DETAIL: invalid date length "0", must between 8 and 10.
CONTEXT: referenced column: to_date
td_compatibility_db=# select to_timestamp('');
to_timestamp
------------------------
0001-01-01 00:00:00 BC
(1 row)
td_compatibility_db=# select to_char(date '2020-11-16');
to_char
------------------------
2020-11-16 00:00:00+08
(1 row)
If this parameter is specified, and parameters of to_number, to_date, and to_timestamp functions contain empty strings:
td_compatibility_db=# select to_number('');
to_number
-----------
(1 row)
td_compatibility_db=# select to_date('');
to_date
---------
(1 row)
td_compatibility_db=# select to_timestamp('');
to_timestamp
--------------
(1 row)
td_compatibility_db=# select to_char(date '2020-11-16');
to_char
------------
2020/11/16
(1 row)
|
TD
|
disable_case_specific
|
Determines whether to ignore case sensitivity during character type match. This parameter is valid only in Teradata-compatible mode.
- If this item is not specified, characters are case sensitive during character type match.
- If this item is specified, characters are case insensitive during character type match.
After being specified, this item will affect five character types (CHAR, TEXT, BPCHAR, VARCHAR, and NVARCHAR), 12 operators (<, >, =, >=, <=, !=, <>, !=, like, not like, in, and not in), and expressions case when and decode.
CAUTION: After this item is enabled, the UPPER function is added before the character type, which affects the estimation logic. Therefore, an enhanced estimation model is required. (Suggested settings: cost_param=16, cost_model_version = 1, join_num_distinct=-20, and qual_num_distinct=200)
|
TD
|
enable_interval_to_text
|
Controls the implicit conversion from the interval type to the text type.
- When this option is enabled, the implicit conversion from the interval type to the text type is supported.
SELECT TO_DATE('20200923', 'yyyymmdd') - TO_DATE('20200920', 'yyyymmdd') = '3'::text;
?column?
----------
f
(1 row)
- When this option is disabled, the implicit conversion from the interval type to the text type is not supported.
SELECT TO_DATE('20200923', 'yyyymmdd') - TO_DATE('20200920', 'yyyymmdd') = '3'::text;
?column?
----------
t
(1 row)
|
ORA
TD
MySQL
|
light_object_mtime
|
Specifies whether the mtime column in the pg_object system catalog records object operations.
- If this parameter is configured, the GRANT, REVOKE, and TRUNCATE operations are not recorded by mtime, that is, the mtime column is not updated.
- If this parameter is not configured (by default), the ALTER, COMMENT, GRANT, REVOKE, and TRUNCATE operations are recorded by mtime, that is, the mtime column is updated.
|
ORA
TD
MySQL
|