'%{Acct-Delay-Time}' should be quoted since AcctDelayTime is now of type "interval...
authorpnixon <pnixon>
Tue, 15 Jul 2003 10:50:32 +0000 (10:50 +0000)
committerpnixon <pnixon>
Tue, 15 Jul 2003 10:50:32 +0000 (10:50 +0000)
raddb/postgresql.conf

index 9783523..991bce9 100644 (file)
@@ -138,7 +138,7 @@ sql {
        #                                affect any existing rows in the table)
        #######################################################################
        
-       accounting_onoff_query = "UPDATE ${acct_table1} SET AcctStopTime = (now() - '%{Acct-Delay-Time:-0}'::interval), AcctSessionTime=date_part('epoch'::text, (now()::timestamp with time zone - AcctStartTime::timestamp with time zone - '%{Acct-Delay-Time:-0}'::interval)), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = %{Acct-Delay-Time:-0} WHERE AcctSessionTime=0 AND AcctStopTime IS NULL AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= now()"
+       accounting_onoff_query = "UPDATE ${acct_table1} SET AcctStopTime = (now() - '%{Acct-Delay-Time:-0}'::interval), AcctSessionTime=date_part('epoch'::text, (now()::timestamp with time zone - AcctStartTime::timestamp with time zone - '%{Acct-Delay-Time:-0}'::interval)), AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acct-Delay-Time:-0}' WHERE AcctSessionTime=0 AND AcctStopTime IS NULL AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= now()"
 
        accounting_update_query = "UPDATE ${acct_table1} SET FramedIPAddress = NULLIF('%{Framed-IP-Address}', '')::inet WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress= '%{NAS-IP-Address}' AND AcctStopTime IS NULL"