|
49 | 49 | To prevent servers from becoming inaccessible, such triggers must avoid |
50 | 50 | writing anything to the database when running on a standby. |
51 | 51 | Also, it's recommended to avoid long-running queries in |
52 | | - <literal>login</literal> event triggers. Notes that, for instance, |
| 52 | + <literal>login</literal> event triggers. Note that, for instance, |
53 | 53 | canceling connection in <application>psql</application> wouldn't cancel |
54 | 54 | the in-progress <literal>login</literal> trigger. |
55 | 55 | </para> |
@@ -1144,8 +1144,9 @@ typedef struct EventTriggerData |
1144 | 1144 | <listitem> |
1145 | 1145 | <para> |
1146 | 1146 | Describes the event for which the function is called, one of |
1147 | | - <literal>"ddl_command_start"</literal>, <literal>"ddl_command_end"</literal>, |
1148 | | - <literal>"sql_drop"</literal>, <literal>"table_rewrite"</literal>. |
| 1147 | + <literal>"login"</literal>, <literal>"ddl_command_start"</literal>, |
| 1148 | + <literal>"ddl_command_end"</literal>, <literal>"sql_drop"</literal>, |
| 1149 | + <literal>"table_rewrite"</literal>. |
1149 | 1150 | See <xref linkend="event-trigger-definition"/> for the meaning of these |
1150 | 1151 | events. |
1151 | 1152 | </para> |
@@ -1203,8 +1204,9 @@ typedef struct EventTriggerData |
1203 | 1204 | This is the source code of the trigger function: |
1204 | 1205 | <programlisting><![CDATA[ |
1205 | 1206 | #include "postgres.h" |
1206 | | -#include "commands/event_trigger.h" |
1207 | 1207 |
|
| 1208 | +#include "commands/event_trigger.h" |
| 1209 | +#include "fmgr.h" |
1208 | 1210 |
|
1209 | 1211 | PG_MODULE_MAGIC; |
1210 | 1212 |
|
|
0 commit comments