Re: trigger and plpgsq help needed - Mailing list pgsql-general

From Chris Ernst
Subject Re: trigger and plpgsq help needed
Date
Msg-id 506344FB.3020505@zvelo.com
Whole thread Raw
In response to trigger and plpgsq help needed  ("SUNDAY A. OLUTAYO" <olutayo@sadeeb.com>)
Responses Re: trigger and plpgsq help needed
List pgsql-general
On 09/26/2012 10:42 AM, SUNDAY A. OLUTAYO wrote:
> This IF last_id IS NULL THEN suppose to test if last_id is NULL, that is
> the select query did not found it
> then execute the rest of the red sql but it always fail to insert the
> *NEW.amount *into*amount*, every other things fine.

I believe what you're looking for is "IF NOT FOUND THEN" instead of "IF
last_id IS NULL THEN"

Cheers!

    - Chris



pgsql-general by date:

Previous
From: "SUNDAY A. OLUTAYO"
Date:
Subject: trigger and plpgsq help needed
Next
From: Rob Richardson
Date:
Subject: Re: trigger and plpgsq help needed