Skip to content

Commit 633e501

Browse files
committed
little test
1 parent 0ae2538 commit 633e501

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

CN/modules/ROOT/pages/master/6.4.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ PostgreSQL已支持GB18030-2000版本作为客户端编码,通过扩展的方
2525

2626
修改pg_enc来实现可指定GB18030作为服务端编码,PostgreSQL编码框架中增加底层函数以供pg内核调用。
2727

28-
设置一个全局变量is_load_gb18030_2022,默认为true,当用户指定-E选项时,在get_encoding_id中判断其设置的是否为gb18030_2022,如果是,将其字符串转为gb18030,然后将is_load_gb18030_2022 设为true,如果-E 选项为Gb18030,将其设为false。
28+
设置一个全局变量is_load_gb18030_2022,默认为true,当用户指定-E选项时,在get_encoding_id中判断其设置的是否为gb18030_2022,如果是, 将其字符串转为gb18030,然后将is_load_gb18030_2022 设为true,如果-E 选项为Gb18030,将其设为false。
2929

30-
在适当位置判断是否要加载插件,如果是,执行load_gb18030_2022,并将ivorysql.conf中的shared_preload_library添加gb18030_2022。
30+
在适当位置判断是否要加载插件, 如果是,执行load_gb18030_2022,并将ivorysql.conf中的shared_preload_library添加gb18030_2022。
3131

3232
```
3333
if (encoding_name && *encoding_name)
@@ -66,7 +66,7 @@ pg_gb18030_verifier(const unsigned char *s, int len):校验字节范围,拒
6666

6767
发送数据: 当该客户端执行 SELECT 查询时,服务端会从磁盘/内存中读取原生的 GB18030 数据,然后调用 gb18030_to_utf8 函数将其转换为 UTF-8 格式,最后再通过网络协议发送给客户端。
6868

69-
新增GB18030-2022.xml数据文件,通过perl脚本解析为map文件,提供 gb18030_to_utf8() 与 utf8_to_gb18030(),优先表驱动,覆盖不到的区间通过算法映射
69+
新增GB18030-2022.xml数据文件,通过perl脚本解析为map文件,提供 gb18030_to_utf8() 与 utf8_to_gb18030(),优先表驱动,覆盖不到的区间通过算法映射;
7070

7171
```
7272
static inline uint32

EN/modules/ROOT/pages/master/6.4.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To enable GB18030 as a server encoding, modifications are made to pg_enc, and ne
2626

2727
A global variable, is_load_gb18030_2022, is introduced with a default value of true. When the -E option is used during initdb, the get_encoding_id function checks the specified encoding name. If the name is gb18030_2022, it is internally mapped to the gb18030 encoding ID, and the is_load_gb18030_2022 flag is set to true. If the -E option is GB18030, the flag is set to false.
2828

29-
At the appropriate stage in the startup process, the system checks this flag to determine if the extension should be loaded. If required, the load_gb18030_2022 function is executed, and the gb18030_2022 extension is added to the shared_preload_libraries parameter in ivorysql.conf.
29+
At the appropriate stage in the startup process, the system checks this flag to determine if the extension should be loaded. If required, the load_gb18030_2022 function is executed, and the gb18030_2022 extension is added to the shared_preload_libraries parameter in ivorysql.conf files.
3030
```
3131
if (encoding_name && *encoding_name)
3232
{

0 commit comments

Comments
 (0)