Re: Why pg_dump doesn't dump the foriegn keys?

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: James Thompson
Дата:
Сообщение: Re: GUI Clients for PostgreSQL
Следующее
От: Einar Karttunen
Дата:
Сообщение: Re: Re: Foreign Keys