Create Database/Tables -PostgreSQL
Jos Vos
jos at xos.nl
Sat May 23 23:22:04 CEST 2009
On Sat, May 23, 2009 at 03:05:39PM -0600, Just E. Mail wrote:
> I am trying to create pgsql database/tables for freeRADIUS. I notice
> that PostgreSQL has a schema for freeRADUS. Is there any procedure to
> create the DB/Tables from this schema or I have to type all the lines to
> create table manually?
The shell commands I did to create a DB user, an empty DB and the
tables for FreeRADIUS:
$ createuser -P raduser
$ createdb -O raduser raddb
$ sed "s/'now'/now()/" /etc/raddb/sql/postgresql/schema.sql | psql -h localhost -d raddb -U raduser -W
The "sed" command was necessary because the included schema.sql erroneously
contained "'now'" (note the single quotes) i.s.o. "now()", which does not
work correctly. This was with FreeRADIUS 2.0.5 so this bug might have been
solved in the meantime.
--
-- Jos Vos <jos at xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
More information about the Freeradius-Users
mailing list