On Thu, Aug 08, 2002 at 08:38:13AM -0500, Rick Eicher II wrote:
> Hello all,
>
> We use freeside to manage out system and ICRadius for our dailup users. We
> are wanting to move to freeradius but seem to have a problem when
> inserting users.
>
> failed: ERROR: Cannot insert a duplicate key into unique index
> radcheck_pkey at ...
>
> failed: can't insert into groupname table: ERROR: Cannot insert a duplicate
> key into unique index usergroup_pkey at ...
Sounds like PosgreSQL error messages...
> The fields that are indexed are of type serial so they should increment
> themselves with out our help.
Yes and no. If you specify its value, then _this value_ is inserted,
e.g. INSERT INTO radcheck
VALUES (0, 'Some-User', 'Some-Attribute', 'Some-Value', '==')
If you specify no value, then the default value is inserted,
which is nextval('radcheck_id_seq') for SERIAL type.
e.g. INSERT INTO radcheck (username, attribute, value, op)
VALUES ('Some-User', 'Some-Attribute', 'Some-Value', '==')
> If I drop the indexes but not the sequence
> and then do the insert it works with out error, but the id field in
> question is set to '0' for all records. This makes me think that the
> sequence is not working. So I did a select nextval on the sequence a few
> times to watch it work. It seems to have no problems. This same code does
> an insert on ICRadius with out error. I checked the table structure of
> freeradius and ICRadius. They seem to be equivalent when comparing MySql
> and postgresql.
Do you use mysql with ICRadius? And what is the source of data
you inserting into Postgres?
--
Fduch M. Pravking
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html