[OPEN-ILS-DEV] Patron Registration Error

Martha Driscoll driscoll at noblenet.org
Tue Mar 8 09:43:43 EST 2011


I'm running a test system on 2.0.1.  We added 5 users in the client (id 
2-6) and then loaded 117 more users by inserting directly into the usr, 
card, and usr_address tables (id 7-123).  Now when we try to store a new 
user in the client, we get a database error saying 'duplicate key value 
violates unique constraint "usr_pkey"'.  The postgresql-8.4-main.log 
shows that user id 7,8,9 etc. were tried.  Each time we click save, the 
user id increments by one.  Why isn't Evergreen checking the max(id) in 
the usr table?  Did I do something wrong when I loaded the records?  Is 
there a way to bump the usr.id to 124 so I can store a new patron record?

Here is an error in the postgresql-8.4-main.log.  The usr.id it is 
trying is 22.  If we try to save again, it will use 23 etc.

2011-03-07 17:05:21 EST ERROR:  duplicate key value violates unique 
constraint "usr_pkey"
2011-03-07 17:05:21 EST STATEMENT:  INSERT INTO actor.usr (profile, 
juvenile, usrname, claims_returned_count, family_name, first_given_name, 
expire_date, id, net_access_level, ident_type, active, home_ou, 
last_xact_id, passwd, second_given_name, barred, master_account)
         VALUES ('11', 'f', '21458000270368', '0', 'Cat', 'Felix', 
'2014-03-07T00:00:00-05:00', '22', '1', '1', 't', '68', 
'1299535520.885932935.48171580426', '6796', 'T', 'f', 'f')

-- 
Martha Driscoll
Systems Manager
North of Boston Library Exchange
Danvers, Massachusetts
www.noblenet.org



More information about the Open-ils-dev mailing list