aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_clickhouse.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-04 19:08:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-04 19:08:17 +0100
commitdd92e8e9b2b20fc6b1759ad0ac63dea01acff859 (patch)
tree58a07d2b1524dae7107062e572837c255395598d /lualib/lua_clickhouse.lua
parenta42862af34d601105b906ef498c1077bf67af24c (diff)
downloadrspamd-dd92e8e9b2b20fc6b1759ad0ac63dea01acff859.tar.gz
rspamd-dd92e8e9b2b20fc6b1759ad0ac63dea01acff859.zip
[Minor] Add format specifier in query
Diffstat (limited to 'lualib/lua_clickhouse.lua')
-rw-r--r--lualib/lua_clickhouse.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lualib/lua_clickhouse.lua b/lualib/lua_clickhouse.lua
index fa94e4a43..3e8daa61e 100644
--- a/lualib/lua_clickhouse.lua
+++ b/lualib/lua_clickhouse.lua
@@ -254,8 +254,10 @@ exports.insert = function (upstream, settings, params, query, rows,
connect_prefix = 'https://'
end
local ip_addr = upstream:get_addr():to_string(true)
- http_params.url = string.format('%s%s/?query=%s', connect_prefix,
- ip_addr, escape_spaces(query))
+ http_params.url = string.format('%s%s/?query=%s%%20FORMAT%%20TabSeparated',
+ connect_prefix,
+ ip_addr,
+ escape_spaces(query))
end
rspamd_logger.debugm(N, http_params.log_obj, "clickhouse select request: %s", params.body)