From: | Michael Rowan <mike(dot)rowan(at)internode(dot)on(dot)net> |
---|---|
To: | pgsql-novice novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Problem with CREATE TRIGGER |
Date: | 2012-08-28 23:22:23 |
Message-ID: | 824AD5F0-0952-48C4-B5F6-BD54728DDEDD@internode.on.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi
In Postgres 9.1 I have a function as a test (of my ability):
CREATE OR REPLACE FUNCTION insert_payment(integer, numeric)
RETURNS numeric AS
$BODY$
UPDATE company
SET co_payments=co_payments+$2
WHERE co_id=$1
RETURNING co_payments;
$BODY$
LANGUAGE sql VOLATILE
COST 100;
ALTER FUNCTION insert_payment(integer, numeric)
OWNER TO postgres;
This function exists, according to pgAdminIII
So I attempt to create a trigger:
CREATE TRIGGER increment_payments
AFTER INSERT ON payment
FOR EACH ROW
EXECUTE PROCEDURE insert_payment();
ERROR: function insert_payment() does not exist
What am I doing wrong here?
Michael Rowan
mike(dot)rowan(at)internode(dot)on(dot)net
11 Kingscote Street
ALBERTON
South Australia 5014
tel 618 8240 3993
mob 0417 812 509
From | Date | Subject | |
---|---|---|---|
Next Message | Alan Hodgson | 2012-08-28 23:35:38 | Re: Problem with CREATE TRIGGER |
Previous Message | Shira Bezalel | 2012-08-28 22:31:21 | question about logging_collector |