Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
769159fd
Commit
769159fd
authored
Jul 08, 2016
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: minor improvements for documentation about plpgsql triggers.
Fabien Coelho, some further wordsmithing by me
parent
8ba4ccda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
doc/src/sgml/plpgsql.sgml
doc/src/sgml/plpgsql.sgml
+21
-11
No files found.
doc/src/sgml/plpgsql.sgml
View file @
769159fd
...
...
@@ -3660,17 +3660,26 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl
<secondary>in PL/pgSQL</secondary>
</indexterm>
<para>
<application>PL/pgSQL</application> can be used to define trigger
procedures on data changes or database events.
A trigger procedure is created with the <command>CREATE FUNCTION</>
command, declaring it as a function with no arguments and a return type of
<type>trigger</> (for data change triggers) or
<type>event_trigger</> (for database event triggers).
Special local variables named <varname>PG_<replaceable>something</></> are
automatically defined to describe the condition that triggered the call.
</para>
<sect2 id="plpgsql-dml-trigger">
<title>Triggers on Data Changes</title>
<para>
<application>PL/pgSQL</application> can be used to define trigger
procedures. A trigger procedure is created with the
<command>CREATE FUNCTION</> command, declaring it as a function with
no arguments and a return type of <type>trigger</type>. Note that
the function must be declared with no arguments even if it expects
to receive arguments specified in <command>CREATE TRIGGER</> —
trigger arguments are passed via <varname>TG_ARGV</>, as described
A <link linkend="triggers">data change trigger</> is declared as a
function with no arguments and a return type of <type>trigger</>.
Note that the function must be declared with no arguments even if it
expects to receive some arguments specified in <command>CREATE TRIGGER</>
— such arguments are passed via <varname>TG_ARGV</>, as described
below.
</para>
...
...
@@ -4218,8 +4227,9 @@ SELECT * FROM sales_summary_bytime;
<title>Triggers on Events</title>
<para>
<application>PL/pgSQL</application> can be used to define event
triggers. <productname>PostgreSQL</> requires that a procedure that
<application>PL/pgSQL</application> can be used to define
<link linkend="event-triggers">event triggers</>.
<productname>PostgreSQL</> requires that a procedure that
is to be called as an event trigger must be declared as a function with
no arguments and a return type of <literal>event_trigger</>.
</para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment