File: create_trigger.l.html

package info (click to toggle)
mpsql 2.0-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,912 kB
  • ctags: 5,665
  • sloc: ansic: 34,322; makefile: 3,525; sh: 17
file content (60 lines) | stat: -rw-r--r-- 2,424 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- manual page source format generated by PolyglotMan v3.0.4, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->

<HTML>
<HEAD>
<TITLE>"CREATE(TRIGGER") manual page</TITLE>
</HEAD>
<BODY>
<A HREF="sql.html">SQL Reference Contents</A>
 
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
create trigger - create a new trigger  
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS </A></H2>
<B>create trigger </B> trigname 
<B>{before|after} </B>  <BR>
 <tt> </tt><tt> </tt><B>{Event1 [OR Event2 [OR Event3]]}<B> </B></B><BR>
 <tt> </tt><tt> </tt><B>on </B> relname <B>for each 
{row|statement} </B> <BR>
 <tt> </tt><tt> </tt><B>execute procedure </B> funcname <B>( </B> arguments <B>) </B> <BR>
 <P>
 where <B>EventX 
</B> is one of INSERT, DELETE, UPDATE <BR>
  
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION </A></H2>
<B>Create Trigger</B> will enter 
a new trigger into the current data base.  The trigger will be associated 
with the relation <I>relname</I> and will execute the specified <I>funcname</I>. <P>
 Only 
relation owner may create a trigger on this relation. <P>
 Currently, STATEMENT 
triggers are not implemented. <P>
The trigger can be specified to fire either 
<B>before</B> the operation is attempted on a tuple (e.g. before constraints are 
checked and the insert/update/delete is attempted) or <B>after</B> the operation 
has been attempted (e.g. after constraints are checked and the insert/update/delete 
has completed). If the trigger fires <B>before</B> then the trigger may skip the 
operation for the current tuple,  or change tuple being inserted (for 
insert/update operations only). If the trigger fires <B>after</B> then all changes 
including the last insertion/updation/deletion are "visible" to trigger. 
<P>
 <P>
Refer to the SPI and trigger programming guides for more information. 
 
<H2><A NAME="sect3" HREF="#toc3">EXAMPLES </A></H2>
Examples are included in the contrib area of the source distribution. 
 
<H2><A NAME="sect4" HREF="#toc4">SEE ALSO </A></H2>
drop <A HREF="trigger.l.html">trigger(l)</A>
. <P>

<HR><P>
<A NAME="toc"><B>Table of Contents</B></A><P>
<UL>
<LI><A NAME="toc0" HREF="#sect0">NAME</A></LI>
<LI><A NAME="toc1" HREF="#sect1">SYNOPSIS</A></LI>
<LI><A NAME="toc2" HREF="#sect2">DESCRIPTION</A></LI>
<LI><A NAME="toc3" HREF="#sect3">EXAMPLES</A></LI>
<LI><A NAME="toc4" HREF="#sect4">SEE ALSO</A></LI>
</UL>
</BODY></HTML>