evt_trig_v1_changes.patch
application/octet-stream
Filename: evt_trig_v1_changes.patch
Type: application/octet-stream
Part: 0
Message:
Re: Event Triggers reduced, v1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| doc/src/sgml/plperl.sgml | 2 | 2 |
| doc/src/sgml/plpgsql.sgml | 3 | 3 |
| doc/src/sgml/plpython.sgml | 2 | 2 |
| doc/src/sgml/pltcl.sgml | 4 | 4 |
| doc/src/sgml/ref/alter_event_trigger.sgml | 2 | 4 |
| doc/src/sgml/ref/create_event_trigger.sgml | 10 | 9 |
| doc/src/sgml/ref/drop_event_trigger.sgml | 2 | 2 |
| doc/src/sgml/trigger.sgml | 2 | 2 |
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index 920981e..d868889 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -1229,7 +1229,7 @@ CREATE TRIGGER test_valid_id_trig
<para>
Event trigger procedures can be written in PL/Perl.
- <productname>PostgreSQL</productname> requires that a procedure that is to be called
+ <productname>PostgreSQL</productname> requires that a procedure to be called
as a trigger must be declared as a function with no arguments
and a return type of <literal>command_trigger</>.
</para>
@@ -1272,7 +1272,7 @@ CREATE TRIGGER test_valid_id_trig
<term><varname>$_TD->{objectname}</varname></term>
<listitem>
<para>
- The name of the objectthat caused the trigger procedure
+ The name of the object that caused the trigger procedure
to be invoked.
</para>
</listitem>
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index b71786e..102dfff 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3940,7 +3940,7 @@ SELECT * FROM sales_summary_bytime;
</para>
<para>
- When a <application>PL/pgSQL</application> function is called as a
+ When a <application>PL/pgSQL</application> function is called as an
event trigger, several special variables are created automatically
in the top-level block. They are:
@@ -3981,7 +3981,7 @@ SELECT * FROM sales_summary_bytime;
<listitem>
<para>
Data type <type>name</type>; the name of the schema of the object
- that caused the trigger invocation. Can be <literal>NULL</literal>
+ that caused the trigger invocation. This is <literal>NULL</literal>
for objects not located in a schema.
</para>
</listitem>
@@ -4004,7 +4004,7 @@ SELECT * FROM sales_summary_bytime;
</para>
<para>
- <xref linkend="plpgsql-event-trigger-example"> shows an example of a
+ <xref linkend="plpgsql-event-trigger-example"> shows an example of an
event trigger procedure in <application>PL/pgSQL</application>.
</para>
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml
index 07f017a..d62da16 100644
--- a/doc/src/sgml/plpython.sgml
+++ b/doc/src/sgml/plpython.sgml
@@ -881,7 +881,7 @@ $$ LANGUAGE plpythonu;
<para>
Event trigger procedures can be written in PL/Python.
- <productname>PostgreSQL</productname> requires that a procedure that is to be called
+ <productname>PostgreSQL</productname> requires that a procedure to be called
as a trigger must be declared as a function with no arguments
and a return type of <literal>event_trigger</>.
</para>
@@ -924,7 +924,7 @@ $$ LANGUAGE plpythonu;
<term><varname>TD["objectname"]</varname></term>
<listitem>
<para>
- The name of the objectthat caused the trigger procedure
+ The name of the object that caused the trigger procedure
to be invoked.
</para>
</listitem>
diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml
index c9a4e4c..1975976 100644
--- a/doc/src/sgml/pltcl.sgml
+++ b/doc/src/sgml/pltcl.sgml
@@ -527,7 +527,7 @@ SELECT 'doesn''t' AS ret
<para>
Trigger procedures can be written in PL/Tcl.
- <productname>PostgreSQL</productname> requires that a procedure that is to be called
+ <productname>PostgreSQL</productname> requires that a procedure to be called
as a trigger must be declared as a function with no arguments
and a return type of <literal>trigger</>.
</para>
@@ -725,8 +725,8 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab
<para>
Event trigger procedures can be written in PL/Tcl.
- <productname>PostgreSQL</productname> requires that a procedure that is to be called
- as a trigger must be declared as a function with no arguments
+ <productname>PostgreSQL</productname> requires that a procedure 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>
@@ -768,7 +768,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab
<term><varname>$TG_objectname</varname></term>
<listitem>
<para>
- The name of the objectthat caused the trigger procedure
+ The name of the object that caused the trigger procedure
to be invoked.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/alter_event_trigger.sgml b/doc/src/sgml/ref/alter_event_trigger.sgml
index b21ce75..74882e4 100644
--- a/doc/src/sgml/ref/alter_event_trigger.sgml
+++ b/doc/src/sgml/ref/alter_event_trigger.sgml
@@ -12,7 +12,7 @@ PostgreSQL documentation
<refnamediv>
<refname>ALTER EVENT TRIGGER</refname>
- <refpurpose>change the definition of a trigger</refpurpose>
+ <refpurpose>change the definition of an event trigger</refpurpose>
</refnamediv>
<indexterm zone="sql-altereventtrigger">
@@ -31,8 +31,6 @@ ALTER EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable> RENAME TO
ENABLE REPLICA
DISABLE
-<phrase>and where <replaceable class="parameter">command</replaceable> can be one of the same list as in <xref linkend="sql-createeventtrigger">.</phrase>
-
</synopsis>
</refsynopsisdiv>
@@ -45,7 +43,7 @@ ALTER EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable> RENAME TO
</para>
<para>
- You must be superuser to alter a event trigger.
+ You must be superuser to alter an event trigger.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/create_event_trigger.sgml b/doc/src/sgml/ref/create_event_trigger.sgml
index af06c88..bd323b7 100644
--- a/doc/src/sgml/ref/create_event_trigger.sgml
+++ b/doc/src/sgml/ref/create_event_trigger.sgml
@@ -12,7 +12,7 @@ PostgreSQL documentation
<refnamediv>
<refname>CREATE EVENT TRIGGER</refname>
- <refpurpose>define a new trigger</refpurpose>
+ <refpurpose>define a new event trigger</refpurpose>
</refnamediv>
<indexterm zone="sql-createeventtrigger">
@@ -135,7 +135,7 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
The command trigger gives a procedure to fire before the event is
executed. In some cases the procedure can be fired instead of the event
code PostgreSQL would run itself. A command trigger's function must
- return <literal>event_trigger</literal> data type. It can then only
+ return a data type of <literal>event_trigger</literal>. It can then only
abort the execution of the command by raising an exception.
</para>
@@ -146,8 +146,8 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
<para>
Note that objects dropped by the effect of <literal>DROP
- CASCADE</literal> will not result in a event trigger firing, only the
- top-level event for the main object will fire a event trigger. That
+ CASCADE</literal> will not result in an event trigger firing, only the
+ top-level event for the main object will fire an event trigger. That
also applies to other dependencies following, as in <literal>DROP OWNED
BY</literal>.
</para>
@@ -178,7 +178,8 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
<para>
The tag of the command the trigger is for. Supported commands are
mainly those acting on database objects, plus some more facilities.
- That leaves out the following list of non supported commands.
+ That leaves the following cases where commands are not supported by
+ event trigger functionality.
</para>
<para>
Commands that refer to global objects, such as databases, tablespaces
@@ -209,7 +210,7 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
Triggers on <literal>ANY</literal> command support more commands than
just this list, and will only provide the <literal>command
tag</literal> argument as <literal>NOT NULL</literal>. Supporting more
- commands is made so that you can actually block <xref linkend="ddl">
+ commands is made so that you can block all <xref linkend="ddl">
commands in one go.
</para>
</listitem>
@@ -220,7 +221,7 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
<listitem>
<para>
A user-supplied function that is declared as taking no argument and
- returning type <literal>event trigger</literal>.
+ returning type <literal>event_trigger</literal>.
</para>
<para>
If your event trigger is implemented in <literal>C</literal> then it
@@ -238,11 +239,11 @@ CREATE EVENT TRIGGER <replaceable class="PARAMETER">name</replaceable>
<title>Notes</title>
<para>
- To create a trigger on a event, the user must be superuser.
+ To create a trigger on an event, the user must be a superuser.
</para>
<para>
- Use <xref linkend="sql-dropeventtrigger"> to remove a event trigger.
+ Use <xref linkend="sql-dropeventtrigger"> to remove an event trigger.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/drop_event_trigger.sgml b/doc/src/sgml/ref/drop_event_trigger.sgml
index fc45dff..006f136 100644
--- a/doc/src/sgml/ref/drop_event_trigger.sgml
+++ b/doc/src/sgml/ref/drop_event_trigger.sgml
@@ -12,7 +12,7 @@ PostgreSQL documentation
<refnamediv>
<refname>DROP EVENT TRIGGER</refname>
- <refpurpose>remove a event trigger</refpurpose>
+ <refpurpose>remove an event trigger</refpurpose>
</refnamediv>
<indexterm zone="sql-dropeventtrigger">
@@ -30,7 +30,7 @@ DROP EVENT TRIGGER [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceabl
<para>
<command>DROP EVENT TRIGGER</command> removes an existing trigger definition.
- To execute this command, the current user must be superuser.
+ To execute this command, the current user must be a superuser.
</para>
</refsect1>
diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 32994b9..dd18e7b 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -39,8 +39,8 @@
<para>
A trigger is a specification that the database should automatically
execute a particular function whenever a certain command is performed.
- The whole set of <productname>PostgreSQL</productname> commands is not
- supported for triggers, see <xref linkend="sql-createeventtrigger">
+ Not all <productname>PostgreSQL</productname> commands are supported
+ for triggers. See <xref linkend="sql-createeventtrigger">
for details.
</para>
</sect1>