Re: FW: reset all sequences

From: "Ben K(dot)" <bkim(at)coe(dot)tamu(dot)edu>
To: Pascal Tufenkji <ptufenkji(at)usj(dot)edu(dot)lb>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: FW: reset all sequences
Date: 2006-05-09 14:01:27
Message-ID: Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> Select setval('mytable_id_seq',1);
> So when I insert a new row the value will be "2" and not "1" as it should be

Select setval('mytable_id_seq',1,false);
http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html

HTH.

Ben K.
Developer
http://benix.tamu.edu

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wagener, Johannes J 2006-05-09 17:02:07 Using SSL for secure connections to the DB
Previous Message Andy Shellam 2006-05-09 13:06:37 Re: Locallhost Windows installation