Re: trigger and plpgsq help needed

Поиск
Список
Период
Сортировка
От Chris Ernst
Тема Re: trigger and plpgsq help needed
Дата
Msg-id 506344FB.3020505@zvelo.com
обсуждение исходный текст
Ответ на trigger and plpgsq help needed  ("SUNDAY A. OLUTAYO" <olutayo@sadeeb.com>)
Ответы Re: trigger and plpgsq help needed  ("SUNDAY A. OLUTAYO" <olutayo@sadeeb.com>)
Список 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 по дате отправления:

Предыдущее
От: "SUNDAY A. OLUTAYO"
Дата:
Сообщение: trigger and plpgsq help needed
Следующее
От: Rob Richardson
Дата:
Сообщение: Re: trigger and plpgsq help needed