Why is the following like it is? I would think that nextval would return 2
in both instances, am I missing something here? :) Thanks!
binary_data=# create sequence test;
CREATE
binary_data=# select nextval('test');
NOTICE: test.nextval: sequence was re-created
nextval
---------
1
(1 row)
binary_data=# select setval('test', 1);
setval
--------
1
(1 row)
binary_data=# select nextval('test');
nextval
---------
2
(1 row)
binary_data=#