Re: pg_dump table ordering bug [8.0.1]
От | Tom Lane |
---|---|
Тема | Re: pg_dump table ordering bug [8.0.1] |
Дата | |
Msg-id | 26902.1108049394@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pg_dump table ordering bug [8.0.1] ("Gerard Krupa" <Gerard.Krupa@marconi.com>) |
Список | pgsql-bugs |
"Gerard Krupa" <Gerard.Krupa@marconi.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
В списке pgsql-bugs по дате отправления: