GUC Parameters of GaussDB (Oracle-Compatible Mode)
For GaussDB databases compatible with Oracle syntax, you can set the GUC parameters to enhance the compatibility. For details, see Table 1.

GaussDB provides many operation parameters. Configurations of these parameters affect the behavior of the database system. Before changing these parameters, learn the impact of these parameters on the database. Otherwise, unexpected results may occur.
Oracle-Compatible Configuration Item |
Compatibility Configuration Item |
Description |
Supported Database |
Enabled |
---|---|---|---|---|
behavior_compat_options |
display_leading_zero |
Specifies how floating point numbers are displayed. 0 before the decimal point is displayed |
Centralized/Distributed |
Yes |
end_month_calculate |
Specifies the calculation logic of the add_months function. |
Centralized/Distributed |
Yes |
|
bind_procedure_searchpath |
Specifies the search path of the database object in a stored procedure for which no schema name is specified. |
Centralized/Distributed |
Yes |
|
correct_to_number |
Specifies the compatibility of the to_number() result. |
Centralized/Distributed |
Yes |
|
unbind_divide_bound |
Specifies the range check on the result of integer division. |
Centralized/Distributed |
Yes |
|
convert_string_digit_to_numeric |
Determines whether to convert numeric constants of the character string type to those of the numeric type before these two types are compared. |
Centralized/Distributed |
Yes |
|
return_null_string |
Specifies how to display the empty result (empty string '') of the lpad() and rpad() functions. |
Centralized/Distributed |
Yes |
|
merge_update_multi |
Controls the UPDATE behavior if a piece of target data conflicts with multiple pieces of source data when MERGE INTO ... WHEN MATCHED THEN UPDATE and INSERT ... ON DUPLICATE KEY UPDATE are executed. |
Centralized/Distributed |
Yes |
|
plstmt_implicit_savepoint |
Determines whether the execution of an UPDATE statement in a stored procedure has an independent subtransaction. |
Centralized/Distributed |
Yes |
|
hide_tailing_zero |
Controls configuration item for numeric display. |
Centralized/Distributed |
Yes |
|
rownum_type_compat |
Specifies the ROWNUM type. |
Centralized |
Yes |
|
aformat_null_test |
Specifies the logic for checking whether the row type is not null. |
Centralized/Distributed |
Yes |
|
aformat_regexp_match |
Determines the matching behavior of regular expression functions. |
Centralized/Distributed |
Yes |
|
compat_cursor |
Determines the compatibility behavior of implicit cursor states. |
Centralized |
Yes |
|
proc_outparam_override |
Determines the overloading of output parameters of a stored procedure. |
Centralized/Distributed |
Yes |
|
proc_implicit_for_loop_variable |
Controls the behavior of the FOR_LOOP query statement in a stored procedure. |
Centralized |
Yes |
|
allow_procedure_compile_check |
Controls the compilation check of the SELECT and OPEN CURSOR statements in a stored procedure. |
Centralized |
Yes |
|
plsql_security_definer |
Determines whether the definer permission is used by default when a stored procedure is created. |
Centralized/Distributed |
Yes |
|
plpgsql_dependency |
Determines whether a function, stored procedure, or package containing undefined objects can be created. |
Centralized |
Yes |
|
sys_function_without_brackets |
Calls system functions without input parameters in GaussDB (A-compatible mode) without parentheses after this parameter is enabled. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
array_count_compat |
Determines whether NULL or 0 is returned by ARRAY_COUNT when the variable of the variable-length array type is NULL. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
forbid_skip_tableof_empty_str_elem |
Controls the input behavior of strings in the '{1,,3}' format for the collection without indexes. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
enable_use_ora_timestamptz |
After it is enabled, the date and time returned by TIMESTAMP AT TIME ZONE are the same as those in an A-compatible GaussDB database. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
forbid_package_function_with_prefix |
Reports an error when a function with prefixes is created in a package. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
show_full_error_lineno |
Displays the line numbers starting from the CREATE statement when compiling errors are reported during stored procedure creation. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
plsql_rollback_keep_user |
Determines whether ROLLBACK and ROLLBACK TO SAVEPOINT in PL/SQL changes the current user. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
current_sysdate |
Returns the current OS time after SYSDATE is executed. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
select_into_return_null |
Assigns NULL to variables inSELECT select_expressions INTO [STRICT] target FROM ... for a stored procedure without specifying STRICT when no results are returned. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
time_constexpr_compact |
Returns the WITH TIMEZONE or WITHOUT TIMEZONE data type based on whether a time zone is specified as a constant in a time expression. |
GaussDB V2.0-8.200 Centralized/Distributed and later |
Yes |
|
plsql_compile_check_options |
plsql_expression_check |
If the plsql_expression_check parameter is enabled, the plpgsql_dependency parameter must also be enabled. |
GaussDB V2.0-3.2 Centralized |
Yes |
a_format_version |
10c |
Specifies database platform compatibility configuration items. |
Centralized/Distributed |
Yes |
a_format_dev_version |
s1 |
Specifies the compatible minor version of the database platform. |
GaussDB V2.0-3.1 Centralized/Distributed |
Yes |
s2 |
Specifies the compatible minor version of the database platform. |
GaussDB V2.0-3.2 Centralized/Distributed |
Yes |
|
s3 |
Specifies the compatible minor version of the database platform. |
GaussDB V2.0-3.3 Centralized/Distributed |
Yes |
|
s4 |
Specifies the compatible minor version of the database platform. |
GaussDB Centralized/Distributed V2.0-8.0 |
Yes |
|
s5 |
Specifies the compatible minor version of the database platform. |
GaussDB V2.0-8.100 Centralized/Distributed |
Yes |
|
s6 |
Specifies the compatible minor version of the database platform. |
GaussDB V2.0-8.200 Centralized/Distributed |
Yes |
|
sql_beta_feature |
a_style_coerce |
Affects the decode function. |
Centralized/Distributed |
Yes |

Set the a_format_dev_version parameter as follows:
- For GaussDB V2.0-3.1 Enterprise Edition, set the value to s1.
- For GaussDB V2.0-3.2 Enterprise Edition, set the value to s2.
- For GaussDB V2.0-3.3 Enterprise Edition, set the value to s3.
- For GaussDB V2.0-8.0 Enterprise Edition, set the value to s4.
- For GaussDB V2.0-8.100 Enterprise Edition, set the value to s5.
- For GaussDB V2.0-8.200 Enterprise Edition and GaussDB V2.0-9.0 Enterprise Edition, set the value to s6.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot