trigger fired on changes in specific column
От | Dennis Bjorklund |
---|---|
Тема | trigger fired on changes in specific column |
Дата | |
Msg-id | Pine.LNX.4.44.0208230807340.7722-100000@zigo.dhs.org обсуждение исходный текст |
Ответы |
Re: trigger fired on changes in specific column
Re: trigger fired on changes in specific column |
Список | pgsql-general |
I would like to fire a trigger when the value in a single column have changed. I read somewhere that this is in the SQL-standard but not in postgresql, I don't have the SQL-spec so I can't check, and I don't know what version of the standard. I can't find it in the todo list though, either it's missing and should be added or it's not there by intention. I have a table where the rows are partitioned into small groups. When a value in column A changes, then every value in the same group would have their column B value updated. This would in turn trigger more things, If the trigger is fired only when column A changes the problem is solved. After this I need to do almost the same procedure where a value of column B is changed to update the column C for all rules in the group. This ordering of triggers would work automatically if they fire just when the correct column are updated. Well, I can work around these things. One way is to place B and C in their own tables so updating these don't trigger anything in the original table. I also think I can keep them in the relation by being carefull and not update unless the value actually changed, this costs a litle extra CPU time. If i'm lucky it's even fixed in 7.3 and then I can live without it for a while. -- /Dennis
В списке pgsql-general по дате отправления: