PostgreSQL 常见问题 [Common problem] postgres 错误duplicate key value violates unique constraint 解决方案 SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1)