By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,249 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

How to update an a postgreSQL unique key constraint

P: 1
I keep getting this error within my application

duplicate key value violates unique constraint "product_supplierinfo_pkey" DETAIL: Key (id)=(409) already exists.

The actual next sequence number the key constraint needs to be is 5461 not 409.

It is a postgreSQL table called product_supplierinfo and it has a constraint called product_supplierinfo_pkey this number is updated everytime a record is added. HOwever I did a direct import into the database and it threw the constraint counter off. It thinks the next id number is 409 and it is supposed to be 5461
Aug 17 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.