problem creating triggers and stored procedures

From: "John P(dot) Looney" <john(at)antefacto(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: problem creating triggers and stored procedures
Date: 2001-10-04 14:34:44
Message-ID: 20011004153443.U18369@antefacto.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to work out how to get triggers working, using the example
"add_one(int4)" C function given in the programmers guide;

postgres=# select add_one(-2.4) as stuff;
stuff
-------
-1
(1 row)

... so, it works fine. However, I can't create a trigger, using that
stored procedure;

postgres=# create trigger add_one_to_col_one AFTER INSERT on test_table for each row execute procedure add_one();
ERROR: CreateTrigger: function add_one() does not exist

Any idea why this would be ? Also, I created a user, and tryed to execute
the add_one() stored procedure. It seems normal users don't have access to
them. The following returns "add_one" when run as postgres, but not when
run as a normal user. Can this behaviour be altered ?

select proname from pg_proc where proname = 'add_one';

John

--
_______________________________________
John Looney Chief Scientist
a n t e f a c t o t: +353 1 8586004
www.antefacto.com f: +353 1 8586014

Browse pgsql-general by date

  From Date Subject
Next Message Michael V. Harding 2001-10-04 18:12:04 What's up with bytea support/documentation?
Previous Message Bogien 2001-10-04 14:14:19 [pgAdmin] A problem logging to the base??