From: Grant <grant@conprojan.com.au>
To: pgsql-sql@postgresql.org
Subject: Sequence behaviour.
Date: Tue, 19 Jun 2001 15:12:51 +1000 (EST)
Message-ID: <Pine.LNX.4.21.0106191506230.8263-100000@webster.conprojan.com.au> (raw)
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=#
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: grant@conprojan.com.au
Subject: Re: Sequence behaviour.
In-Reply-To: <Pine.LNX.4.21.0106191506230.8263-100000@webster.conprojan.com.au>
References: <Pine.LNX.4.21.0106191506230.8263-100000@webster.conprojan.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox