Re: Trigger error

From: sub_woofer <tqzelijah(at)yahoo(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger error
Date: 2009-04-17 11:43:57
Message-ID: 23095916.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi Thank you both for your responses and apologies for the late reply!

Tom you were correct! :) I split the If statements into 2 for the old and
new tests and it all worked! :)

Thanks once again for all your help! :)

t.

Tom Lane-2 wrote:
>
> 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
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

--
View this message in context: http://www.nabble.com/Trigger-error-tp23060050p23095916.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Janning Vygen 2009-04-17 12:01:45 Re: Problem with invalid byte sequence and log_min_error_statement
Previous Message Chris.Ellis 2009-04-17 11:16:25 Re: Looking for advice on database encryption