From: Raymond Chui <Raymond.Chui@noaa.gov>
To: pgsql-sql@postgresql.org
To: pgadmin-support@postgresql.org
To: pgsql-general@postgresql.org
To: pgsql-admin@postgresql.org
Subject: How to execute my trigger when update certain columns but not all?
Date: Wed, 14 Aug 2002 08:09:36 -0400
Message-ID: <3D5A487F.ECFECBAE@noaa.gov> (raw)
Let say I have a table has column1 and column2 and I made a trigger for
after INSERT OR UPDATE for each row to execute procedure my_function.
What I want is the trigger execute my_function only when column1 is
insert or
update, but not going to execute my_function when column2 is insert or
update.
How do I do that?
Thank Q very much
Attachments:raymond.chui.vcf (text/x-vcard, 311B) download
begin:vcard
n:Chui;Raymond
tel;work:301-713-0640 x168
x-mozilla-html:FALSE
url:http://www.nws.noaa.gov/
org:NWS, NOAA;OHD13
version:2.1
email;internet:raymond.chui@noaa.gov
title:CS
adr;quoted-printable:;;1325 East-West Highway=0D=0ASSMC2, Room 8112;Silver Spring;MD;20910-3282;U.S.A.
fn:Raymond Chui
end:vcard
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: Raymond.Chui@noaa.gov, pgadmin-support@postgresql.org, pgsql-general@postgresql.org, pgsql-admin@postgresql.org
Subject: Re: How to execute my trigger when update certain columns but not all?
In-Reply-To: <3D5A487F.ECFECBAE@noaa.gov>
* 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