EXECUTE_TRIGGER

Manually executes the stored procedure attached to a trigger.

Manually executes the stored procedure attached to a trigger. This is generally used for testing the trigger.

To view existing triggers, see STORED_PROC_TRIGGERS.

This is a meta-function. You must call meta-functions in a top-level SELECT statement.

Behavior type

Volatile

Syntax

EXECUTE_TRIGGER ( '[[database.]schema.]trigger' )

Arguments

[database.]schema

Database and schema. The default schema is public. If you specify a database, it must be the current database.

trigger
The trigger to execute.

Privileges

Superuser

Examples

To execute a trigger:

=> SELECT execute_trigger('vmart.management.log_user_actions');

If you leave the database and schema empty, the default is current_database.public:

=> SELECT execute_trigger('revoke_log_privileges');