0

我试图在 TDengine 的二进制字符串中添加一些特殊字符,但我不确定 TDengine 如何处理转义字符的规则,例如插入 '\t'(tab) 和 '\v'(vertical tab) 在术语上表现不同的输出。任何人都可以帮助解释转义规则或流行数据库中支持的常见转义字符吗?

insert into tb values (now ,2 ,'\t'); 
insert into tb values (now ,2 ,'\\t');
insert into tb values (now ,2 ,'\\\t');

-----------------------------------------
select * from tb;
ts | id | chars |
=========================================================================
2021-08-19 19:48:05.494 | 1 | | 
2021-08-19 19:48:19.449 | 2 | t | 
2021-08-19 19:48:26.870 | 2 | | 
Query OK, 4 row(s) in set (0.005654s)

insert into tb values (now ,2 ,'\v');
insert into tb values (now ,2 ,'\\v');
insert into tb values (now ,2 ,'\\\v');

-----------------------------------------
taos> select * from tb;
ts | id | chars |
=========================================================================
2021-08-19 19:52:36.287 | 2 | v | 
2021-08-19 19:52:44.791 | 2 | v |
2021-08-19 19:52:48.934 | 2 | v |
4

0 回答 0