mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Doc: add example of transition table use in a trigger.
I noticed that there were exactly no complete examples of use of a transition table in a trigger function, and no clear description of just how you'd do it either. Improve that.
This commit is contained in:
@@ -317,9 +317,11 @@
|
||||
be created to make the sets of affected rows available to the trigger.
|
||||
<literal>AFTER ROW</> triggers can also request transition tables, so
|
||||
that they can see the total changes in the table as well as the change in
|
||||
the individual row they are currently being fired for. The syntax for
|
||||
the individual row they are currently being fired for. The method for
|
||||
examining the transition tables again depends on the programming language
|
||||
that is being used.
|
||||
that is being used, but the typical approach is to make the transition
|
||||
tables act like read-only temporary tables that can be accessed by SQL
|
||||
commands issued within the trigger function.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
Reference in New Issue
Block a user