~ubuntu-branches/ubuntu/precise/postgresql-9.1/precise-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/DROP_TRIGGER.7

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: DROP TRIGGER
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "DROP TRIGGER" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
DROP_TRIGGER \- remove a trigger
 
23
.\" DROP TRIGGER
 
24
.SH "SYNOPSIS"
 
25
.sp
 
26
.nf
 
27
DROP TRIGGER [ IF EXISTS ] \fIname\fR ON \fItable\fR [ CASCADE | RESTRICT ]
 
28
.fi
 
29
.SH "DESCRIPTION"
 
30
.PP
 
31
DROP TRIGGER
 
32
removes an existing trigger definition\&. To execute this command, the current user must be the owner of the table for which the trigger is defined\&.
 
33
.SH "PARAMETERS"
 
34
.PP
 
35
IF EXISTS
 
36
.RS 4
 
37
Do not throw an error if the trigger does not exist\&. A notice is issued in this case\&.
 
38
.RE
 
39
.PP
 
40
\fIname\fR
 
41
.RS 4
 
42
The name of the trigger to remove\&.
 
43
.RE
 
44
.PP
 
45
\fItable\fR
 
46
.RS 4
 
47
The name (optionally schema\-qualified) of the table for which the trigger is defined\&.
 
48
.RE
 
49
.PP
 
50
CASCADE
 
51
.RS 4
 
52
Automatically drop objects that depend on the trigger\&.
 
53
.RE
 
54
.PP
 
55
RESTRICT
 
56
.RS 4
 
57
Refuse to drop the trigger if any objects depend on it\&. This is the default\&.
 
58
.RE
 
59
.SH "EXAMPLES"
 
60
.PP
 
61
Destroy the trigger
 
62
if_dist_exists
 
63
on the table
 
64
films:
 
65
.sp
 
66
.if n \{\
 
67
.RS 4
 
68
.\}
 
69
.nf
 
70
DROP TRIGGER if_dist_exists ON films;
 
71
.fi
 
72
.if n \{\
 
73
.RE
 
74
.\}
 
75
.SH "COMPATIBILITY"
 
76
.PP
 
77
The
 
78
DROP TRIGGER
 
79
statement in
 
80
PostgreSQL
 
81
is incompatible with the SQL standard\&. In the SQL standard, trigger names are not local to tables, so the command is simply
 
82
DROP TRIGGER \fIname\fR\&.
 
83
.SH "SEE ALSO"
 
84
CREATE TRIGGER (\fBCREATE_TRIGGER\fR(7))