1.CREATE SEQUENCE serial START 1;
2.nextval(‘serial‘::regclass)
Postgresql设置自增主键
原文:https://www.cnblogs.com/shenjikongjian/p/12195205.html