Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A8E7B2E003D for ; Tue, 8 Apr 2008 18:30:11 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77056-04 for ; Tue, 8 Apr 2008 18:30:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id 073662E0033 for ; Tue, 8 Apr 2008 18:30:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m38LU5K0008491; Tue, 8 Apr 2008 17:30:05 -0400 (EDT) To: "Sergio Gabriel Rodriguez" cc: pgsql-admin@postgresql.org Subject: Re: pg_dump/pg_restore In-reply-to: <15aa6b3e0804081252x43fb76c3ue8eed3edbeb940c9@mail.gmail.com> References: <15aa6b3e0804081252x43fb76c3ue8eed3edbeb940c9@mail.gmail.com> Comments: In-reply-to "Sergio Gabriel Rodriguez" message dated "Tue, 08 Apr 2008 16:52:23 -0300" Date: Tue, 08 Apr 2008 17:30:05 -0400 Message-ID: <8490.1207690205@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/84 X-Sequence-Number: 28848 "Sergio Gabriel Rodriguez" writes: > I'm using postgresql 7.4, I have a problem with pg_dump/pg_restore. I > want to back and restore only one schema from my db (I did it), but > when I restore it, postgresql found errors in some views, this ones > needs of others which can't be found because the script will generate > them later. How can I make an orderer sql dump??? Switch to a newer PG version. If memory serves, 8.0 was the first version in which pg_dump paid attention to dependencies rather than just the order of original creation of views. In 7.x it wasn't hard to cause problems by doing CREATE OR REPLACE VIEW. regards, tom lane