From: Michael Paesold <mpaesold@gmx.at>
To: Ricardo Javier Aranibar León <ricardo_jal@hotmail.com>
Cc: Postgresql Mailing List <pgsql-sql@postgresql.org>
Subject: Re: reset sequence
Date: Thu, 12 Sep 2002 12:28:50 +0200
Message-ID: <005001c25a47$30700220$4201a8c0@beeblebrox> (raw)
References: <20020912101213.18861.qmail@web40014.mail.yahoo.com>
Ludwig Lim wrote:
> --- Ricardo Javier Aranibar León
> <ricardo_jal@hotmail.com> 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(<text>,<bigint>,<bool>) doesn't exist in
> 7.0.3.
\df setval
in psql should output all possible parameter combinations for setval.
Regards,
Michael Paesold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mpaesold@gmx.at, ricardo_jal@hotmail.com
Subject: Re: reset sequence
In-Reply-To: <005001c25a47$30700220$4201a8c0@beeblebrox>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox