I'm using postgres and I'm getting the duplicate key error when updating a row:
cursor.execute("UPDATE jiveuser SET userenabled = 0 WHERE userid = %s" % str(userId))
psycopg2.IntegrityError: duplicate key value violates unique constraint "jiveuser_pk"
I don't understand how updating a row can cause this error... any help will be much appreciated.