Re: Truncate on pg_dump / pg_restore - Mailing list pgsql-sql

From Bryce Nesbitt
Subject Re: Truncate on pg_dump / pg_restore
Date
Msg-id 49033A02.4040109@obviously.com
Whole thread Raw
In response to Re: Truncate on pg_dump / pg_restore  ("chris smith" <dmagick@gmail.com>)
Responses Re: Truncate on pg_dump / pg_restore
List pgsql-sql
<br /><br /> chris smith wrote: <blockquote cite="mid:3c1395330810250318r6f4c7e1ao9eac8dd35eed2726@mail.gmail.com"
type="cite"><prewrap="">On Sat, Oct 25, 2008 at 5:32 PM, Bryce Nesbitt <a class="moz-txt-link-rfc2396E"
href="mailto:bryce2@obviously.com"><bryce2@obviously.com></a>wrote: </pre><blockquote type="cite"><pre
wrap="">I'vegot
 
tables with pretty disposable data... meaning I want to drop the data...
but restore empty indexed tables at pg_restore time.   </pre></blockquote><pre wrap="">
Do a schema-only dump.
pg_dump --help says use '-s' or '--schema-only'. </pre></blockquote> Ooops, I was unclear.  I want most of the data! 
Thereare just a few tables that I'd prefer be empty (truncated) in the restored database.  Most of the tables (and
thereare lots) are valuable.<br /><br /> Could I  dump --schema-only, dump full, dump the toc, comment out the tables
fromthe toc, restore the --schema-only, then restore the dump (minus the contents of the unwanted tables)?<br /><br /> 

pgsql-sql by date:

Previous
From: "chris smith"
Date:
Subject: Re: Truncate on pg_dump / pg_restore
Next
From: "Harold A. Giménez Ch."
Date:
Subject: Re: Truncate on pg_dump / pg_restore