pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam H. Pendleton <apendleton@vgsinc.com>
To: pgsql-sql@hub.org
Subject: Function and trigger problem
Date: Tue, 18 May 1999 12:25:22 -0400
Message-ID: <000f01bea14b$079ef670$bdd0be80@belvoir.army.mil> (raw)
References: <19391.927040305@sss.pgh.pa.us>

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




view thread (3+ messages)  latest in thread

Message-ID: <000f01bea14b$079ef670$bdd0be80@belvoir.army.mil>
Permalink:  ../000f01bea14b$079ef670$bdd0be80@belvoir.army.mil/
Also on:    postgresql.org/message-id/000f01bea14b$079ef670$bdd0be80@belvoir.army.mil

 · 

reply

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: apendleton@vgsinc.com, pgsql-sql@hub.org
  Subject: Re: Function and trigger problem
  In-Reply-To: <000f01bea14b$079ef670$bdd0be80@belvoir.army.mil>
  References: <19391.927040305@sss.pgh.pa.us> <000f01bea14b$079ef670$bdd0be80@belvoir.army.mil>

* 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