How to reset sequences on pre-7.1

From: "Matteo Beccati" <m(dot)beccati(at)crpsoftware(dot)it>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: How to reset sequences on pre-7.1
Date: 2002-04-17 12:44:01
Message-ID: 2780D698C269CB4EB303715BA48B6A104D35@sole.CRP
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gautham S. Rao 2002-04-17 13:00:05 Re: Need some help with dates
Previous Message Stéphane DEWITTE 2002-04-17 12:33:05 Need some help with dates