Re: Firing triggers based on certain Insert conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Firing triggers based on certain Insert conditions
Date: 2007-01-28 18:20:16
Message-ID: 15985.1170008416@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com> writes:
> I want this trigger to fire only when after Insert this field 'source'
> has value = 'from', otherwise trigger should not be fired at all.
> Just wondering if its really possible?

No, and it seems pretty silly as a feature request. Why don't you just
put the test in the trigger, and have it do nothing when you don't want
it to do anything?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2007-01-28 18:21:09 Re: Limit on number of users in postgresql?
Previous Message Anton Melser 2007-01-28 18:18:23 Re: Questions about horizontal partitioning