Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?)
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?) |
| Дата | |
| Msg-id | 17696.1108177083@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | pg_dump dumping data in order? (used to in 7.4 but not now in 8?) (Miles Keaton <mileskeaton@gmail.com>) |
| Ответы |
Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?)
|
| Список | pgsql-general |
Miles Keaton <mileskeaton@gmail.com> writes:
> When I do a pg_dump, (--data-only), PG7 used to dump the data out in
> order, so that all foreign-key checks worked correctly when loading
> the data back in.
If it did so, it was by pure luck.
In general it is not possible for pg_dump to guarantee this works;
consider circular FK constraints, or FK constraints added since the
dump occurred. In view of that, pg_dump has never tried to ensure
that data-only dumps are in a "valid" order at all. The usual
approach is to use --disable-triggers to short-circuit the FK
constraints during the load.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера