Re: trigger and plpgsq help needed

From: Chris Ernst <cernst(at)zvelo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger and plpgsq help needed
Date: 2012-09-26 18:10:03
Message-ID: 506344FB.3020505@zvelo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Richardson 2012-09-26 18:14:46 Re: trigger and plpgsq help needed
Previous Message Jeff Janes 2012-09-26 17:04:57 Re: PostgreSQL data loads - turn off WAL