# 39. Triggers

本章提供有關撰寫觸發器(Trigger)函數的基本資訊。觸發器函數可以用大多數可用的程序語言撰寫，包括PL/pgSQL（[第 43 章](/16/server-programming/pl-pgsql-sql-procedural-language.md)），PL/Tcl（[第 44 章](/16/server-programming/pl-tcl-tcl-procedural-language.md)），PL/Perl（[第 45 章](/16/server-programming/pl-perl-perl-procedural-language.md)）和 PL/Python（[第 46 章](/16/server-programming/pl-python-python-procedural-language-1.md)）。閱讀本章後，您可以查閱您所偏好的程序語言的章節，以瞭解使用其中撰寫觸發器時的特定語言詳細資訊。

也可以用 C 撰寫觸發器函數，儘管大多數人發現使用其中一種過程語言更容易。目前無法用純 SQL 函數語言編寫觸發器函數。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/16/server-programming/triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
