Postgres重置自增长id列(reset sequence)
简单的两个方法,个人比较喜欢第一个
①
ALTER SEQUENCE seq RESTART WITH 1;
②
SELECT setval('sequence_name', 0);
参考自http://stackoverflow.com/questions/4678110/how-to-reset-sequence-in-postgres-and-fill-id-column-with-new-data
-----