# Get all sequences SELECT c.relname FROM pg_class c WHERE c.relkind = 'S'; # Get last value of a sequence SELECT last_value FROM test_id_seq;
alter sequence your_sequence restart with 1000;