I took a schema dump using : pg_dump -n schema dbname .
When I restored this , it doesn't contain the constraints and indexes. Cansomeone please help how to take a dump including all