Search Postgresql Archives

Re: Trigger error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
> 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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux