pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Williamson <gwilliamson39@yahoo.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgres 9.0.4, pg_restore and indexes
Date: Mon, 24 Oct 2011 21:10:44 -0400
Message-ID: <10444.1319505044@sss.pgh.pa.us> (raw)
In-Reply-To: <1319503267.66489.YahooMailNeo@web46110.mail.sp1.yahoo.com>
References: <1319493368.35732.YahooMailNeo@web46108.mail.sp1.yahoo.com>
	<CALnrrJQiBwb4ym1DBASzQR2pbdPnYueJmQWwOXSweKhpa-cYxA@mail.gmail.com>
	<1319503267.66489.YahooMailNeo@web46110.mail.sp1.yahoo.com>

Greg Williamson <gwilliamson39@yahoo.com> writes:
> What I am I missing ? Or is pg_restore just not capable of restoring the full definition of a table ?

There isn't any provision for doing that automatically; it would be a
bit tough to determine exactly what the "full definition" consists of
in a way that makes everybody happy.  (For instance, how about tables
that are targets of foreign key references?  Functions that are depended
on by check constraints or indexes?  And so on.)

What you can do is use the --list option to get a list of all the
objects in the dump, edit that down to what you want, then use the
--use-list option to restore the stuff in your abbreviated list.

			regards, tom lane



view thread (4+ messages)

Message-ID: <10444.1319505044@sss.pgh.pa.us>
Permalink:  ../10444.1319505044@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10444.1319505044@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gwilliamson39@yahoo.com
  Subject: Re: postgres 9.0.4, pg_restore and indexes
  In-Reply-To: <10444.1319505044@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