Skip to content

Commit ea9f546

Browse files
committed
Fix italic font issue by applying C-style code block formatting.
1 parent 4773f98 commit ea9f546

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IvorySQL提供了兼容Oracle的NLS参数功能,包含如下参数。
2727
IvorySQL中的数据类型存在一个属性修饰符 `typmod` ,是对类型的补充说明,比如在 `VARCHAR(n)` 类型中,`n` 就是类型修饰符。
2828

2929
在创建或修改表的列时可以指定长度类型,例如:
30-
```
30+
```c
3131
ivorysql=# create table t1(name varchar2(2 byte));
3232
```
3333

@@ -37,7 +37,7 @@ IvorySQL中的数据类型存在一个属性修饰符 `typmod` ,是对类型
3737

3838
在语法解析文件 ora_gram.y中,存在如下代码来根据 `nls_length_semantics` 把原本的 `char/varchar/varchar2` 类型改成 `oracharchar` 或者 `oracharbyte` :
3939

40-
```
40+
```c
4141
CharacterWithLength: character '(' Iconst ')'
4242
{
4343
if (ORA_PARSER == compatible_db)
@@ -71,7 +71,7 @@ CharacterWithLength: character '(' Iconst ')'
7171
```
7272

7373
IvorySQL 中数据类型 `oracharchar` 和 `oracharbyte` 的修饰符输入输出函数包括:
74-
```
74+
```c
7575
oravarcharchartypmodout()
7676
oravarcharbytetypmodout()
7777
oracharbytetypmodout()
@@ -83,7 +83,7 @@ oracharchartypmodout()
8383
`nls_length_semantics` 另一个作用是限制表中的列长度:
8484
根据上述代码在语法解析文件 ora_gram.y中,如果原本的 `varchar` 类型被转换成了 `oracharchar` 类型,则函数 `oravarcharchar()` 会被调用,而 `pg_mbcharcliplen()` 函数计算字符长度,而不是字节长度。
8585

