Skip to content

Commit 1372aab

Browse files
committed
docs(7.2): fix the GUC name and add missing ivorysql.* parameters
Section 7.2 of the v5.6 documentation lists a parameter that does not exist (ivorysql.listen_address), omits one that does (ivorysql.enable_case_switch), and never mentions the seven developer-only parameters that are registered by IvorySQL but hidden from pg_settings. Changes (CN + EN): * ivorysql.listen_address -> ivorysql.listen_addresses, with the default value ('localhost') and the fact that it accepts a comma-separated list. * add ivorysql.enable_case_switch (bool, default on) and point to section 7.3 for the identifier case conversion details. * add a "Developer options" subsection documenting allow_out_parameter_const, default_with_rowids, enable_internal_warning, enable_seq_scale_fixed, identifier_case_from_pg_dump, out_parameter_column_position and rowid_seq_cache, noting that they are registered with GUC_NO_SHOW_ALL (invisible in pg_settings) and are not written to ivorysql.conf.sample. Verified against a self-built IvorySQL 5.6 instance: show ivorysql.listen_address; -> ERROR: unrecognized configuration parameter show ivorysql.listen_addresses; -> localhost show ivorysql.enable_case_switch; -> on select count(*) from pg_settings where name like 'ivorysql.%'; -> 8 (the seven developer options are all counted 0 there) Antora build before/after: the 7.2 table goes from 30 rows / 60 cells to 39 rows / 86 cells, and the page gains one section (4 -> 5). Closes #372 Signed-off-by: 王诗焱 <3372848903@qq.com>
1 parent 7c3f4a6 commit 1372aab

2 files changed

Lines changed: 38 additions & 4 deletions

File tree

‎CN/modules/ROOT/pages/7.2.adoc‎

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

40+
=== 开发者选项
41+
42+
以下参数同属 `ivorysql.*` 系列,但均为开发者/诊断用途的开关:它们在 `pg_settings` 中默认不可见(注册时带有 `GUC_NO_SHOW_ALL` 标记),也不会写入 `ivorysql.conf.sample`,通常不需要修改。可以通过 `show` 命令查看当前值,或在会话内通过 `set` 修改。
43+
44+
[cols="^1,^1,^3"]
45+
|====
46+
| 变量名 | 默认值 | 描述
47+
| ivorysql.allow_out_parameter_const | false | 取值为(on/off),为 on 时 PL/iSQL 函数的 OUT 参数可以是常量值
48+
| ivorysql.default_with_rowids | false | 取值为(on/off),为 on 时新建表自动添加 rowid 列
49+
| ivorysql.enable_internal_warning | false | 取值为(on/off),为 on 时打印内部告警信息
50+
| ivorysql.enable_seq_scale_fixed | false | 取值为(on/off),sequence 的 scale 值修正开关
51+
| ivorysql.identifier_case_from_pg_dump | false | 标识带引号的标识符是否来自 pg_dump,供 pg_dump 使用;带 `GUC_DISALLOW_IN_FILE` 标记,只能在会话内设置
52+
| ivorysql.out_parameter_column_position | false | 取值为(on/off),为 on 时 PL/iSQL 函数按参数位置构造 OUT 参数列
53+
| ivorysql.rowid_seq_cache | 20 | rowid 序列的缓存值个数,取值范围 1-60000
54+
|====
55+
3956
=== 部分变量使用示例
4057

4158
==== ivorysql.datetime_ignore_nls_mask
@@ -123,4 +140,4 @@ ivorysql=# select * from test_nls_date;
123140
1 | 24-04-05
124141
2 | 24-04-15
125142
(2 rows)
126-
```
143+
```

‎EN/modules/ROOT/pages/7.2.adoc‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ When adding guc parameters, we need to add them uniformly in the *ivy_guc.c*. Wh
2626
| 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
2727
| 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
2828
| ivorysql.identifier_case_switch | Set character case conversion mode
29-
| 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
29+
| 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
30+
| 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
3031
| 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
3132
| 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
3233
| nls_length_semantics | Compatible with oracle parameters of the same name, controlling the size of memory occupied by a character
@@ -35,6 +36,22 @@ When adding guc parameters, we need to add them uniformly in the *ivy_guc.c*. Wh
3536
| 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.
3637
|===
3738

39+
=== Developer options
40+
41+
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`.
42+
43+
[cols="^1,^1,^3"]
44+
|===
45+
| Variable | Default | Description
46+
| 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
47+
| ivorysql.default_with_rowids | false | The value is (on/off). When on, a rowid column is added automatically when a new table is created
48+
| ivorysql.enable_internal_warning | false | The value is (on/off). When on, internal warning information is printed
49+
| ivorysql.enable_seq_scale_fixed | false | The value is (on/off). Switch for the sequence scale value fix
50+
| 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
51+
| 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
52+
| ivorysql.rowid_seq_cache | 20 | Number of cached sequence values for rowid generation, range 1-60000
53+
|===
54+
3855
=== Example
3956

4057
==== ivorysql.datetime_ignore_nls_mask
@@ -122,4 +139,4 @@ ivorysql=# select * from test_nls_date;
122139
1 | 24-04-05
123140
2 | 24-04-15
124141
(2 rows)
125-
```
142+
```

0 commit comments

Comments
 (0)