Re: dumping only table definitions

From: Vick Khera <vivek(at)khera(dot)org>
To: "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-30 16:11:47
Message-ID: CALd+dccWM3RFpi5AvciLQ6WtaGSSTZJ8y+h0oQ9QsvLd75iuVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 29, 2018 at 6:39 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> 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.
>

From my experience, this is the right solution.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Clifford Snow 2018-06-30 22:15:44 Re: Convert Existing Table to a Partition Table in PG10
Previous Message Jeff Janes 2018-06-30 00:48:17 Re: About "Cost-based Vacuum Delay"