Re: Proposal: More flexible backup/restore via pg_dump

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Proposal: More flexible backup/restore via pg_dump
Дата
Msg-id Pine.BSF.4.10.10006271244500.40658-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Proposal: More flexible backup/restore via pg_dump  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
On Tue, 27 Jun 2000, Philip Warner wrote:

> But the problem is the constraints: AFAIK there is no 'ALTER TABLE ADD
> CONSTRAINT...' so PK, FK, Not Null constraints have to be applied before
> data load (*please* tell me I'm wrong). This also means that for large
> databases, I should apply indexes to make PK/FK checks fast, but they will
> slow data load.

Actually, there is an ALTER TABLE ADD CONSTRAINT for foreign key
constraints.  Of course, if the existing data fails the constraint the
constraint doesn't get made. and if you're in a transaction, it'll force
a rollback.
In fact, you really can't always apply foreign key constraints at
schema reload time because you can have tables with circular
dependencies.  Those would have to be created after data load.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Trigger question
Следующее
От: "Scott Winterstein"
Дата:
Сообщение: database into website