pg_dump and ALTER TABLE / ADD FOREIGN KEY

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема pg_dump and ALTER TABLE / ADD FOREIGN KEY
Дата
Msg-id 06ce01c21a07$87fa0d40$fe01a8c0@jester
обсуждение исходный текст
Ответы Re: pg_dump and ALTER TABLE / ADD FOREIGN KEY
Список pgsql-hackers
With the pg_depend / pg_constraint implementation foreign keys are
applied to dumps via alter table / add foreign key (retains inter
table dependencies).

Some have expressed that this could be quite slow for large databases,
and want a type of:

SET CONSTRAINTS UNCHECKED;

However, others don't believe constraints other than foreign keys
should go unchecked.

That said, is this functionality wanted outside of pg_dump /
pg_restore?

Or would the below be more appropriate?:
ALTER TABLE tab ADD FOREIGN KEY .... TRUST EXISTING DATA;

That is, it will not check pre-existing data to ensure it's proper.
The assumption being that pg_dump came from an already consistent
database.  Needs better wording.

--
Rod



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

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Следующее
От: "Robert Kernell"
Дата:
Сообщение: computer for todo list