Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E83E04760A2 for ; Thu, 12 Sep 2002 06:27:20 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id B86DA476022 for ; Thu, 12 Sep 2002 06:27:19 -0400 (EDT) Received: (qmail 16335 invoked by uid 0); 12 Sep 2002 10:27:19 -0000 Received: from chello062178186201.1.15.tuwien.teleweb.at (HELO beeblebrox) (62.178.186.201) by mail.gmx.net (mp012-rz3) with SMTP; 12 Sep 2002 10:27:19 -0000 Message-ID: <005001c25a47$30700220$4201a8c0@beeblebrox> From: "Michael Paesold" To: =?iso-8859-1?Q?Ricardo_Javier_Aranibar_Le=F3n?= Cc: "Postgresql Mailing List" References: <20020912101213.18861.qmail@web40014.mail.yahoo.com> Subject: Re: reset sequence Date: Thu, 12 Sep 2002 12:28:50 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/95 X-Sequence-Number: 9372 Ludwig Lim wrote: > --- Ricardo Javier Aranibar León > wrote: > > Hi List, > > > > I need that somebody help me. > > First, I use PostgreSQL 7.0.3 for linux. > > I need reset my sequence but that it begin in 1 > > again when a use nextval. > > And I have been search in > > http://archives.postgresql.org/ about reset > > sequence but I obtain this information: > > SELECT setval('name_sequence', 1, false); > > try SELECT setval('name_sequence',1); That will probably set the current value to 1, which will result in a nextval of 2, which is perhaps not what Ricardo wanted. > Maybe setval(,,) doesn't exist in > 7.0.3. \df setval in psql should output all possible parameter combinations for setval. Regards, Michael Paesold