Search Postgresql Archives

trigger update delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to write a trigger function that will do something when either a
row had been deleted or a field has been updated to null.

The problem I am having is determining in the function if this is a delete
or not. I would like to say:
if this is delete trigger or new.field1 is null then
    ...
end if

new.field1 dies when it is a delete trigger, as it is supposed to. But I
need the function to know the difference.

Any thoughts?



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux