Menu

ERROR: Cannot insert a duplicate key

Help
2002-10-15
2002-10-16
  • Renaud SALIOU

    Renaud SALIOU - 2002-10-15

    I tried to insert a new account and i have following error:
    DB Error: already exists
    insert into phpbt_auth_user (user_id, login, first_name, last_name, email, password, active, created_date, last_modified_date) values (1, 'titi@itsgroup.fr', '', 'Titi', 'titi@itsgroup.fr', 'eb07081fd3fbc02ae0978b1aeb28b3ba', 1, 1034672243, 1034672243) [nativecode=ERROR: Cannot insert a duplicate key into unique index phpbt_auth_user_pkey ]
    Does someone can help me ?

     
    • Renaud SALIOU

      Renaud SALIOU - 2002-10-15

      There is already a first acount that have the user_id 1. Why don't have use a sequence (nevertheless there is one: phpbt_auth_user_seq) to auto-increment id and prevent such error ?

       
    • Benjamin Curtis

      Benjamin Curtis - 2002-10-15

      One or two other people have had problems with the sequences, as I recall.  I don't know what the causes were, though, so if you can track down the problem that would be helpful.

       
    • Renaud SALIOU

      Renaud SALIOU - 2002-10-16

      I will search in bug report of my old database PostgreSQL 7.1.3

       

Log in to post a comment.