Script to reset all sequence values in the a given DB?

From: Nathan Wilhelmi <wilhelmi(at)ucar(dot)edu>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Script to reset all sequence values in the a given DB?
Date: 2007-12-10 20:00:44
Message-ID: 475D9AEC.4090100@ucar.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hello - Does anyone happen to have a SQL script or function that can
reset all the sequence values found in a given DB? When we rebuild the
DB it would be handy to be able to set all the sequence back to a known
starting place.

Thanks!

-Nate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo De León 2007-12-10 20:07:56 Re: TIMESTAMP difference
Previous Message Vivek Khera 2007-12-10 19:17:00 Re: partitioned table query question

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-10 21:13:58 Re: Release Note Changes
Previous Message Simon Riggs 2007-12-10 19:42:48 Re: archive_command failures report confusing exit status