Search Postgresql Archives

Is it possible to use an EVENT TRIGGER to validate a TRIGGER?

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

 



Hi,

Is it possible to use an EVENT TRIGGER to validate a TRIGGER definition?

What I want is to guarantee that the trigger is fired AFTER a STATEMENT, on INSERT or UPDATE but not on DELETE, like the following example:


CREATE TRIGGER mytrigger
   AFTER INSERT OR UPDATE ON mytable
   FOR EACH STATEMENT
   EXECUTE PROCEDURE myprocedure();

I know I can check those parameters inside the trigger function with TG_OP, TG_WHEN and TG_LEVEL, but in this way, it only checks if the trigger is correct during an insertion, upload or deletion, and not right after the trigger definition.

Best regards,

Luis Lizardo

[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