Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 5CAE89FA4AF for ; Tue, 28 Aug 2007 17:32:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 95601-02 for ; Tue, 28 Aug 2007 17:32:41 -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 postgresql.org (Postfix) with ESMTP id D0F5F9FA484 for ; Tue, 28 Aug 2007 17:32:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l7SKWd9N002811; Tue, 28 Aug 2007 16:32:39 -0400 (EDT) To: KL cc: pgsql-admin@postgresql.org Subject: Re: pg_dump object dump-order In-reply-to: <46D44897.10409@gmx.net> References: <46D44897.10409@gmx.net> Comments: In-reply-to KL message dated "Tue, 28 Aug 2007 18:08:55 +0200" Date: Tue, 28 Aug 2007 16:32:39 -0400 Message-ID: <2810.1188333159@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/364 X-Sequence-Number: 26695 KL writes: > pg_dump seems to dump objects strictly alphabetically, No, it doesn't ... at least not if you are running 8.0 or later. It looks at dependencies to see what has to be dumped first. (It does prefer alpha order when there's no dependency constraint.) There are various situations where there might not be a dependency entry, but without knowing more about the history of the table and exactly which version you're running, it's hard to speculate about why or what's the best fix. I will point out, however, that the given script does not in fact fail to load in any Postgres version known to me. Maybe you should post your real problem instead of an oversimplified example. regards, tom lane