1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Complete merge of all old man page information.

ecpg reference page still needs formatting.
This commit is contained in:
Thomas G. Lockhart
1999-07-22 15:09:15 +00:00
parent 2aa64f79f5
commit a27512e634
81 changed files with 2292 additions and 772 deletions

View File

@@ -1,6 +1,11 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.8 1999/07/22 15:09:08 thomas Exp $
Postgres documentation
-->
<refentry id="SQL-CREATETRIGGER">
<refmeta>
<refentrytitle>
<refentrytitle id="SQL-CREATETRIGGER-TITLE">
CREATE TRIGGER
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
@@ -15,7 +20,7 @@
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-21</date>
<date>1999-07-20</date>
</refsynopsisdivinfo>
<synopsis>
CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER } { <replaceable class="PARAMETER">event</replaceable> [OR ...] }
@@ -101,29 +106,37 @@ CREATE
<title>
Description
</title>
<para>
<command>CREATE TRIGGER</command> will enter a new trigger into the current
data base. The trigger will be associated with the relation
<replaceable class="parameter">relname</replaceable> and will execute
the specified function <replaceable class="parameter">funcname</replaceable>.
</para>
<para>
The trigger can be specified to fire either before the
The trigger can be specified to fire either before BEFORE the
operation is attempted on a tuple (before constraints
are checked and the INSERT, UPDATE or DELETE is attempted) or
after the operation has been attempted (e.g. after constraints
are checked and the INSERT, UPDATE or DELETE has completed). If the
are checked and the <command>INSERT</command>, <command>UPDATE</command> or
<command>DELETE</command> is attempted) or
AFTER the operation has been attempted (e.g. after constraints
are checked and the <command>INSERT</command>,
<command>UPDATE</command> or <command>DELETE</command> has
completed). If the
trigger fires before the event, the trigger may
skip the operation for the current tuple, or change the tuple
being inserted (for INSERT and UPDATE operations only). If
being inserted (for <command>INSERT</command> and
<command>UPDATE</command> operations only). If
the trigger fires after the event, all changes, including the
last insertion, update, or deletion, are "visible" to the trigger.
</para>
<para>
Refer to the chapters on SPI and Triggers in the
<citetitle>PostgreSQL Programmer's Guide</citetitle> for more
<citetitle>PostgreSQL Programmer's Guide</citetitle> for more
information.
</para>
<refsect2 id="R2-SQL-CREATETRIGGER-3">
<refsect2info>
<date>1998-09-21</date>
@@ -133,7 +146,7 @@ CREATE
</title>
<para>
<command>CREATE TRIGGER</command> is a <productname>Postgres</productname>
language extension.
language extension.
</para>
<para>
Only the relation owner may create a trigger on this relation.
@@ -177,8 +190,6 @@ CREATE TRIGGER if_film_exists
<title>
Compatibility
</title>
<para>
</para>
<refsect2 id="R2-SQL-CREATETRIGGER-4">
<refsect2info>
@@ -187,6 +198,7 @@ CREATE TRIGGER if_film_exists
<title>
SQL92
</title>
<para>
There is no <command>CREATE TRIGGER</command> in <acronym>SQL92</acronym>.
</para>
@@ -207,7 +219,7 @@ CREATE TABLE distributors (
</para>
<para>
However, foreign keys are not yet implemented (as of version 6.4) in
However, foreign keys are not yet implemented (as of version 6.5) in
<productname>Postgres</productname>.
</para>
</refsect2>