mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-22 09:08:45 +00:00
fix sql statement
This commit is contained in:
@ -995,8 +995,8 @@ void CV2::onlineNotificationThread() {
|
||||
std::string device_network_insert = "INSERT INTO network_memberships_ctl (device_id, network_id, last_seen, os, arch) "
|
||||
"VALUES ('"+w2.esc(memberId)+"', '"+w2.esc(networkId)+"', '"+w2.esc(record.dump())+"'::JSONB, "
|
||||
"'"+w2.esc(osArchSplit[0])+"', '"+w2.esc(osArchSplit[1])+"') "
|
||||
"ON CONFLICT (device_id, network_id) DO UPDATE SET last_seen = last_seen || EXCLUDED.last_seen "
|
||||
"os = EXCLUDED.os, arch = EXCLUDED.arch";
|
||||
"ON CONFLICT (device_id, network_id) DO UPDATE SET os = EXCLUDED.os, arch = EXCLUDED.arch, "
|
||||
"last_seen = last_seen || EXCLUDED.last_seen";
|
||||
pipe.insert(device_network_insert);
|
||||
|
||||
Metrics::pgsql_node_checkin++;
|
||||
|
Reference in New Issue
Block a user