Function and trigger problem

Поиск
Список
Период
Сортировка
От Adam H. Pendleton
Тема Function and trigger problem
Дата
Msg-id 000f01bea14b$079ef670$bdd0be80@belvoir.army.mil
обсуждение исходный текст
Ответ на Re: [SQL] Updating and null values.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I use the following code to create a function:

create function employee_stats_update() returns int4as 'insert into employee_stats values ( new.employee_name); select
1as ignore_this'
 
language 'plpgsql';


Then I create the following trigger:

create trigger update_employee_statsbefore insert on employee_master for each row execute procedure
employee_stats_update();

This is what I get back when I try to create the trigger:

ERROR:  CreateTrigger: function employee_stats_update () does not exist

Adam



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Updating and null values.
Следующее
От: Michael J Davis
Дата:
Сообщение: RE: [SQL] Function and trigger problem