Re: Tables cannot have INSTEAD OF triggers
От | Dean Rasheed |
---|---|
Тема | Re: Tables cannot have INSTEAD OF triggers |
Дата | |
Msg-id | CAEZATCUc5h2H9bVaX2KvCm28WMXckVi=O3+qmhqPt2vGW4vOCw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Tables cannot have INSTEAD OF triggers (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Tables cannot have INSTEAD OF triggers
|
Список | pgsql-hackers |
On 1 April 2015 at 18:37, Andres Freund <andres@anarazel.de> wrote: > On 2015-04-01 13:29:33 -0400, Tom Lane wrote: >> As for partitioning, you could do this: >> >> create table parent(...); >> create table child(...) inherits(parent); -- repeat as needed >> create view v as select * from parent; >> attach INSTEAD OF triggers to v >> >> Now the application deals only with v, and thinks that's the real >> table. > > Sure, but that's just making things unnecessarily hard. That then > requires also defining UPDATE/DELETE INSTEAD triggers which otherwise > would just work. > No, because as defined above the view v would be auto-updatable, so updates and deletes on v would just do the matching update/delete on parent. Regards, Dean
В списке pgsql-hackers по дате отправления: