Re: Disable and enable of table and column constraints
От | Christopher Browne |
---|---|
Тема | Re: Disable and enable of table and column constraints |
Дата | |
Msg-id | 87skewcgtm.fsf@dba2.int.libertyrms.com обсуждение исходный текст |
Ответ на | Disable and enable of table and column constraints (Michael Gould <mgould@intermodalsoftwaresolutions.net>) |
Ответы |
Re: Disable and enable of table and column constraints
|
Список | pgsql-hackers |
peter_e@gmx.net (Peter Eisentraut) writes: > On Tue, 2009-09-08 at 16:07 -0400, Alvaro Herrera wrote: >> Tom Lane wrote: >> > Michael Gould <mgould@intermodalsoftwaresolutions.net> writes: >> > > It would be nice if we could enable and disable column and table >> > > constraints. I believe that you can do this in Oracle but this is very >> > > handy for testing stored procedures and other external processes. >> > >> > Drop the constraint and re-add it later... >> >> That's not very useful when adding it later means grabbing an exclusive >> lock on the table for the whole duration of the full table scan required >> to check the table. > > It's also useful to define foreign keys for documentation purposes but > not enforce them for some reason. With the ALTER TABLE DISABLE TRIGGER functionality added in 8.3, we already have the ability to do this with foreign key constraints. That suggests a place for syntax to come from, I'd expect. -- let name="cbbrowne" and tld="ca.afilias.info" in name ^ "@" ^ tld;; Christopher Browne "Bother," said Pooh, "Eeyore, ready two photon torpedoes and lock phasers on the Heffalump, Piglet, meet me in transporter room three"
В списке pgsql-hackers по дате отправления: