From: Tom Lane <tgl@sss.pgh.pa.us>
To: Torsten Zühlsdorff <foo@meisterderspiele.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: [TRIGGER] Returning values from BEFORE UPDATE trigger, without using them
Date: Tue, 27 Jul 2010 16:50:24 -0400
Message-ID: <13845.1280263824@sss.pgh.pa.us> (raw)
In-Reply-To: <i2c3bp$v3l$1@news.eternal-september.org>
References: <i2c3bp$v3l$1@news.eternal-september.org>
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= <foo@meisterderspiele.de> writes:
> I have defined an BEFORE UPDATE trigger. The trigger catch every update,
> change some columns of the new row, make an insert of the new row and
> returns null to abort the update.
Why in the world would you do that? Just return the modified row from
the trigger and let the update proceed normally.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, foo@meisterderspiele.de
Subject: Re: [TRIGGER] Returning values from BEFORE UPDATE trigger, without using them
In-Reply-To: <13845.1280263824@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox