]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fix query for interim update, to subtract session time.
authorAlan T. DeKok <aland@freeradius.org>
Fri, 18 Aug 2023 14:55:32 +0000 (10:55 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 25 Aug 2023 19:35:32 +0000 (15:35 -0400)
This now matches MySQL and sqlite.  MSSQL and Oracle still need
fixing, but I'm less sure how to do that. :(

raddb/mods-config/sql/main/postgresql/queries.conf

index 18a1ed0b6424c8916c9da9673a8560ea2527d4c6..80953e0c4e5577a4eeeb3dd98e73a967eb38f52e 100644 (file)
@@ -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}, \