Fw: Trigger Function

From: "Andy Pearce" <andyj(at)basesys(dot)co(dot)uk>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Fw: Trigger Function
Date: 2002-10-11 23:10:00
Message-ID: 003101c2717b$53c32810$20e3fea9@dellboy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


----- Original Message -----
From: Andy Pearce
To: pgsql-novice
Sent: Thursday, August 15, 2002 2:22 AM
Subject: Trigger Function

Hi,

I'm attemptimg my first trigger funtion and so far it keeps crashing the backend.

This is the function:

CREATE FUNCTION acc_transaction_trig() RETURNS opaque AS '

begin

update customer_accounts set customer_acounts.forecast_balance = (customer_accounts.forecast_balance - NEW.transaction_value)

where customer_accounts.account_num = NEW.account_num;

return NEW;

end;

' LANGUAGE 'plpgsql';

Does this look wrong in anyway?

Any assistance would be gladly appreciated.

Thanks

Andy

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ludwig Lim 2002-10-12 03:03:11 Re: Fw: Trigger Function
Previous Message Kirby Krueger 2002-10-11 20:08:34 Problems with c, compiling, libraries