reinitialise serial counter - Mailing list pgsql-sql

From Indraneel Majumdar
Subject reinitialise serial counter
Date
Msg-id Pine.SGI.3.96.1001107132740.1055197A-100000@www.cdfd.org.in
Whole thread Raw
Responses RE: reinitialise serial counter
List pgsql-sql
Hi,

I have a table

create table test (id serial, name text);

after inserting values and doing delete from test if I try to insert
values again, the id starts from where it left off previously. How can I
get the serial counter to restart from 1 ? is it anything to do with
setval(). How to use the setval?

thanks,
Indraneel

/************************************************************************.
# Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics,                         #
# Hyderabad, India - 500076                                              #
`************************************************************************/



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: UNION in views
Next
From: "Edmar Wiggers"
Date:
Subject: RE: reinitialise serial counter