From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Kevin Brannen <KBrannen@efji.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: dumping only table definitions
Date: Fri, 29 Jun 2018 18:43:28 -0400
Message-ID: <27190.1530312208@sss.pgh.pa.us> (raw)
In-Reply-To: <20180629223949.tdifrvvqejuqyl2i@alvherre.pgsql>
References: <20180629223949.tdifrvvqejuqyl2i@alvherre.pgsql>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2018-Jun-29, Kevin Brannen wrote:
>> I'm trying to figure out how to dump only the table definitions, well those and things they need directly, like sequences & types. What I do NOT want are all the millions (not literally but it feels like it :)) of functions we have. Triggers would be all right if I must, as we only have a few of those.
> Try "pg_dump -Fc" followed by pg_restore -l. You can edit the list
> emitted there, then use it with pg_restore -L.
I think something involving "--tables '*.*'" might work, too.
Be careful about shell-command quoting.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, KBrannen@efji.com
Subject: Re: dumping only table definitions
In-Reply-To: <27190.1530312208@sss.pgh.pa.us>
References: <20180629223949.tdifrvvqejuqyl2i@alvherre.pgsql> <27190.1530312208@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox