Function and trigger problem

From: "Adam H(dot) Pendleton" <apendleton(at)vgsinc(dot)com>
To: <pgsql-sql(at)hub(dot)org>
Subject: Function and trigger problem
Date: 1999-05-18 16:25:22
Message-ID: 000f01bea14b$079ef670$bdd0be80@belvoir.army.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I use the following code to create a function:

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

Then I create the following trigger:

create trigger update_employee_stats
before 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael J Davis 1999-05-18 16:53:39 RE: [SQL] Function and trigger problem
Previous Message Tom Lane 1999-05-18 15:11:45 Re: [SQL] Updating and null values.