Re: dumping only table definitions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Kevin Brannen <KBrannen(at)efji(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: dumping only table definitions
Date: 2018-06-29 22:43:28
Message-ID: 27190.1530312208@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2018-06-29 22:44:25 Re: dumping only table definitions
Previous Message Alvaro Herrera 2018-06-29 22:39:49 Re: dumping only table definitions