drop_trigger 中文man頁面
NAME
DROP TRIGGER - 刪除一個觸發(fā)器定義
SYNOPSIS
DROP TRIGGER name ON table [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP TRIGGER 將刪除所有對一個現(xiàn)存觸發(fā)器的引用。 要執(zhí)行這個命令,當(dāng)前用戶必須是觸發(fā)器的所有者。
PARAMETERS 參數(shù)
- name
要刪除的觸發(fā)器名。- table
觸發(fā)器定義所在的表的名稱(可以有模式修飾)。- CASCADE
自動刪除依賴此觸發(fā)器的對象。- RESTRICT
如果有任何依賴對象存在,那么拒絕刪除。這個是缺省。
EXAMPLES 例子
刪除表films的if_dist_exists觸發(fā)器:
DROP TRIGGER if_dist_exists ON films;
COMPATIBILITY 兼容性
PostgreSQL 里的 DROP TRIGGER 語句和 SQL 標(biāo)準(zhǔn)不兼容。在 SQL 標(biāo)準(zhǔn)里,觸發(fā)器名字不是表所局部擁有的,所以命令只是簡單的 DROP TRIGGER name。
SEE ALSO 參見
CREATE TRIGGER [create_trigger(7)]
#p#
NAME
DROP TRIGGER - remove a trigger
SYNOPSIS
DROP TRIGGER name ON table [ CASCADE | RESTRICT ]
DESCRIPTION
DROP TRIGGER will remove an existing trigger definition. To execute this command, the current user must be the owner of the table for which the trigger is defined.
PARAMETERS
- name
- The name of the trigger to remove.
- table
- The name (optionally schema-qualified) of a table for which the trigger is defined.
- CASCADE
- Automatically drop objects that depend on the trigger.
- RESTRICT
- Refuse to drop the trigger if any objects depend on it. This is the default.
EXAMPLES
Destroy the trigger if_dist_exists on the table films:
DROP TRIGGER if_dist_exists ON films;
COMPATIBILITY
The DROP TRIGGER statement in PostgreSQL is incompatible with the SQL standard. In the SQL standard, trigger names are not local to tables, so the command is simply DROP TRIGGER name.
SEE ALSO
CREATE TRIGGER [create_trigger(7)]