Commit 5a67d761 authored by Tom Lane's avatar Tom Lane

Clarify trigger function return convention, per Thomas Hallgren.

parent 79f9ee9d
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.35 2004/03/03 22:22:24 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/trigger.sgml,v 1.36 2004/08/13 16:17:19 tgl Exp $
--> -->
<chapter id="triggers"> <chapter id="triggers">
...@@ -431,8 +431,10 @@ typedef struct Trigger ...@@ -431,8 +431,10 @@ typedef struct Trigger
</para> </para>
<para> <para>
A trigger function must return either <symbol>NULL</> or a A trigger function must return either a
<structname>HeapTuple</> pointer. Be careful to return either <structname>HeapTuple</> pointer or a <symbol>NULL</> pointer
(<emphasis>not</> a SQL NULL, that is, do not set isNull true).
Be careful to return either
<structfield>tg_trigtuple</> or <structfield>tg_newtuple</>, <structfield>tg_trigtuple</> or <structfield>tg_newtuple</>,
as appropriate, if you don't want to modify the row being operated on. as appropriate, if you don't want to modify the row being operated on.
</para> </para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment