Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A75D6B5DF67 for ; Tue, 31 May 2011 17:42:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 68678-07 for ; Tue, 31 May 2011 20:42:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) by mail.postgresql.org (Postfix) with SMTP id 2D796B5DD67 for ; Tue, 31 May 2011 17:42:17 -0300 (ADT) Received: from [98.139.212.149] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 31 May 2011 20:42:16 -0000 Received: from [98.139.212.238] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 31 May 2011 20:42:16 -0000 Received: from [127.0.0.1] by omp1047.mail.bf1.yahoo.com with NNFMP; 31 May 2011 20:42:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 529948.96158.bm@omp1047.mail.bf1.yahoo.com Received: (qmail 73060 invoked by uid 60001); 31 May 2011 20:42:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1306874536; bh=jossdcV4AyMnoZGTDFyCtJXCKR/RvORbx4irFvdkfg8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=OKGWTfAazP8dSLiKv63s0cGhExntpZ+wEhath9GIOGWzcsGEd47nGyw1E1FFGFOHpUhDcHN6kPIfbmGXbsgDJflVUjdRQ5ku5GFuLbFSmoBjBFRq/Fy/rZ5ebYS6ZB4Mw/Dr2I07y5PzSh1Yi5qCP4sp6QjQUC8lxR4jxCAWBmQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=oYYu/HrAYrk2DjI9l8qSe/L5XMFlSKiYNTl6yda7ByCUaxqRKgFmEpwApMVDMv5cklXS8fhPW36piHeaMQVGIM9kV6jPLj5gR2SHYpDBkEHq9HMvY+GsX3vuGUR2iBuKcNHvIDPIB61ZI+ui0j8fxw631esqqeH7BR9DKYLbdB0=; Message-ID: <315973.67411.qm@web161517.mail.bf1.yahoo.com> X-YMail-OSG: iKZnc3oVM1mjjJ8dxkiidb3g4rVnJfME6f5TbPctvkKoJfQ tf9RsouMQAbd1KuC6gRExgbHXgISTVf.qJz_33E_Sxo1ERgDSfcUJ._CD9zm qnu.YHH2gPdf3BnCy5uy2zduF4tjBUH2GxC0oCixeCmBBakAxGAhNF2okAo7 xYGUh37BCWd_6V5gq4zjps_lzbXiFXhORYqatzF.uhBYkAn5nTBKxiqywlIX QwT3CrTb0d6kungdPCwFuy4SFU_75th62DAIR9zohxsN1Rih8SXs00gyC7b9 66cIdt6MIhSveQ3pJJkImOIDYgRIcRbG.xFLKh6Iax0LwmtzuP18GWMc58v9 8ZEeVaxZUBoNei0gsRRifFZnNi_se96qCWZbF1BVDIkQA9db.9llL5Pc- Received: from [80.145.183.65] by web161517.mail.bf1.yahoo.com via HTTP; Tue, 31 May 2011 13:42:16 PDT X-Mailer: YahooMailRC/570 YahooMailWebService/0.8.111.304355 Date: Tue, 31 May 2011 13:42:16 -0700 (PDT) From: salah jubeh Subject: PG_RESTORE To: pgsql MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-337927768-1306874536=:67411" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.907 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/988 X-Sequence-Number: 176420 --0-337927768-1306874536=:67411 Content-Type: text/plain; charset=us-ascii 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 --0-337927768-1306874536=:67411 Content-Type: text/html; charset=us-ascii
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
 

 

--0-337927768-1306874536=:67411--