I have the following problem. I am inserting data to Postgres database through my javafx interface.
When i import some data to my database, sometimes primary key is violated and I am getting the following stack error:
catch(PSQLException e){
System.out.println(e.getLocalizedMessage());
}
duplicate key value violates unique constraint "importedDocumentPK"
Detail: Key (part_id, supplier_id, temp_id, qty, color, sign_id, state_id)=(41A213752P9, 750, 7049, 48, 5, 1, 1) already exists.
My question is. How can I save information about this row (41A213752P9, 750, 7049, 48, 5, 1, 1) in my program?