Re: postgres 9.0.4, pg_restore and indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: postgres 9.0.4, pg_restore and indexes
Date: 2011-10-25 01:10:44
Message-ID: 10444.1319505044@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greg Williamson <gwilliamson39(at)yahoo(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Krishnamurthy Radhakrishnan 2011-10-25 03:01:46 Re: Dumping data using pg_dump after chrooting to a different partition
Previous Message Greg Williamson 2011-10-25 00:41:07 Re: postgres 9.0.4, pg_restore and indexes