Postgresql流水帐(第七天):Trigger
- 创建一个函数
- 创建一个trigger, 将表和函数绑定
ALTER TRIGGER trigger_name ON table_name
RENAME TO new_name;
ALTER TRIGGER last_name_changes ON employees
RENAME TO log_last_name_changes;
ALTER TABLE table_name
DISABLE TRIGGER trigger_name | ALL
You specify the trigger name after the DISABLE TRIGGER clause to disable a particular trigger. To disable all triggers associated with a table, you use ALL instead of a particular trigger name.
DROP TRIGGER [IF EXISTS] trigger_name ON table_name;