I'm glad that you figured out where the error was coming from.
As a general guideline, assuming that the first field in table analyse is the PK, the only way that wyat you observed could have happened is that the Sequence analyse_id_seq was recreated or altered before the insert took place, and that data inserted using the old sequence was still in the table. (Or, that data in the analyze table was altered so that IT would interfere with subsequent inserts...)
When altering a sequence, you must take care that the starting point for the sequence will not create new values that are already present in the table(s) where the sequence is applied.
Last edited by loquin; 03-23-06 at 16:56.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert