Re: Truncate on pg_dump / pg_restore
От | Bryce Nesbitt |
---|---|
Тема | Re: Truncate on pg_dump / pg_restore |
Дата | |
Msg-id | 49033A02.4040109@obviously.com обсуждение исходный текст |
Ответ на | Re: Truncate on pg_dump / pg_restore ("chris smith" <dmagick@gmail.com>) |
Ответы |
Re: Truncate on pg_dump / pg_restore
|
Список | 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 по дате отправления: