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

From Tom Lane
Subject Re: How to reset sequences on pre-7.1
Date
Msg-id 6669.1019057135@sss.pgh.pa.us
Whole thread Raw
In response to How to reset sequences on pre-7.1  ("Matteo Beccati" <m.beccati@crpsoftware.it>)
List pgsql-sql
"Matteo Beccati" <m.beccati@crpsoftware.it> writes:
> 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 all recent releases, that is a complete no-op, because setval() is
a strict function.  Better check what you were actually doing.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Miguel Carvalho"
Date:
Subject: Re: Need some help with dates
Next
From: "Josh Berkus"
Date:
Subject: Re: Need some help with dates