Re: postgres 9.0.4, pg_restore and indexes - Mailing list pgsql-admin

From Tom Lane
Subject Re: postgres 9.0.4, pg_restore and indexes
Date
Msg-id 10444.1319505044@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres 9.0.4, pg_restore and indexes  (Greg Williamson <gwilliamson39@yahoo.com>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Greg Williamson
Date:
Subject: Re: postgres 9.0.4, pg_restore and indexes
Next
From: Krishnamurthy Radhakrishnan
Date:
Subject: Re: Dumping data using pg_dump after chrooting to a different partition