Sequence behaviour. - Mailing list pgsql-sql

From Grant
Subject Sequence behaviour.
Date
Msg-id Pine.LNX.4.21.0106191506230.8263-100000@webster.conprojan.com.au
Whole thread Raw
Responses Re: Sequence behaviour.
List pgsql-sql
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-creatednextval
---------      1
(1 row)

binary_data=# select setval('test', 1);setval
--------     1
(1 row)

binary_data=# select nextval('test');nextval
---------      2
(1 row)

binary_data=#



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: A cute little function
Next
From: Tom Lane
Date:
Subject: Re: Sequence behaviour.