Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
От | Dimitri Fontaine |
---|---|
Тема | Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED |
Дата | |
Msg-id | 87fwu29d8d.fsf@hi-media-techno.com обсуждение исходный текст |
Ответ на | Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
|
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > The incremental FK checks are designed on the assumption that the > constraint condition held before; they aren't likely to behave very > sanely if the data is bad. I'd want to see a whole lot more analysis of > the resulting behavior before even considering an idea like this. ALTER TABLE foo DISABLE TRIGGER ALL; I must have missed the point when PostgreSQL stoped providing this foot gun already, so that it's arguable less a surprise to spell the misfeature NOT ENFORCED rather than DISABLE TRIGGER. Seriously, real-world use cases such as Kevin's one seems to warrant that we are able to create a table withouth enforcing the FK. That's horrid, yes, that's needed, too. Maybe some operations would have to be instructed that the constraint ain't trustworthy but just declared to be so by the user? Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
В списке pgsql-hackers по дате отправления: