您可能想查看
fine manual:
setval(regclass,bigint) bigint Set
sequence’s current value
用法示例:;
# create sequence x; CREATE SEQUENCE # select nextval('x'); nextval --------- 1 (1 row) # select nextval('x'); nextval --------- 2 (1 row) # select nextval('x'); nextval --------- 3 (1 row) # select setval('x',10000); setval -------- 10000 (1 row) # select nextval('x'); nextval --------- 10001 (1 row) # select nextval('x'); nextval --------- 10002 (1 row)