Poprawki dla postgres'a ( rzutowanie na ::inet oraz poprawka daty; postgres nie wie co to 0000-00-00 00:00:00 )
2015-03-06 21:40:52 CET [89827-1] lms@lms BŁĄD: wartość pola daty/czasu poza zakresem: "0000-00-00 00:00:00" przy znaku 752
2015-03-06 21:40:52 CET [89827-2] lms@lms WYRAŻENIE: SELECT r.radacctid, r.acctsessionid, r.username, r.nasipaddress, r.nasporttype, r.acctstarttime, r.servicetype , r.acctstoptime, r.acctterminatecause , r.acctsessiontime, r.acctinputoctets, r.acctoutputoctets, r.framedipaddress, UPPER(r.callingstationid) AS callingstationid , nass.name AS nasname, nass.netdevid AS nasid , n.id AS nodeid, n.name AS nodename , c.id AS cid, c.lastname || ' ' || c.name AS customername , nd.maxid AS maxid FROM radacct r JOIN ( SELECT MAX(radacctid) AS maxid, username FROM radacct GROUP BY username) nd ON (nd.username = r.username) JOIN nas nass ON (nass.nasname::inet = r.nasipaddress) JOIN nodes n ON (n.name = r.username) JOIN customersview c ON (c.id = n.ownerid) WHERE (r.acctstoptime IS NULL OR r.acctstoptime='0000-00-00 00:00:00') AND DATE(r.acctstarttime) >= '2015-03-01' AND DATE(r.acctstarttime) <= '2015-03-06' ORDER BY r.acctstarttime DESC;
Poprawki dla postgres'a ( rzutowanie na ::inet oraz poprawka daty; postgres nie wie co to 0000-00-00 00:00:00 )
2015-03-06 21:40:52 CET [89827-1] lms@lms BŁĄD: wartość pola daty/czasu poza zakresem: "0000-00-00 00:00:00" przy znaku 752 2015-03-06 21:40:52 CET [89827-2] lms@lms WYRAŻENIE: SELECT r.radacctid, r.acctsessionid, r.username, r.nasipaddress, r.nasporttype, r.acctstarttime, r.servicetype , r.acctstoptime, r.acctterminatecause , r.acctsessiontime, r.acctinputoctets, r.acctoutputoctets, r.framedipaddress, UPPER(r.callingstationid) AS callingstationid , nass.name AS nasname, nass.netdevid AS nasid , n.id AS nodeid, n.name AS nodename , c.id AS cid, c.lastname || ' ' || c.name AS customername , nd.maxid AS maxid FROM radacct r JOIN ( SELECT MAX(radacctid) AS maxid, username FROM radacct GROUP BY username) nd ON (nd.username = r.username) JOIN nas nass ON (nass.nasname::inet = r.nasipaddress) JOIN nodes n ON (n.name = r.username) JOIN customersview c ON (c.id = n.ownerid) WHERE (r.acctstoptime IS NULL OR r.acctstoptime='0000-00-00 00:00:00') AND DATE(r.acctstarttime) >= '2015-03-01' AND DATE(r.acctstarttime) <= '2015-03-06' ORDER BY r.acctstarttime DESC;