psycopg2.IntegrityError: 错误: 重复键违反唯一约束"report_data_extract_stdcompareindex_pkey" DETAIL: 键值"(id)=(2)" 已经存在解决方法
SELECT max(id) FROM public.report_data_extract_stdcompareindex; #SELECT * FROM public.report_data_extract_stdcompareindex_id_seq; ALTER SEQUENCE public.report_data_extract_stdcompareindex_id_seq RESTART WITH 《最大id+1》;