Postgresql流水帐(第七天):Trigger

  1. 创建一个函数
  2. 创建一个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;

posted @ 2016-04-24 11:47  songlihong  阅读(157)  评论(0编辑  收藏  举报