Re: pg_restore and create FK without verification check
От | Robert Treat |
---|---|
Тема | Re: pg_restore and create FK without verification check |
Дата | |
Msg-id | 1069878767.24916.18.camel@camel обсуждение исходный текст |
Ответ на | Re: pg_restore and create FK without verification check (Andreas Pflug <pgadmin@pse-consulting.de>) |
Список | pgsql-hackers |
On Wed, 2003-11-26 at 12:43, Andreas Pflug wrote: > Greg Stark wrote: > > >If I could disable and reenable the constraint the danger that I would get the > >definition wrong would be eliminated. And if I had already done the work to > >ensure there were no broken relationships I would optionally be able to skip > >the redundant automatic check. I could even have done the verification myself > >while the data wasn't live for example. > > > > > > Since FKs are implemented as trigger, you could disable all triggers on > the table right now, no? Could be a bit more comfortable, I agree, and > hope for an upcoming DISABLE TRIGGER command. ISTM I've done this before... from a pg_dump -Fc backup first do a pg_dump -s restore (schema only) and then a pg_dump -a --disable-triggers to load the data without check foreign keys. Theres certainly potential for trouble with this method I suppose but it seems like it accomplish what the original poster requires... Robert Treat -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
В списке pgsql-hackers по дате отправления: