Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions CN/modules/ROOT/pages/7.2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
| ivorysql.datetime_ignore_nls_mask | 表示日期格式是否会受NLS参数影响,默认为0,可以通过set命令设置,reset 命令重置,reset all命令会重置该变量
| ivorysql.enable_emptystring_to_NULL | 取值为(on/off),该变量为on时,会将插入的空字符串转成NULL值存储
| ivorysql.identifier_case_switch | 设置字符大小写转换模式
| ivorysql.listen_address | 表示兼容模式监听的地址,在初始化数据库时,从ivorysql.conf文件中读取该配置,在配置文件中修改该值,需要重启数据库生效,可以通过show命令查看
| ivorysql.enable_case_switch | 取值为(on/off),默认为 on,用于开启 Oracle 兼容模式下的标识符大小写转换特性,详细说明参见 7.3 节
| ivorysql.listen_addresses | 表示兼容模式监听的地址,默认为 'localhost',可取多个地址(逗号分隔)。在初始化数据库时,从ivorysql.conf文件中读取该配置,在配置文件中修改该值,需要重启数据库生效,可以通过show命令查看
| ivorysql.port | 表示兼容模式下连接的端口号,在初始化数据库时,从ivorysql.conf文件中读取该配置,在配置文件中修改该值,需要重启数据库生效,可以通过show命令查看
| nls_date_format | 表示默认的日期格式,可以通过show命令查看,默认为‘YYYY-MM-DD’,可以通过set命令设置,可以通过reset命令重置回默认值,reset all 命令会重置该变量
| nls_length_semantics | 兼容Oracle的同名参数,控制一个字符所占内存的大小
Expand All @@ -36,6 +37,22 @@
| shared_preload_libraries | 在初始化数据库时,从ivorysql.conf文件中读取,可以通过show命令查看,在配置文件中修改该值,重启数据库生效。
|====

=== 开发者选项

以下参数同属 `ivorysql.*` 系列,但均为开发者/诊断用途的开关:它们在 `pg_settings` 中默认不可见(注册时带有 `GUC_NO_SHOW_ALL` 标记),也不会写入 `ivorysql.conf.sample`,通常不需要修改。可以通过 `show` 命令查看当前值,或在会话内通过 `set` 修改。

[cols="^1,^1,^3"]
|====
| 变量名 | 默认值 | 描述
| ivorysql.allow_out_parameter_const | false | 取值为(on/off),为 on 时 PL/iSQL 函数的 OUT 参数可以是常量值
| ivorysql.default_with_rowids | false | 取值为(on/off),为 on 时新建表自动添加 rowid 列
| ivorysql.enable_internal_warning | false | 取值为(on/off),为 on 时打印内部告警信息
| ivorysql.enable_seq_scale_fixed | false | 取值为(on/off),sequence 的 scale 值修正开关
| ivorysql.identifier_case_from_pg_dump | false | 标识带引号的标识符是否来自 pg_dump,供 pg_dump 使用;带 `GUC_DISALLOW_IN_FILE` 标记,只能在会话内设置
| ivorysql.out_parameter_column_position | false | 取值为(on/off),为 on 时 PL/iSQL 函数按参数位置构造 OUT 参数列
| ivorysql.rowid_seq_cache | 20 | rowid 序列的缓存值个数,取值范围 1-60000
|====

=== 部分变量使用示例

==== ivorysql.datetime_ignore_nls_mask
Expand Down Expand Up @@ -123,4 +140,4 @@ ivorysql=# select * from test_nls_date;
1 | 24-04-05
2 | 24-04-15
(2 rows)
```
```
21 changes: 19 additions & 2 deletions EN/modules/ROOT/pages/7.2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ When adding guc parameters, we need to add them uniformly in the *ivy_guc.c*. Wh
| ivorysql.datetime_ignore_nls_mask | Indicates whether the date format will be affected by the NLS parameter. The default value is 0, which can be set using the set command. The reset command resets the date format, and the reset all command resets the variable
| ivorysql.enable_emptystring_to_NULL | The value is (on/off), and when this variable is on, it will convert the inserted empty string into a NULL value for storage
| ivorysql.identifier_case_switch | Set character case conversion mode
| ivorysql.listen_address | Indicates the address for compatibility mode listening. When initializing the database, read the configuration from the ivorysql.conf file, modify the value in the configuration file, and restart the database to take effect. This can be viewed through the show command
| ivorysql.enable_case_switch | The value is (on/off) and the default value is on. It enables the identifier case conversion feature in Oracle compatible mode. See section 7.3 for details
| ivorysql.listen_addresses | Indicates the address(es) for compatibility mode listening. The default value is 'localhost'; a comma-separated list of addresses is accepted. When initializing the database, read the configuration from the ivorysql.conf file, modify the value in the configuration file, and restart the database to take effect. This can be viewed through the show command
| ivorysql.port | Indicates the port number for connecting in compatibility mode. When initializing the database, read the configuration from the ivorysql.conf file and modify the value in the configuration file. To take effect, restart the database and view it through the show command
| nls_date_format | Represents the default date format, which can be viewed through the show command and defaults to 'YYYY-MM-DD'. It can be set through the set command and reset back to the default value through the reset command. The reset all command will reset this variable
| nls_length_semantics | Compatible with oracle parameters of the same name, controlling the size of memory occupied by a character
Expand All @@ -35,6 +36,22 @@ When adding guc parameters, we need to add them uniformly in the *ivy_guc.c*. Wh
| shared_preload_libraries | When initializing the database, read from the ivorysql.conf file and view it through the show command. Modify the value in the configuration file and restart the database to take effect.
|===

=== Developer options

The parameters below also belong to the `ivorysql.*` family, but they are developer/diagnostic switches: they are hidden from `pg_settings` (registered with `GUC_NO_SHOW_ALL`) and are not written to `ivorysql.conf.sample`, so they normally do not need to be changed. Their current value can be viewed with the `show` command and changed within a session with `set`.

[cols="^1,^1,^3"]
|===
| Variable | Default | Description
| ivorysql.allow_out_parameter_const | false | The value is (on/off). When on, an OUT parameter of a PL/iSQL function can be a constant value
| ivorysql.default_with_rowids | false | The value is (on/off). When on, a rowid column is added automatically when a new table is created
| ivorysql.enable_internal_warning | false | The value is (on/off). When on, internal warning information is printed
| ivorysql.enable_seq_scale_fixed | false | The value is (on/off). Switch for the sequence scale value fix
| ivorysql.identifier_case_from_pg_dump | false | Shows whether the identifier with quotes is from pg_dump. Used by pg_dump; it is flagged `GUC_DISALLOW_IN_FILE`, so it can only be set inside a session
| ivorysql.out_parameter_column_position | false | The value is (on/off). When on, a PL/iSQL function constructs the OUT parameter columns by their position
| ivorysql.rowid_seq_cache | 20 | Number of cached sequence values for rowid generation, range 1-60000
|===

=== Example

==== ivorysql.datetime_ignore_nls_mask
Expand Down Expand Up @@ -122,4 +139,4 @@ ivorysql=# select * from test_nls_date;
1 | 24-04-05
2 | 24-04-15
(2 rows)
```
```
Loading