script for resetting all the sequences in postgresql code example Example: postgresql reset sequence ALTER SEQUENCE <tablename>_<id>_seq RESTART WITH 1