注册网站域名的作用,wordpress的小工具怎么用,网络舆情监测报告,网站规划建设实训报告书功能介绍
在Lightdb数据库兼容Oracle的语法时#xff0c;发现Oracle支持sql语句中使用中文空格和中文逗号#xff0c;为了方便用户迁移到Lightdb#xff0c;在Lightdb23.4版本中支持了转换中文空格和逗号的功能。该功能由GUC参数lightdb_convert_chinese_char来控制开关发现Oracle支持sql语句中使用中文空格和中文逗号为了方便用户迁移到Lightdb在Lightdb23.4版本中支持了转换中文空格和逗号的功能。该功能由GUC参数lightdb_convert_chinese_char来控制开关默认开启转换的功能。
使用约束
该功能只在Oracle兼容模式下生效在双引号之间或者单引号之间的数据不会转换
使用示例
非Oracle模式lightdb_convert_chinese_char为on 转换空格和逗号失败 lightdbpostgres# show lightdb_convert_chinese_char ;lightdb_convert_chinese_char
------------------------------on
(1 row)lightdbpostgres# show lightdb_dblevel_syntax_compatible_type ;lightdb_dblevel_syntax_compatible_type
----------------------------------------off
(1 row)lightdbpostgres# select 1 2 ;
ERROR: syntax error at or near
LINE 1: select 1 2 ;^
lightdbpostgres# create table t1(id int, cont varchar);
CREATE TABLE
lightdbpostgres#
lightdbpostgres# insert into t1 values(1 xiaohong)(2ming);
ERROR: syntax error at or near 1
LINE 1: insert into t1 values(1 xiaohong)(2ming);^
lightdbpostgres#
Oracle模式 转换空格和逗号成功
lightdboracle_test# show lightdb_convert_chinese_char ;lightdb_convert_chinese_char
------------------------------on
(1 row)lightdboracle_test# show lightdb_dblevel_syntax_compatible_type ;lightdb_dblevel_syntax_compatible_type
----------------------------------------Oracle
(1 row)lightdboracle_test#
lightdboracle_test# select 1 2 ;?column?
----------3
(1 row)lightdboracle_test# create table t1(id int, cont varchar);
CREATE TABLE
lightdboracle_test# insert into t1 values(1 xiaohong)(2ming);
INSERT 0 2
lightdboracle_test#