From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Gerard Krupa" <Gerard(dot)Krupa(at)marconi(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: pg_dump table ordering bug [8.0.1] |
Date: | 2005-02-10 15:29:54 |
Message-ID: | 26902.1108049394@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Gerard Krupa" <Gerard(dot)Krupa(at)marconi(dot)com> writes:
> I've experienced a similar problem with a data-only dump using 8.0.1's
> pg_dump. It seems that the COPYs (or INSERTs) are generated in
> alphabetical order of table name, ignoring foreign key contraints and
> requiring the output to be post-processed. In a full dump of the database
> the constraints are added after the data is inserted so there are no
> problems. See the two attached dumps of the same database as an example.
This is not a bug. In a data-only dump pg_dump cannot hope to know what
FK constraints may be applied to the data at load time --- there's no
particularly good reason to assume they are the same as what was in the
source database. So it's your responsibility to order the loading steps
properly. See pg_restore's -l/-L switches.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Luciano Almeida | 2005-02-10 19:33:42 | BUG #1475: error to install language pltcl |
Previous Message | Tom Lane | 2005-02-10 15:08:14 | Re: BUG #1473: Backend bus error, possibly due to ANALYZE |