Re: Trigger error
От | sub_woofer |
---|---|
Тема | Re: Trigger error |
Дата | |
Msg-id | 23095916.post@talk.nabble.com обсуждение исходный текст |
Ответ на | Re: Trigger error (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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@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 > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.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.
В списке pgsql-general по дате отправления: