Re: truncate all tables?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Zlatko Matić <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: truncate all tables?
Date: 2005-06-29 10:04:57
Message-ID: 42C27249.10800@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zlatko Matić wrote:
> How could I truncate, delete all content of all tables in one step ?

Something like this?

pg_dump --schema-only mydb > mydb.schema.dump
dropdb mydb
psql -f mydb.schema.dump mydb

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Enrico Weigelt 2005-06-29 11:09:12 Re: rule as on insert to view with multiple fk referencing the same table
Previous Message Michael Glaesemann 2005-06-29 09:57:47 Re: truncate all tables?