From: salah jubeh <s_jubeh@yahoo.com>
To: pgsql <pgsql-general@postgresql.org>
Subject: PG_RESTORE
Date: Tue, 31 May 2011 13:42:16 -0700 (PDT)
Message-ID: <315973.67411.qm@web161517.mail.bf1.yahoo.com> (raw)
Hello,
I hope that I am not wasting your time, I tried to restore a part of a database
and I faced couple of obstacles. First of all, I tried to restore a certain set
of schemas without restoring a certain relations. I wanted to do that in order
to create some automated dummy data for testing. There is no option in
pg_restore to do that so I started to restore it using the -n and -t options.
There are two things, here
1. When I tried to restore a table which has a dependency I get errors, I think
pg_restore can be improved here by having an option to restore the dependencies
if they are not existed.
2. when I resetored a table in a certain schema which has a dependency on
another table in the public schema, pg restore was not able to find this table
(the one in the public schema) and I get an error.
i.e pg_restore ..... -n schema1 -t table1 ...
error tablex does not exist... (I do not remember the exact format and message)
My question, is there is an easier way to do that, - I will have a look on
pg_dump to see if I can achieve this task by combining both tools. Also, I am
wondering if I am doing something wrong here.
Thanks in advance
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: s_jubeh@yahoo.com
Subject: Re: PG_RESTORE
In-Reply-To: <315973.67411.qm@web161517.mail.bf1.yahoo.com>
References: <315973.67411.qm@web161517.mail.bf1.yahoo.com>
* 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