Re: Trigger error - Mailing list pgsql-general

From Tom Lane
Subject Re: Trigger error
Date
Msg-id 11282.1239809734@sss.pgh.pa.us
Whole thread Raw
In response to Trigger error  (sub_woofer <tqzelijah@yahoo.co.uk>)
Responses Re: Trigger error
List pgsql-general
sub_woofer <tqzelijah@yahoo.co.uk> writes:
> IF (((TG_OP = 'INSERT') AND (new.subjects=TRUE)) OR ((TG_OP='UPDATE') AND
> (new.subjects=TRUE) AND (old.subjects=FALSE))) THEN

You can't do that.  Split the IF apart so that you don't touch NEW or
OLD in the same if-test that tries to determine if they're safe to
touch.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance of full outer join in 8.3
Next
From: Tom Lane
Date:
Subject: Re: Problem with invalid byte sequence and log_min_error_statement