Timeline for In a trigger check if one of 24 columns are updated (postgres)
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 23 at 10:44 | comment | added | RkassaTeam Breda | hmm, thanks Jonathan, this i didnot know was possible, but unfortenatly it will not work for me becouse i need to know which column is changed, becouse i have to do differant things for each column. | |
Apr 22 at 15:24 | comment | added | Jonathan Fite | Point of clarification, the "UPDATE OF" syntax only concerns if the column is referenced, not if the value has actually changed. So if you issue an update and set the column to the same value (or use an ORM that does that) then the trigger will fire even if there is no actual change in the value. | |
Apr 22 at 14:05 | comment | added | Sascha Mayr |
@RkassaTeamBreda I understand. You can actually us the OF column_name syntax for multiple columns. I have updated my answer to reflect that, that should work to only create one trigger for 24 columns.
|
|
Apr 22 at 14:04 | history | edited | Sascha Mayr | CC BY-SA 4.0 |
added 63 characters in body
|
Apr 21 at 13:03 | comment | added | RkassaTeam Breda | Thanks Sascha, as i wrote in my message, i can create triggers, i know how to do that, the problem is i dont want to have 24 times IF statements in the trigger, or to create 24 triggers for each column. I am looking some way to minimise this. | |
Apr 19 at 23:27 | history | edited | tinlyx | CC BY-SA 4.0 |
improved formatting
|
S Apr 19 at 15:39 | review | First answers | |||
Apr 19 at 23:27 | |||||
S Apr 19 at 15:39 | history | answered | Sascha Mayr | CC BY-SA 4.0 |