[sqlalchemy] Unable to update Postgres because of natural primary key

2011-07-26 Thread jos.carpente...@yahoo.com
I'm new at SA and I run into problems with natural primary keys. These are PK's not created by a Postgres sequence, but are unique strings. I insert/upgrade data from a csv. When the PK is new everything works fine, but when an existing record has to be updated the following error is given:

[sqlalchemy] Updating records in table not working

2011-07-26 Thread jos.carpente...@yahoo.com
I'm using Postgres as a database. I try to create new records or update existing records with data. The data is parsed from a csv file. Creating new records works fine. But when a record already exists, the update fails with: * * * IntegrityError: (IntegrityError) duplicate key value violates