Re: [HACKERS] Can't setval() a sequence to return the first value

2013-01-03 Thread Pavel Stehule
Hello postgres=# select setval('xx', 1, false); setval 1 (1 row) postgres=# select nextval('xx'); nextval - 1 (1 row) Regards Pavel 2013/1/3 Hannu Krosing : > Hi hackers. > > Is it by design that you can't setval(seq, value) a sequence to a value > which return

[HACKERS] Can't setval() a sequence to return the first value

2013-01-03 Thread Hannu Krosing
Hi hackers. Is it by design that you can't setval(seq, value) a sequence to a value which returns the first value: See the sample below for better explanation: hannu=# create sequence s; CREATE SEQUENCE hannu=# select nextval('s'); nextval - 1 (1 row) hannu=# select setval('s'