| From: | "Andy Pearce" <andyj(at)basesys(dot)co(dot)uk> |
|---|---|
| To: | "pgsql-novice" <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Trigger Function |
| Date: | 2002-08-15 01:22:55 |
| Message-ID: | 000c01c243fa$5a088cf0$0200a8c0@dellboy |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jules Alberts | 2002-08-15 09:13:22 | Re: pg_restore problem |
| Previous Message | Chad Thompson | 2002-08-14 23:38:49 | Re: What is wrong with this SQL |