Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Shafiq Far: "Just wanted to let you know that I think the SQL Maestro for Postgres is excellent. We've tried a variety over the past few years and none are even close to yours. Well done".
Simon Pills: "Someone finally invented an intuitively used and easily customized PostgreSQL database administration tool! Keep up the good work. I will be in touch. I am able to do this horrendous work because your software enabled me to create a new database with all necessary objects in several minutes! I am sure that I have found what I really need".

More

Add your opinion

PostgreSQL Maestro online Help

Prev Return to chapter overview Next

Create Trigger Wizard

Create Trigger Wizard guides you through the process of creating of a new table trigger.

The basic principles of Create Object Wizards in PostgreSQL Maestro are explained in a separate topic. Below you will find a description of wizard steps that are unique for the current object.

 

To define a new trigger, you need to set its Name, Type (Before, After). This option determines whether the function is called before or after the event.

 

Comment

This field contains a comment to the table trigger.

 

Event

One of Insert, Update, or Delete; this specifies the event that will fire the trigger.

 

For Each (Row, Statement)

This specifies whether the trigger procedure should be fired once for every row affected by the trigger event, or just once per SQL statement.

 

Function

Select the function to be executed when the trigger fires.

 

Note: The trigger function must be defined before the trigger itself can be created. The trigger function must be declared as a function taking no arguments and returning type trigger.

 

Arguments

An optional comma-separated list of arguments to be provided to the function when the trigger is executed. The arguments are literal string constants. Simple names and numeric constants may be entered here too, but all of them will be converted to strings.

 

Note: Please check the description of the implementation language of the trigger function about how the trigger arguments are accessible within the function; it may be different from normal function arguments.

 

 

Condition (PostgreSQL 9.0)

Specify here a Boolean expression that determines whether the trigger function will actually be executed.

 

Fields to update (PostgreSQL 9.0)

Check table columns to set the trigger to fire only when one of the specified columns is updated. If all columns are unchecked, the trigger is fired when any column of the associated table is updated.

 

 

 



Prev Return to chapter overview Next