Hello Guy, just checked mailing list and i got your dialup admin postgres
schema and im just combine it all. Can you take a look please, if this is
correct, it work for me.



SET search_path = public, pg_catalog;

--Table structure for table 'badusers'
--
CREATE TABLE badusers (
    id BIGSERIAL PRIMARY KEY,
    username TEXT NOT NULL,
    date timestamp with time zone DEFAULT 'now' NOT NULL,
    reason TEXT,
    admin TEXT DEFAULT '-'
);
CREATE INDEX badusers_actiondate_idx ON badusers USING btree (actiondate);
CREATE INDEX badusers_username_idx ON badusers USING btree (username);

--
-- Table structure for table 'mtotacct'
--
CREATE TABLE mtotacct (
    mtotacctid BIGSERIAL PRIMARY KEY,
    username TEXT DEFAULT '' NOT NULL,
    acctdate DATE DEFAULT 'now' NOT NULL,
    connnum BIGINT,
    conntotduration BIGINT,
    connmaxduration BIGINT,
    connminduration BIGINT,
    inputoctets BIGINT,
    outputoctets BIGINT,
    nasipaddress INET
);
CREATE INDEX mtotacct_acctdate_idx ON mtotacct USING btree (acctdate);
CREATE INDEX mtotacct_nasipaddress_idx ON mtotacct USING btree
(nasipaddress);
CREATE INDEX mtotacct_username_idx ON mtotacct USING btree (username);
CREATE INDEX mtotacct_userondate_idx ON mtotacct USING btree (username,
acctdate);

--
-- Table structure for table 'totacct'
--
CREATE TABLE totacct (
    totacctid bigSERIAL PRIMARY KEY,
    username TEXT DEFAULT '' NOT NULL,
    acctdate DATE DEFAULT 'now' NOT NULL,
    connnum BIGINT,
    conntotduration BIGINT,
    connmaxduration BIGINT,
    connminduration BIGINT,
    inputoctets BIGINT,
    outputoctets BIGINT,
    nasipaddress INET
);
CREATE INDEX totacct_acctdate_idx ON totacct USING btree (acctdate);
CREATE INDEX totacct_nasipaddress_idx ON totacct USING btree (nasipaddress);
CREATE INDEX totacct_nasondate_idx ON totacct USING btree (acctdate,
nasipaddress);
CREATE INDEX totacct_username_idx ON totacct USING btree (username);
CREATE INDEX totacct_userondate_idx ON totacct USING btree (username,
acctdate);

--
-- Table structure for table 'userinfo'
--
CREATE TABLE userinfo (
    id SERIAL PRIMARY KEY,
    username TEXT,
    name TEXT,
    mail TEXT,
    department TEXT,
    workphone TEXT,
    homephone TEXT,
    mobile TEXT
);
CREATE INDEX userinfo_department_idx ON userinfo USING btree (department);
CREATE INDEX userinfo_username_idx ON userinfo USING btree (username);





 Original Message ----- 
From: "Kostas Kalevras" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 18, 2004 7:59 PM
Subject: Re: dialup_admin/sql using postgresql


> On Fri, 18 Jun 2004, apellido jr., wilfredo p. wrote:
>
> > mysql -h mysql.host.com -u username -p radius < badusers.sql this is for
MYSQL. what about POSTGRESQL? i tried this
> >
> > cat mtotacct.sql | psql radius
> >
> > and i got this : ERROR:  syntax error at or near "(" at character 44
> >
> > thanks
> >
>
> so provide patches for the sql schema to work with postgresql. It
shouldn't be
> too hard. I don't use pgsql so i can't help you on that.
>
> --
> Kostas Kalevras Network Operations Center
> [EMAIL PROTECTED] National Technical University of Athens, Greece
> Work Phone: +30 210 7721861
> 'Go back to the shadow' Gandalf
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to