Postgresql 中文操作指南

Chapter 40. Event Triggers

Table of Contents

为了补充 Chapter 39 中讨论的触发器机制,PostgreSQL 还提供了事件触发器。与仅连接到单个表并仅捕获 DML 事件的常规触发器不同,事件触发器针对于特定数据库是全局的,并且能够捕获 DDL 事件。

To supplement the trigger mechanism discussed in Chapter 39, PostgreSQL also provides event triggers. Unlike regular triggers, which are attached to a single table and capture only DML events, event triggers are global to a particular database and are capable of capturing DDL events.

与常规触发器一样,事件触发器可以用包含事件触发器支持的任何过程式语言或 C 编写,但不可以用纯 SQL 编写。

Like regular triggers, event triggers can be written in any procedural language that includes event trigger support, or in C, but not in plain SQL.