How to reset sequences on pre-7.1 - Mailing list pgsql-sql

From Matteo Beccati
Subject How to reset sequences on pre-7.1
Date
Msg-id 2780D698C269CB4EB303715BA48B6A104D35@sole.CRP
Whole thread Raw
Responses Re: How to reset sequences on pre-7.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi,

I usually use a:

SELECT setval('seq_name', NULL);

to reset sequences, so the next time it's called it returns '1'. This
works in all Pg releases I've ever tested but 7.0.

On an hosted space that still has a 7.0 release candidate, this query
fails, telling me that I cannot use a 0 value.

Anybody knows how to reset sequences in this case?

Regards
--
Matteo Beccati
http://www.phpadsnew.com
http://phppgads.sourceforge.net



pgsql-sql by date:

Previous
From: "Gautham S. Rao"
Date:
Subject: Re: Need some help with dates
Next
From: Stéphane DEWITTE
Date:
Subject: Need some help in dates