Using Postgresql I ran into the following error when trying to create a new record through my rails application
- PGError: ERROR: duplicate key value violates unique constraint "tablename_pkey"
Found this link which had the needed fix;
Dealing with 'duplicate key violates unique constraint' on the primary key
apparently with Postgresql after bulk loading records where the auto incrementing id is specified you then need to update the sequence value
No comments:
Post a Comment