postgresql truncate tables

if you need to truncate tables and want to reset the autoincrement counter use this command
TRUNCATE TABLE someTable RESTART IDENTITY;
if you want to delete connected tables (e.g. via foreign key)
TRUNCATE TABLE someTable CASCASE;

of course this commands can be used sequenced.