On 2009-08-18, Suporte PK wrote:
> Hi list,
>
> I'm having trouble with - believe me! - the IF operator on a PL/PGSQL
> function used by a trigger.
>
> I'm using one unique function to process the three triggers events
> (delete, update and insert), but when I reference OLD or NEW on a IF
> CON
Suporte PK writes:
> IF TG_OP = 'UPDATE' AND OLD.field != NEW.field THEN
> ...
> The question is: if the trigger was not fired by an UPDATE event,
> shouldn't it make the first test and then ignore the rest of the condition?
No. This is a very very common error. The behavior is not as
short-ci
Hi list,
I'm having trouble with - believe me! - the IF operator on a PL/PGSQL
function used by a trigger.
I'm using one unique function to process the three triggers events
(delete, update and insert), but when I reference OLD or NEW on a IF
CONDITION, I get an error even when testing BEFOR