Re: truncate all tables?

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: truncate all tables?
Date: 2005-06-29 12:02:17
Message-ID: 08568E80-0A88-4EB8-A83C-307DADB1402F@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jun 29, 2005, at 7:04 PM, Richard Huxton wrote:

> 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

That's nice!

Michael Glaesemann
grzm myrealbox com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2005-06-29 12:39:00 Re: Advice on merging two primary keys...
Previous Message Enrico Weigelt 2005-06-29 11:56:04 faking writable views as tables