cast to bigint in query

This commit is contained in:
Grant Limberg 2021-06-04 14:48:41 -07:00
parent 3bfc438ae8
commit add33f1ab3
No known key found for this signature in database
GPG Key ID: 2BA62CCABBB4095A

View File

@ -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);