Re: Trigger error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sub_woofer <tqzelijah(at)yahoo(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger error
Date: 2009-04-15 15:35:34
Message-ID: 11282.1239809734@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

sub_woofer <tqzelijah(at)yahoo(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-04-15 15:38:51 Re: Problem with invalid byte sequence and log_min_error_statement
Previous Message Tom Lane 2009-04-15 15:33:01 Re: Performance of full outer join in 8.3