86-
```
86+
```c
8787
Datum
8888
oravarcharchar(PG_FUNCTION_ARGS)
8989
{
@@ -112,15 +112,15 @@ oravarcharchar(PG_FUNCTION_ARGS)
112112
=== GUC参数 `datetime_ignore_nls_mask`
113113

114114
这个参数被定义为一个int值,低四位分别表示是否在相应的日期时间格式上忽略NLS参数的影响,掩码定义如下:
115-
```
115+
```c
116116
#define ORADATE_MASK 0x01
117117
#define ORATIMESTAMP_MASK 0x02
118118
#define ORATIMESTAMPTZ_MASK 0x04
119119
#define ORATIMESTAMPLTZ_MASK 0x08
120120
```
121121

122122
在源代码中,这个GUC参数被用于下面这些函数:
123-
```
123+
```c
124124
oradate_in()
125125
oratimestamp_in()
126126
oratimestampltz_in()
@@ -134,7 +134,7 @@ oratimestamptz_in()
134134
这三个GUC参数,在函数 `ora_do_to_timestamp()` 中做为格式字符串,对输入的字符串进行格式检查与模式识别。
135135

136136
下面是其默认值,可以通过设置其值为"pg"使其失效。"pg"表示禁用NLS特定行为,恢复为PostgreSQL的默认行为。
137-
```
137+
```c
138138
char *nls_date_format = "YYYY-MM-DD";
139139
char *nls_timestamp_format = "YYYY-MM-DD HH24:MI:SS.FF6";
140140
char *nls_timestamp_tz_format = "YYYY-MM-DD HH24:MI:SS.FF6 TZH:TZM";
@@ -146,7 +146,7 @@ char *nls_timestamp_tz_format = "YYYY-MM-DD HH24:MI:SS.FF6 TZH:TZM";
146146

147147
默认值如下:
148148

149-
```
149+
```c
150150
char *nls_territory = "AMERICA";
151151
char *nls_currency = "$";
152152
char *nls_iso_currency = "AMERICA";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ IvorySQL提供兼容Oracle的NLS参数功能。
3030

3131
=== NLS 日期掩码设置
3232
示例:
33-
```
33+
```c
3434
ivorysql=# set ivorysql.datetime_ignore_nls_mask = 0;
3535
SET
3636
ivorysql=# select '2025-10-15 11:00:00.102030 CST'::oratimestamp ;
@@ -48,7 +48,7 @@ ivorysql=# select '2025-10-15 11:00:00.102030 CST'::oratimestamp ;
4848
4949
=== 禁用NLS日期/时间戳参数
5050
示例:
51-
```
51+
```c
5252
ivorysql=# select '2025-10-15 11:00:00.102030 '::oratimestamp ;
5353
oratimestamp
5454
----------------------------
@@ -65,7 +65,7 @@ LINE 1: select '2025-10-15 11:00:00.102030 '::oratimestamp ;
6565
=== 设置nls_length_semantics
6666
IvorySQL使用nls_length_semantics参数的值来决定长度类型,有byte和char两种值,默认为byte。
6767
示例:
68-
```
68+
```c
6969
vorysql=# alter session set nls_length_semantics = char;
7070
SET
7171
ivorysql=# create table character_tb(char_c char(6), char_b varchar2(6 byte), char_v varchar(6));
@@ -87,7 +87,7 @@ ivorysql=# select length(char_b), length(char_c), length(char_v) from character_
8787
```
8888
=== 设置NLS货币符号
8989
示例:
90-
```
90+
```c
9191
ivorysql=# show ivorysql.identifier_case_switch;
9292
ivorysql.identifier_case_switch
9393
---------------------------------

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ IvorySQL provides Oracle-compatible NLS (National Language Support) parameter fu
2424
=== Parameter `nls_length_semantics`
2525

2626
In IvorySQL, data types have an attribute modifier called typmod, which provides additional information about the type. For example, in `VARCHAR(n)`, n is the type modifier. When creating or modifying table columns, you can specify the length type, such as:
27-
```
27+
```c
2828
ivorysql=# create table t1(name varchar2(2 byte));
2929
```
3030

@@ -33,7 +33,7 @@ For columns of type `CHAR`, `VARCHAR`, or `VARCHAR2`, if the length type is not
3333
Note that the `nls_length_semantics` parameter only affects newly created columns and has no impact on existing columns.
3434

3535
In the syntax parsing file ora_gram.y, the following code converts the original `CHAR`, `VARCHAR`, or `VARCHAR2` types to oracharchar or oracharbyte based on `nls_length_semantics`.
36-
```
36+
```c
3737
CharacterWithLength: character '(' Iconst ')'
3838
{
3939
if (ORA_PARSER == compatible_db)
@@ -67,7 +67,7 @@ CharacterWithLength: character '(' Iconst ')'
6767
```
6868

6969
The input/output functions for the oracharchar and oracharbyte data types in IvorySQL include:
70-
```
70+
```c
7171
oravarcharchartypmodout()
7272
oravarcharbytetypmodout()
7373
oracharbytetypmodout()
@@ -77,7 +77,7 @@ oracharchartypmodout()
7777
These functions call the C-language function `anychar_typmodout()`, which adjusts the output to include `BYTE` or `CHAR` based on the value of `nls_length_semantics`.
7878

7979
Another role of `nls_length_semantics` is to limit column lengths in tables. If the original `VARCHAR` type is converted to `oracharchar`, the function `oravarcharchar()` is called, and `pg_mbcharcliplen()` calculates the character length instead of the byte length.
80-
```
80+
```c
8181
Datum
8282
oravarcharchar(PG_FUNCTION_ARGS)
8383
{
@@ -106,7 +106,7 @@ oravarcharchar(PG_FUNCTION_ARGS)
106106
=== GUC Parameter `datetime_ignore_nls_mask`
107107

108108
This parameter is defined as an int value, where the lower four bits indicate whether to ignore NLS parameter influence on the corresponding date-time formats. The mask definitions are:
109-
```
109+
```c
110110
#define ORADATE_MASK 0x01
111111
#define ORATIMESTAMP_MASK 0x02
112112
#define ORATIMESTAMPTZ_MASK 0x04
@@ -115,7 +115,7 @@ This parameter is defined as an int value, where the lower four bits indicate wh
115115

116116
In the source code, this GUC parameter is used in the following functions:
117117

118-
```
118+
```c
119119
oradate_in()
120120
oratimestamp_in()
121121
oratimestampltz_in()
@@ -127,7 +127,7 @@ If the corresponding mask is set, the native PostgreSQL processing function is c
127127
=== GUC Parameters `nls_date_format` `nls_timestamp_format` `nls_timestamp_tz_format`
128128

129129
These three GUC parameters serve as format strings in the function `ora_do_to_timestamp()` for checking and parsing input strings. Their default values are:
130-
```
130+
```c
131131
char *nls_date_format = "YYYY-MM-DD";
132132
char *nls_timestamp_format = "YYYY-MM-DD HH24:MI:SS.FF6";
133133
char *nls_timestamp_tz_format = "YYYY-MM-DD HH24:MI:SS.FF6 TZH:TZM";
@@ -139,7 +139,7 @@ Setting these values to "pg" disables NLS-specific behavior, reverting to Postgr
139139
Currently, `nls_territory` and `nls_iso_currency` support the values CHINA and AMERICA.
140140

141141
The default values are:
142-
```
142+
```c
143143
char *nls_territory = "AMERICA";
144144
char *nls_currency = "$";
145145
char *nls_iso_currency = "AMERICA";

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following parameters are included:
3030
=== NLS Date Mask Settings
3131

3232
Example:
33-
```
33+
```c
3434
ivorysql=# set ivorysql.datetime_ignore_nls_mask = 0;
3535
SET
3636
ivorysql=# select '2025-10-15 11:00:00.102030 CST'::oratimestamp ;
@@ -49,7 +49,7 @@ ivorysql=# select '2025-10-15 11:00:00.102030 CST'::oratimestamp ;
4949
=== Disabling NLS Date or Timestamp Format
5050
5151
Example:
52-
```
52+
```c
5353
ivorysql=# select '2025-10-15 11:00:00.102030 '::oratimestamp ;
5454
oratimestamp
5555
----------------------------
@@ -68,7 +68,7 @@ LINE 1: select '2025-10-15 11:00:00.102030 '::oratimestamp ;
6868
IvorySQL uses the value of the `nls_length_semantics` parameter to determine the length type, which can be either BYTE or CHAR (default is BYTE )。
6969

7070
Example:
71-
```
71+
```c
7272
ivorysql=# alter session set nls_length_semantics = char;
7373
SET
7474
ivorysql=# create table character_tb(char_c char(6), char_b varchar2(6 byte), char_v varchar(6));
@@ -92,7 +92,7 @@ ivorysql=# select length(char_b), length(char_c), length(char_v) from character_
9292
=== NLS Currency Symbols Settings
9393
9494
Example:
95-
```
95+
```c
9696
ivorysql=# show ivorysql.identifier_case_switch;
9797
ivorysql.identifier_case_switch
9898
---------------------------------

0 commit comments

Comments
 (0)