From add33f1ab357b1917ba151e0e6ce52b769654eee Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 4 Jun 2021 14:48:41 -0700 Subject: [PATCH] cast to bigint in query --- controller/PostgreSQL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index 2b228476c..beb8f3bbc 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -418,8 +418,8 @@ void PostgreSQL::initializeNetworks() fprintf(stderr, "Initializing Networks...\n"); auto c = _pool->borrow(); pqxx::work w{*c->c}; - pqxx::result r = w.exec_params("SELECT id, EXTRACT(EPOCH FROM creation_time AT TIME ZONE 'UTC')*1000 as creation_time, capabilities, " - "enable_broadcast, EXTRACT(EPOCH FROM last_modified AT TIME ZONE 'UTC')*1000 AS last_modified, mtu, multicast_limit, name, private, remote_trace_level, " + pqxx::result r = w.exec_params("SELECT id, (EXTRACT(EPOCH FROM creation_time AT TIME ZONE 'UTC')*1000)::bigint as creation_time, capabilities, " + "enable_broadcast, (EXTRACT(EPOCH FROM last_modified AT TIME ZONE 'UTC')*1000)::bigint AS last_modified, mtu, multicast_limit, name, private, remote_trace_level, " "remote_trace_target, revision, rules, tags, v4_assign_mode, v6_assign_mode, sso_enabled FROM ztc_network " "WHERE deleted = false AND controller_id = $1", _myAddressStr);