Hello Jorge,
An even easier way to accomplish this would be to use the following:
ALTER SEQUENCE <sequence_name> RESTART WITH 1;
As shown in the documentation, here:
http://www.postgresql.org/docs/8.3/interactive/sql-altersequence.html
Hope that helps. =)
Sincerely,
Lacey
> How can a serial or bigserial field start from 1 again?
> I need to manually remove all the records from a table and I need
> these kind of fields to start from 1 once again.
>
> With respect,
> Jorge Maldonado
--
Lacey Powers
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 ext 104
PostgreSQL Replication, Consulting, Custom Development, 24x7 support