Remove a stupid NOT NULL and change some field types.
authorpnixon <pnixon>
Sun, 13 Jul 2003 21:20:16 +0000 (21:20 +0000)
committerpnixon <pnixon>
Sun, 13 Jul 2003 21:20:16 +0000 (21:20 +0000)
since '%S' returns *local* time (src/main/xlat.c, line 533:
TM = localtime_r(&request->timestamp, &s_TM);), acctStartTime and
acctStopTime should be "timestamp with time zone", not without.
Otherwise there will be problems with DST. However, problems will be in
any case (e.g. ambiguity in '2003-10-26 02:30:00' for Europe/Moscow TZ).
Hence queries shoud use now() instead of '%S'.

src/modules/rlm_sql/drivers/rlm_sql_postgresql/db_postgresql.sql

index e871f81..4d6de71 100644 (file)
@@ -19,12 +19,12 @@ CREATE TABLE radacct (
        AcctSessionId           VARCHAR(32) DEFAULT '' NOT NULL,
        AcctUniqueId            VARCHAR(32) DEFAULT '' NOT NULL,
        UserName                VARCHAR(32) DEFAULT '' NOT NULL,
-       Realm                   VARCHAR(30) DEFAULT '',
-       NASIPAddress            VARCHAR(15) DEFAULT '' NOT NULL,
+       Realm                   VARCHAR(30),
+       NASIPAddress            INET NOT NULL,
        NASPortId               NUMERIC(12),
        NASPortType             VARCHAR(32),
-       AcctStartTime           TIMESTAMP without time zone NOT NULL,
-       AcctStopTime            TIMESTAMP without time zone,
+       AcctStartTime           TIMESTAMP with time zone NOT NULL,
+       AcctStopTime            TIMESTAMP with time zone,
        AcctSessionTime         NUMERIC(12),
        AcctAuthentic           VARCHAR(32),
        ConnectInfo_start       VARCHAR(32),