Tencent / TBase

TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
Other
1.38k stars 262 forks source link

tbase无法识别自定义变量 #67

Open Yuunxin opened 3 years ago

Yuunxin commented 3 years ago

2020-08-05 09:42:59.042 CST,"tbase","test",83993,coord(0,0),"[local]",5f2a0ea1.14819,coord(0,0),1,"idle",2020-08-05 09:42:57 CST,19/1882,0,ERROR,42601,"syntax error at or near ""jdwa""",,,,,,"SET global_session TO cn01_83989;SET client_encoding TO ""UTF8"";SET DateStyle TO ISO;SET TimeZone TO ""Asia/Shanghai"";SET extra_float_digits TO ""3"";SET application_name TO ""PostgreSQL JDBC Driver"";SET jdwa.triggers_disabled TO '';SET jdwa.node_disabled TO '';SET parentPGXCPid TO 83989;",206,,"pgxc:cn01"

请问有什么方法可以配置吗? 查询postgres文档说是配置custom_variable_classes = 'jdwa' 但是tbase好像不支持这个配置

JennyJennyChen commented 3 years ago

What settings do you want to achieve and what purpose

Yuunxin commented 3 years ago

可以配置自定义的变量吗

JennyJennyChen commented 3 years ago

plpgsql中可以自定义变量并且赋值

Yuunxin commented 3 years ago

我在创建函数之前执行了这个sql,select set_config('symmetric.triggers_disabled', '', false),是否跟这个有关呢

Yuunxin commented 3 years ago

select set_config('symmetric.triggers_disabled', '', false)...B............D....P.E... .....S....P...?.select set_config('symmetric.node_disabled', '', false)...B............D....P.E... .....S....B.....S_2.......E... .....S....P..... select count() from information_schema.routines where routine_name = 'sym_triggers_disabled' and specific_schema = 'public'...B............D....P.E... .....S....P..... select count() from information_schema.routines where routine_name = 'sym_node_disabled' and specific_schema = 'public'...B............D....P.E... .....S....P..... select count(*) from information_schema.routines where routine_name = 'sym_largeobject' and specific_schema = 'public'...B............D....P.E... .....S....P.....CREATE OR REPLACE FUNCTION sym_largeobject(objectId oid) RETURNS text AS $$ DECLARE encodedBlob text; encodedBlobPage text; BEGIN encodedBlob := ''; FOR encodedBlobPage IN SELECT pg_catalog.encode(data, 'escape') FROM pg_largeobject WHERE loid = objectId ORDER BY pageno LOOP encodedBlob := encodedBlob || encodedBlobPage; END LOOP; RETURN pg_catalog.encode(pg_catalog.decode(encodedBlob, 'escape'), 'base64'); EXCEPTION WHEN OTHERS THEN RETURN ''; END $$ LANGUAGE plpgsql...

这个是截取的tcp包的前后信息

JennyJennyChen commented 3 years ago

没搞懂你想做什么,方便的话,把你测试用例贴出来,然后把说一下期望值和实际值