To prevent servers from becoming inaccessible, such triggers must avoid
writing anything to the database when running on a standby.
Also, it's recommended to avoid long-running queries in
- login event triggers. Notes that, for instance,
+ login event triggers. Note that, for instance,
canceling connection in
psql wouldn't cancel
the in-progress login trigger.
Describes the event for which the function is called, one of
- "ddl_command_start", "ddl_command_end",
- "sql_drop", "table_rewrite".
+ "login", "ddl_command_start",
+ "ddl_command_end", "sql_drop",
+ "table_rewrite".
See for the meaning of these
events.
This is the source code of the trigger function:
#include "postgres.h"
-#include "commands/event_trigger.h"
+#include "commands/event_trigger.h"
+#include "fmgr.h"
PG_MODULE_MAGIC;