Re: [HACKERS] pg_restore failed for foreign key constraint
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [HACKERS] pg_restore failed for foreign key constraint |
| Дата | |
| Msg-id | 21358.1500300213@sss.pgh.pa.us обсуждение |
| Ответ на | [HACKERS] pg_restore failed for foreign key constraint (Neha Sharma <neha.sharma@enterprisedb.com>) |
| Список | pgsql-hackers |
Neha Sharma <neha.sharma@enterprisedb.com> writes:
> I am getting the below error while restoring data having foreign key
> constraint.
> [edb@localhost bin]$ ./createdb test1
> [edb@localhost bin]$ ./pg_restore -d test1 -c -e a.dump
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 2903; 2606 16399 FK
> CONSTRAINT test_tbl test_tbl_fk_c1 edb
> pg_restore: [archiver (db)] could not execute query: ERROR: schema "test"
> does not exist
> Command was: ALTER TABLE ONLY test.test_tbl DROP CONSTRAINT
> test_tbl_fk_c1;
> Is this an expected behaviour?
Yes, it is. Either don't use -c (it's entirely useless when restoring
into an empty database), or specify --if-exists, or ignore the errors.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера