GUC Parameters

dolphin.sql_mode

Parameter description: The parameter value is a character string separated by commas (,). Only valid character strings are allowed. If the parameter value is invalid, a warning is reported after the startup. Similarly, if the new value is invalid, a warning is reported and the old value is not changed. Currently, sql_mode is used in the following scenarios:

  1. sql_mode_strict: Data is converted if the inserted value does not comply with the current column type. The involved scenarios are INSERT INTO table VALUES (…) and INSERT INTO table SELECT … Currently, the involved types are TINYINT[UNSIGNED],SMALLINT[UNSIGNED],INT[UNSIGNED],BIGINT[UNSIGNED],FLOAT,DOUBLE,NUMERIC,CLOB,CHAR, and VARCHAR.

  2. sql_mode_strict: If the value length of an inserted column exceeds the limit, the maximum or minimum value of the column is used. The involved types are TINYINT[UNSIGNED],SMALLINT[UNSIGNED],INT[UNSIGNED],BIGINT[UNSIGNED],FLOAT,DOUBLE,NUMERIC,CLOB,CHAR, and VARCHAR.

  3. sql_mode_strict: During insert, if a column whose attribute is not empty and does not have a default value is not in the insert list, the default value is added to the column. (The involved types are the same as the preceding types.)

  4. sql_mode_strict: supports explicit insertion of default to columns whose attributes are not empty and do not have default values. (The involved types are the same as the preceding types.)

  5. sql_mode_full_group: determines whether columns (without aggregate functions) in the SELECT list must be included in the GROUP BY clause. In sql_mode_full_group mode (default mode), if a column in the select list does not use an aggregate function or appear in the GROUP BY clause, an error is reported. Otherwise, the execution is successful and the first tuple is selected from all tuples that meet the conditions.

  6. pipes_as_concat: controls whether || is used as a connector or an OR operator.

  7. ansi_quotes: It is mainly used in places where double quotation marks need to be used to indicate string values. When ansi_quotes is enabled, the content in the double quotation marks is considered as an object reference. When ansi_quotes is disabled, the content in the double quotation marks is considered as a string value. When ansi_quotes is disabled, some meta-commands become invalid. The following table lists the invalid meta-commands.

    ParameterDescription
    \d[S+]Lists all tables, views, and sequences of all schemas in search_path. When objects with the same name exist in different schemas in search_path, only the object in the schema that ranks first in search_path is displayed.
    \d+ [PATTERN]Lists all tables, views, and indexes.
    \da[S] [PATTERN]Lists all available aggregate functions, together with their return value types and the data types.
    \db[+] [PATTERN]Lists all available tablespaces.
    \dc[S+] [PATTERN]Lists all available conversions between character sets.
    \dC[+] [PATTERN]Lists all available type conversions.
    \dd[S] [PATTERN]Lists descriptions about objects matching PATTERN.
    \ddp [PATTERN]Lists all default permissions.
    \dD[S+] [PATTERN]Lists all available domains.
    \ded[+] [PATTERN]Lists all data source objects.
    \det[+] [PATTERN]Lists all foreign tables.
    \des[+] [PATTERN]Lists all foreign servers.
    \deu[+] [PATTERN]Lists all user mappings.
    \dew[+] [PATTERN]Lists foreign-data wrappers.
    \df[antw][S+] [PATTERN]Lists all available functions, together with their parameters and return types. a indicates an aggregate function, n indicates a common function, t indicates a trigger, and w indicates a window function.
    \dF[+] [PATTERN]Lists all text search configurations.
    \dFd[+] [PATTERN]Lists all text search dictionaries.
    \dFp[+] [PATTERN]Lists all text search parsers.
    \dFt[+] [PATTERN]Lists all text search templates.
    \dlThis is an alias for \lo_list, which shows a list of large objects.
    \dL[S+] [PATTERN]Lists all available program languages.
    \dm[S+] [PATTERN]Lists materialized views.
    \dn[S+] [PATTERN]Lists all schemas (namespaces).
    \do[S] [PATTERN]Lists all available operators with their operand and return types.
    \dO[S+] [PATTERN]Lists collations.
    \dp [PATTERN]Lists tables, views, and related permissions.
    \dT[S+] [PATTERN]Lists all data types.
    \dE[S+] [PATTERN]In this group of commands, the letters E, i, s, t, and v stand for a foreign table, index, sequence, table, or view, respectively. You can specify any or a combination of these letters sequenced in any order to obtain an object list. For example, \dit lists all indexes and tables. If a command is suffixed with a plus sign (+), physical dimensions and related descriptions of each object will be displayed.
    \dx[+] [PATTERN]Lists installed extensions.
    \l[+]Lists the names, owners, character set encodings, and permissions of all the databases in the server.
    \z [PATTERN]Lists all tables, views, and sequences in the database and their access permissions.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

When ansi_quotes is disabled, if you need to use database keywords as object identifiers or wrap all object identifiers for standardization purposes, you can use backquotes (`) to replace double quotation marks.

When backquotes (`) are used, except the table name (controlled by the lower_case_table_names parameter), other enclosed column names and index names are automatically lowercased, and the names of the returned columns are also lowercased.

Value range: a string

Default value: 'sql_mode_strict,sql_mode_full_group,pipes_as_concat,ansi_quotes'

Example

--Create a table named test1.
openGauss=# CREATE TABLE test1
(
  a1 smallint not null,
  a2 int not null,
  a3 bigint not null,
  a4 float not null,
  a5 double not null,
  a6 numeric not null,
  a7 varchar(5) not null
);

--Failed to insert records into the table.
openGauss=# insert into test1(a1,a2) values(123412342342314,3453453453434324);
--Failed to query the table.
openGauss=# select a1,a2 from test1 group by a1;

--A record is successfully inserted into the table.
openGauss=# set dolphin.sql_mode = '';
openGauss=# insert into test1(a1,a2) values(123412342342314,3453453453434324);
--A table is queried successfully.
openGauss=# select a1,a2 from test1 group by a1;

--Deleting a Table
openGauss=# DROP TABLE test1;

dolphin.b_db_timestamp

Parameter description: The parameter value is a floating point number. This parameter affects the curdate, current_time, curtime, current_timestamp, localtime, localtimestamp, and now functions in Dolphin. If this parameter is set to 0, the preceding functions return the current date or time. If the parameter value is within the range [1,2147483647], the preceding functions use the value of this parameter as the second offset and return the date or time corresponding to 1970-01-01 00:00:00 UTC + Second offset + Current time zone offset. If the value of this parameter is not in the preceding valid range, an error is reported.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: [1.0, 2147483647.0]

Default value: 0

Example

openGauss=# show dolphin.b_db_timestamp;
 b_db_timestamp
----------------
 0
(1 row)

openGauss=# select now();
        now()
---------------------
 2022-09-18 19:52:23
(1 row)

openGauss=# set dolphin.b_db_timestamp = 1.0;
SET
openGauss=# select now();
        now()
---------------------
 1970-01-01 08:00:01
(1 row)

dolphin.default_week_format

Parameter description: The parameter value is an integer. This parameter affects the week function in the Dolphin plug-in. The value range of this parameter is [0,7], which corresponds to eight calculation policies. For details about these policies, see Time and Date Functions . If the value of this GUC parameter exceeds the corresponding boundary value, a warning is reported and the GUC parameter is set to the corresponding boundary value.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: [0, 7]

Default value: 0

Example

openGauss=# show dolphin.default_week_format;
dolphin.default_week_format
---------------------
0
(1 row)

openGauss=# select week('2000-1-1');
week
------
    0
(1 row)

openGauss=# alter system set dolphin.default_week_format = 2;
ALTER SYSTEM SET

openGauss=# select week('2000-1-1');
week
------
52
(1 row)

dolphin.lc_time_names

Parameter description: Specifies the language in which the dayname and monthname functions of the dolphin plug-in output results. The parameter value is a character string. There are 111 values for this parameter. If the value of a parameter is not within the valid value range, an error is reported.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Value range: The options of lc_time_names are as follows:

ValueLanguage Set
ar_AEArabic - United Arab Emirates
ar_BHArabic - Bahrain
ar_DZArabic - Algeria
ar_EGArabic - Egypt
ar_INArabic - India
ar_IQArabic - Iraq
ar_JOArabic - Jordan
ar_KWArabic - Kuwait
ar_LBArabic - Lebanon
ar_LYArabic - Libya
ar_MAArabic - Morocco
ar_OMArabic - Oman
ar_QAArabic - Qatar
ar_SAArabic - Saudi Arabia
ar_SDArabic - Sudan
ar_SYArabic - Syria
ar_TNArabic - Tunisia
ar_YEArabic - Yemen
be_BYBelarusian - Belarus
bg_BGBulgarian - Bulgaria
ca_ESCatalan - Spain
cs_CZCzech - Czech Republic
da_DKDanish - Denmark
de_ATGerman - Austria
de_BEGerman - Belgium
de_CHGerman - Switzerland
de_DEGerman - Germany
de_LUGerman - Luxembourg
el_GRGreek - Greece
en_AUEnglish - Australia
en_CAEnglish - Canada
en_GBEnglish - United Kingdom
en_INEnglish - India
en_NZEnglish - New Zealand
en_PHEnglish - Philippines
en_USEnglish - United States
en_ZAEnglish - South Africa
en_ZWEnglish - Zimbabwe
es_ARSpanish - Argentina
es_BOSpanish - Bolivia
es_CLSpanish - Chile
es_COSpanish - Colombia
es_CRSpanish - Costa Rica
es_DOSpanish - Dominican Republic
es_ECSpanish - Ecuador
es_ESSpanish - Spain
es_GTSpanish - Guatemala
es_HNSpanish - Honduras
es_MXSpanish - Mexico
es_NISpanish - Nicaragua
es_PASpanish - Panama
es_PESpanish - Peru
es_PRSpanish - Puerto Rico
es_PYSpanish - Paraguay
es_SVSpanish - El Salvador
es_USSpanish - United States
es_UYSpanish - Uruguay
es_VESpanish - Venezuela
et_EEEstonian - Estonia
eu_ESBasque - Spain
fi_FIFinnish - Finland
fo_FOFaroese - Faroe Islands
fr_BEFrench - Belgium
fr_CAFrench - Canada
fr_CHFrench - Switzerland
fr_FRFrench - France
fr_LUFrench - Luxembourg
gl_ESGalician - Spain
gu_INGujarati - India
he_ILHebrew - Israel
hi_INHindi - India
hr_HRCroatian - Croatia
hu_HUHungarian - Hungary
id_IDIndonesian - Indonesia
is_ISIcelandic - Iceland
it_CHItalian - Switzerland
it_ITItalian - Italy
ja_JPJapanese - Japan
ko_KRKorean - Republic of Korea
lt_LTLithuanian - Lithuania
lv_LVLatvian - Latvia
mk_MKMacedonian - North Macedonia
mn_MNMongolia - Mongolian
ms_MYMalay - Malaysia
nb_NONorwegian(Bokmål) - Norway
nl_BEDutch - Belgium
nl_NLDutch - The Netherlands
no_NONorwegian - Norway
pl_PLPolish - Poland
pt_BRPortugese - Brazil
pt_PTPortugese - Portugal
rm_CHRomansh - Switzerland
ro_RORomanian - Romania
ru_RURussian - Russia
ru_UARussian - Ukraine
sk_SKSlovak - Slovakia
sl_SISlovenian - Slovenia
sq_ALAlbanian - Albania
sr_RSSerbian - Serbia
sv_FISwedish - Finland
sv_SESwedish - Sweden
ta_INTamil - India
te_INTelugu - India
th_THThai - Thailand
tr_TRTurkish - Turkey
uk_UAUkrainian - Ukraine
ur_PKUrdu - Pakistan
vi_VNVietnamese - Vietnam
zh_CNChinese - China
zh_HKChinese - Hong Kong
zh_TWChinese - Taiwan

