| От | Gregory Wood |
|---|---|
| Тема | Re: Why pg_dump doesn't dump the foriegn keys? |
| Дата | |
| Msg-id | 006001c09048$9d7046c0$7889ffcc@comstock.com обсуждение исходный текст |
| Ответ на | Why pg_dump doesn't dump the foriegn keys? (Raymond Chui <raymond.chui@noaa.gov>) |
| Список | pgsql-general |
> pg_dump -u -s dbname > db_schema > > I look at that db_schema file, I only see the primary keys but no > foreign keys. > I don't understand what is OID use for. Will -o option dump the foreign > keys for me? I could be wrong, but it sounds like you haven't examined your entire dump file. Check the end of the file, after all your COPYs and underneath your index creations, you *should* see a bunch of "CREATE CONSTRAINT TRIGGER..." etc. Those should be your foreign key checks, followed by any other triggers and whatnot. Try importing your dump file into another db and testing it... you should find that the foreign keys work fine. Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера