aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-06-16 13:03:34 +0200
committerKim Alvefur <zash@zash.se>2023-06-16 13:03:34 +0200
commitb2cc309529ce43511af3c7a02922a7451dea7e13 (patch)
tree1a02cb9d865a1b2cdf8c8caaab7355273c26fdfd /plugins
parenta7b0237b665829274a708e213388d5b1744c368c (diff)
downloadprosody-b2cc309529ce43511af3c7a02922a7451dea7e13.tar.gz
prosody-b2cc309529ce43511af3c7a02922a7451dea7e13.zip
mod_storage_sql: Enable UPSERT with PostgreSQL
Tested. Works.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_sql.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 06581d16..bf97791c 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -218,7 +218,7 @@ function map_store:set_keys(username, keydatas)
]];
for key, data in pairs(keydatas) do
-- TODO Test UPSERT in PostgreSQL before enabling it.
- if type(key) == "string" and key ~= "" and engine.params.driver == "SQLite3" and data ~= self.remove then
+ if type(key) == "string" and key ~= "" and engine.params.driver ~= "MySQL" and data ~= self.remove then
local t, value = assert(serialize(data));
engine:insert(upsert_sql, host, username or "", self.store, key, t, value, t, value);
elseif type(key) == "string" and key ~= "" then