Re: pg_dump and ALTER TABLE / ADD FOREIGN KEY
От | Christopher Kings-Lynne |
---|---|
Тема | Re: pg_dump and ALTER TABLE / ADD FOREIGN KEY |
Дата | |
Msg-id | 004b01c21a76$2f162a00$0200a8c0@SOL обсуждение исходный текст |
Ответ на | pg_dump and ALTER TABLE / ADD FOREIGN KEY ("Rod Taylor" <rbt@zort.ca>) |
Ответы |
Re: pg_dump and ALTER TABLE / ADD FOREIGN KEY
|
Список | pgsql-hackers |
> 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. Well, at the moment remember taht all that other SET CONSTRAINTS commands only affect foreign keys. However, this is a TODO to allow deferrable unique constraints. > Or would the below be more appropriate?: > ALTER TABLE tab ADD FOREIGN KEY .... TRUST EXISTING DATA; Maybe instead of TRUST EXISTING DATA, it could be just be WITHOUT CHECK or something that uses existing keywords? Either way, it must be a superuser-only command. I'm kinda beginning to favour the latter now actually... Except if we could make all constraints uncheckable, then restoring a dump would be really fast (but risky!) Chris
В списке pgsql-hackers по дате отправления: