diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 22966c06dc0142e7e65a142ddcdc663327956883..8f724c86648e1ef2394012d241cd9ffd30c99057 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -705,6 +705,7 @@ CREATE TABLE ttest (
     This is the source code of the trigger function:
 <programlisting><![CDATA[
 #include "postgres.h"
+#include "fmgr.h"
 #include "executor/spi.h"       /* this is what you need to work with SPI */
 #include "commands/trigger.h"   /* ... triggers ... */
 #include "utils/rel.h"          /* ... and relations */