Do the following to "catch up" your sequences to be greater than your value in the actual table. Change the number 12345 to be just enough to surpass the max value from the table.

select max(serviceid) from servicelist;

select setval('service_seq', 12345);

select nextval(service_seq);

PostgreSQL Sequences (last edited 2011-08-11 20:27:53 by Bryce Camp)