TRIGGERS!!!

wxdqz

New Member
having trouble creating a trigger,,, first I create thi function:

CREATE FUNCTION update_shippers (varchar) RETURNS int4
AS 'INSERT INTO shippers (shipper_no) VALUES ($1);
SELECT 1 AS ignore_this'
LANGUAGE 'sql';

works fine then when I try to create this trigger:

CREATE TRIGGER "sync_shippers" AFTER INSERT OR UPDATE ON "cargo"
FOR EACH ROW EXECUTE PROCEDURE update_shippers(shipper_no);

I get this error message:

ERROR: CreateTrigger: function update_shippers() does not exist!!

I know the function does exist,

Somebody help....
 
Back
Top