Default value: 'en_US'

Example

openGauss=# select dayname('2000-1-1');
dayname
----------
Saturday
(1 row)

openGauss=# alter system set dolphin.lc_time_names = 'zh_CN';
ALTER SYSTEM SET

openGauss=# select dayname('2000-1-1');
dayname
---------
Saturday
(1 row)

dolphin.b_compatibility_mode

Parameter description: The parameter value is of the Boolean type. This parameter affects some conflicting functions and operators in the Dolphin plug-in. When this parameter is enabled, the compatibility logic is executed for these functions and operators. When this parameter is disabled, the original openGauss logic is retained.

Currently, the following operators are affected:

  1. LIKE/NOT LIKE
  2. Character type XOR ^
  3. Numeric type XOR ^
  4. &&
  5. #

The following functions are affected:

  1. LAST_DAY
  2. TIMESTAMPDIFF
  3. FORMAT
  4. EXTRACT

Other affected parameters:

  1. ?

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: Boolean

  • on indicates that the new compatibility function is used.
  • off indicates that the compatibility function is disabled and the original kernel functions are used.

Default value: off

version_comment

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating the database server and license information.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: openGauss Server(MulanPSL-2.0)

auto_increment_increment

Parameter description: Currently, this parameter is read-only and has no specific meaning. The parameter value is an integer, indicating the auto-increment step of the auto-increment column.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1,65535]

Default value: 1

character_set_client

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the client uses the character set.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: utf8

character_set_connection

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the character set is used when no character set is introduced to the program.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: utf8

character_set_results

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the server uses the character set to return query results to the client.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: utf8

character_set_server

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the server uses the character set.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: latin1

collation_server

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the server uses the sorting rule.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: latin1_swedish_ci

collation_connection

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the connection character set uses the sorting rule.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: none

init_connect

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating the SQL statement executed during connection initialization.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: none

interactive_timeout

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating that the server closes an interactive connection after the number of seconds in which the connection is inactive.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1,31536000]

Default value: 28800

license

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the server uses the license.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: MulanPSL-2.0

max_allowed_packet

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating the upper limit (in bytes) of the data packet size.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1024,1073741824]

Default value: 4194304

net_buffer_length

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating the default buffer size. The buffer size can be dynamically set to the value of max_allowed_packet and restored after the SQL statement ends.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1024,1048576]

Default value: 16384

net_write_timeout

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating that the server stops writing data after the number of seconds specified by this parameter.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1,31536000]

Default value: 60

query_cache_size

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating the size (in bytes) of the memory allocated when the query result is cached.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [0,9223372036854775807]

Default value: 1048576

query_cache_type

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is an integer, indicating the type of the cache to be queried.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [0,2]

Default value: 0

system_time_zone

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating the system time zone of the server.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: a string

Default value: none

time_zone

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating the current time zone.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [-12:59,+13:00]

Default value: SYSTEM

wait_timeout

Parameter description: Currently, this parameter is read-only and has no specific meaning. The value is a string, indicating that the server closes a non-interactive connection after the number of seconds in which the connection is inactive.

Currently, this parameter is an INTERNAL parameter and cannot be set.

Value range: [1,31536000]

Default value: 28800

dolphin.lower_case_table_names

Parameter description: Specifies whether the user name and table name are case sensitive. The value 0 indicates that the user name and table name are case sensitive. A value greater than 0 indicates that the user name and table name are case insensitive.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1.

Value range: [0,2]

Default value: 1

dolphin.default_database_name

Parameter description: Specifies the default name of the openGauss database instance used by the Dolphin protocol plug-in.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1.

NOTICE:

  • This function can be used after the Dophin plug-in is loaded and the Dolphin database protocol is enabled.
  • The openGauss database system is different from the MySQL database system. Therefore, you need to select an openGauss database instance for Dophin.

Value range: a string

Default value: database_name of the current session when the Dolphin protocol plug-in is loaded

Feedback
编组 3备份
    openGauss 2024-05-07 00:46:52
    cancel