Timeline for how to run trigger on table on postgresql except one column
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 28, 2022 at 4:41 | history | edited | Laurenz Albe | CC BY-SA 4.0 |
added 556 characters in body
|
Oct 28, 2022 at 1:35 | comment | added | Fire | and, yes, it could be used by stating the columns 1 by 1 on the create trigger, and getting from the script, but again, if there's an addition of columns, then the create trigger would have to be recreated. What I was wondering if there's an easy syntax to help making an exception of E. lets say like : "IF NEW(Except E)<>OLD (Except E) Then" ? | |
Oct 28, 2022 at 1:28 | comment | added | Fire | sorry, the code was actually for Insert, Update , and Delete. but I just updated it so that it would only for update trigger to avoid confusion. now onto the problem is that the trigger should run for all columns except E, so I'm wondering if there's a shortcut for that, because stating the columns 1 by 1 seems to not efficient as only E is different | |
Oct 26, 2022 at 15:54 | history | answered | Laurenz Albe | CC BY-SA 4.0 |