Re: Firing triggers based on certain Insert conditions - Mailing list pgsql-general

From Tom Lane
Subject Re: Firing triggers based on certain Insert conditions
Date
Msg-id 15985.1170008416@sss.pgh.pa.us
Whole thread Raw
In response to Firing triggers based on certain Insert conditions  ("Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>)
Responses Re: Firing triggers based on certain Insert conditions  ("Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>)
List pgsql-general
"Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.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

pgsql-general by date:

Previous
From: "Anton Melser"
Date:
Subject: Re: Questions about horizontal partitioning
Next
From: Bill Moran
Date:
Subject: Re: Limit on number of users in postgresql?