<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
chris smith wrote:
<blockquote
cite="mid:3c1395330810250318r6f4c7e1ao9eac8dd35eed2726(at)mail(dot)gmail(dot)com"
type="cite">
<pre wrap="">On Sat, Oct 25, 2008 at 5:32 PM, Bryce Nesbitt <a class="moz-txt-link-rfc2396E" href="mailto:bryce2(at)obviously(dot)com"><bryce2(at)obviously(dot)com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I've got
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! There are just a few
tables that I'd prefer be empty (truncated) in the restored database.
Most of the tables (and there are lots) are valuable.<br>
<br>
Could I dump --schema-only, dump full, dump the toc, comment out the
tables from the toc, restore the --schema-only, then restore the dump
(minus the contents of the unwanted tables)?<br>
<br>
</body>
</html>