Fw: Trigger Function

Поиск
Список
Период
Сортировка
От Andy Pearce
Тема Fw: Trigger Function
Дата
Msg-id 001601c24d4c$397d4740$0200a8c0@dellboy
обсуждение исходный текст
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: functions
Следующее
От: "Warren Massengill"
Дата:
Сообщение: interface choices