Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 63A0C4759B5; Wed, 14 Aug 2002 08:09:48 -0400 (EDT) Received: from hqmail.nws.noaa.gov (hqmail.nws.noaa.gov [140.90.19.73]) by postgresql.org (Postfix) with ESMTP id 6ECF2475917; Wed, 14 Aug 2002 08:09:47 -0400 (EDT) Received: from noaa.gov ([140.90.8.96]) by hqmail.nws.noaa.gov (Netscape Messaging Server 4.15) with ESMTP id H0U1S000.17K; Wed, 14 Aug 2002 08:09:36 -0400 Message-ID: <3D5A487F.ECFECBAE@noaa.gov> Date: Wed, 14 Aug 2002 08:09:36 -0400 From: "Raymond Chui" Organization: NWS NOAA X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org, pgadmin-support@postgresql.org, pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: How to execute my trigger when update certain columns but not all? Content-Type: multipart/mixed; boundary="------------18B7847CFDB25B4426CF8176" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/37 X-Sequence-Number: 661 This is a multi-part message in MIME format. --------------18B7847CFDB25B4426CF8176 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 --------------18B7847CFDB25B4426CF8176 Content-Type: text/x-vcard; charset=us-ascii; name="raymond.chui.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Raymond Chui Content-Disposition: attachment; filename="raymond.chui.vcf" 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 --------------18B7847CFDB25B4426CF8176--