Postgres Brain Dump

Reset sequence (eg for primary key serial) back to 1

ALTER SEQUENCE <tablename>_<id>_seq RESTART WITH 1

https://stackoverflow.com/questions/3819292/reset-postgresql-primary-key-to-1