From: Alan T. DeKok Date: Fri, 18 Aug 2023 14:55:32 +0000 (-0400) Subject: fix query for interim update, to subtract session time. X-Git-Tag: release_3_2_4~152 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=feeb31e8a2e32c3df3b9e0fcebc479bf208640e0;p=thirdparty%2Ffreeradius-server.git fix query for interim update, to subtract session time. This now matches MySQL and sqlite. MSSQL and Oracle still need fixing, but I'm less sure how to do that. :( --- diff --git a/raddb/mods-config/sql/main/postgresql/queries.conf b/raddb/mods-config/sql/main/postgresql/queries.conf index 18a1ed0b64..80953e0c4e 100644 --- a/raddb/mods-config/sql/main/postgresql/queries.conf +++ b/raddb/mods-config/sql/main/postgresql/queries.conf @@ -534,7 +534,7 @@ accounting { '%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}}', \ NULLIF('%{%{NAS-Port-ID}:-%{NAS-Port}}', ''), \ '%{NAS-Port-Type}', \ - ${....event_timestamp}, \ + TO_TIMESTAMP(${....event_timestamp_epoch} - %{%{Acct-Session-Time}:-0}), \ ${....event_timestamp}, \ NULL, \ %{%{Acct-Session-Time}:-NULL}, \