Re: trigger and plpgsq help needed

From: Rob Richardson <RDRichardson(at)rad-con(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: trigger and plpgsq help needed
Date: 2012-09-26 18:14:46
Message-ID: 67D108EDFAD3C148A593E6ED7DCB4BBD1FDC84D3@RADCONWIN2K8PDC.radcon.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why not use IF FOUND?

RobR

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of SUNDAY A. OLUTAYO
Sent: Wednesday, September 26, 2012 12:43 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] trigger and plpgsq help needed

Dear all,

I have issue with the red portion function below;

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.

Kindly help out.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Sosinski 2012-09-26 18:38:09 Inaccurate Explain Cost
Previous Message Chris Ernst 2012-09-26 18:10:03 Re: trigger and plpgsq help needed