From: Michael J Davis <michael.j.davis@tvguide.com>
To: 'Adam H. Pendleton' <apendleton@vgsinc.com>
To: pgsql-sql@hub.org
Subject: RE: [SQL] Function and trigger problem
Date: Tue, 18 May 1999 11:53:39 -0500
Message-ID: <93C04F1F5173D211A27900105AA8FCFC145511@lambic.prevuenet.com> (raw)
Trigger functions must return OPAQUE (OLD or NEW).
-----Original Message-----
From: Adam H. Pendleton [SMTP:apendleton@vgsinc.com]
Sent: Tuesday, May 18, 1999 10:25 AM
To: pgsql-sql@hub.org
Subject: [SQL] Function and trigger problem
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: michael.j.davis@tvguide.com, apendleton@vgsinc.com, pgsql-sql@hub.org
Subject: Re: [SQL] Function and trigger problem
In-Reply-To: <93C04F1F5173D211A27900105AA8FCFC145511@lambic.prevuenet.com>
References: <93C04F1F5173D211A27900105AA8FCFC145511@lambic.prevuenet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox