Re: trigger and plpgsq help needed

From: "SUNDAY A(dot) OLUTAYO" <olutayo(at)sadeeb(dot)com>
To: Rob Richardson <RDRichardson(at)rad-con(dot)com>, adrian(dot)klaver(at)gmail(dot)com, Chris Ernst <cernst(at)zvelo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger and plpgsq help needed
Date: 2012-09-27 14:54:04
Message-ID: 9a7c9c0e-92c9-42c4-a0ba-6cf2399b3f94@mail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks you all,

" IF last_id IS NULL THEN " eventually work

Thanks,

Sunday Olutayo
Sadeeb Technologies Ltd

----- Original Message -----

From: "SUNDAY A. OLUTAYO" <olutayo(at)sadeeb(dot)com>
To: "Rob Richardson" <RDRichardson(at)rad-con(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Sent: Thursday, September 27, 2012 2:04:46 PM
Subject: Re: [GENERAL] trigger and plpgsq help needed

RobR,

I have tried it 'IF FOUND' but not getting the desired result

Thanks,

Sunday Olutayo

----- Original Message -----

From: "Rob Richardson" <RDRichardson(at)rad-con(dot)com>
To: pgsql-general(at)postgresql(dot)org
Sent: Wednesday, September 26, 2012 7:14:46 PM
Subject: Re: [GENERAL] trigger and plpgsq help needed

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

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2012-09-27 14:55:15 Re: problem with recreating database with export
Previous Message Leonardo M. Ramé 2012-09-27 14:31:17 Re: Linux PowerPC 64bits issue