diff options
author | Anton Yuzhaninov <citrin+github@citrin.ru> | 2019-06-26 11:25:40 +0100 |
---|---|---|
committer | Anton Yuzhaninov <citrin+github@citrin.ru> | 2019-06-26 11:25:40 +0100 |
commit | 2fd8ae45023bc225bdb2970581452a9c700555db (patch) | |
tree | 6ee5a66101b6ca28c811e68c306422a3e352e7bd /lualib | |
parent | 3c4d34b9441e6cd1ed4135db2a336e3f7ed4d72c (diff) | |
download | rspamd-2fd8ae45023bc225bdb2970581452a9c700555db.tar.gz rspamd-2fd8ae45023bc225bdb2970581452a9c700555db.zip |
[Rework] Do not lowercase all data send to ClickHouse
A lot of strings stored in ClickHouse are case sensitive according to
standards - store them in original case. We can always can use
'lower(field)' in a ClickHouse query, but if string was lowercased by
Rspamd nothing can be done to recover lost information.
Lowercase domain parts of addresses - domains are not case sensitive and
storing them in lower case will simplify queries.
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_clickhouse.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua index ad5b51dce..4a57afd3f 100644 --- a/lualib/lua_clickhouse.lua +++ b/lualib/lua_clickhouse.lua @@ -49,7 +49,7 @@ local function clickhouse_quote(str) ['\\'] = [[\\]], ['\n'] = [[\n]], ['\t'] = [[\t]], - }):lower() + }) end return '' @@ -503,4 +503,4 @@ exports.generic_sync = function (upstream, settings, params, query) end end -return exports
\ No newline at end of file +return exports |