Sequence reset
How can I reset a sequence column due to deletion of some rolls?
Sunday Olutayo
Sadeeb Technologies Ltd
Import Notes
Reply to msg id not found: 1693589924.1869.1282557491375.JavaMail.root@mail
On 23/08/2010 11:04, SUNDAY A. OLUTAYO wrote:
How can I reset a sequence column due to deletion of some rolls?
You can use the setval() function to set its value to whatever you like:
http://www.postgresql.org/docs/8.4/static/functions-sequence.html
HTH
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie
On Mon, Aug 23, 2010 at 4:04 AM, SUNDAY A. OLUTAYO <olutayo@sadeeb.com> wrote:
How can I reset a sequence column due to deletion of some rolls?
Note that a design of a column that holds the output of a sequence and
can't handle gaps is pretty much broken.
I can't tell what a roll is based on your question, but here is how to
set a sequence to a specific value.
SELECT setval('foo', 42); Next nextval will return 43
http://www.postgresql.org/docs/8.4/interactive/functions-sequence.html
-Randall
Show quoted text
On Mon, 2010-08-23 at 05:04 -0500, SUNDAY A. OLUTAYO wrote:
How can I reset a sequence column due to deletion of some rolls?
Sunday Olutayo
Sadeeb Technologies Ltd