Re: 7.1 bug fix question
От | Tom Lane |
---|---|
Тема | Re: 7.1 bug fix question |
Дата | |
Msg-id | 21681.987700263@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | 7.1 bug fix question (Steve Wampler <swampler@noao.edu>) |
Список | pgsql-general |
Steve Wampler <swampler@noao.edu> writes: > Well, it looks like I got bit by this after all. Can someone show > me a rule to attach to a view ("attributes") to invoke a trigger function > (insert_or_update)? > The trigger function maps the update into either an insert or an update > on the underlying table ("attributes_table") depending on whether the row > already exists or not. > This was working under 7.0.3 (naturally, since insert/update/delete were > allowed on views without explicit rules). You had a trigger on update attached to a view? It should never have fired, unless you were allowing tuples to be inserted into the view's hidden table, which seems pretty wasteful. But if that's what you want to do, you could emulate this pre-7.1 behavior by using a rule to redirect inserts/updates on the view to some dummy table that you put triggers on. The dummy table would take the place of the view's hidden table, which no longer exists in 7.1. regards, tom lane
В списке pgsql-general по дате отправления: