Bug #440: trigger can not find a function

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #440: trigger can not find a function
Date: 2001-09-06 14:34:07
Message-ID: 200109061434.f86EY7Z17702@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

arnauld michelizza (am(at)adomos(dot)com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
trigger can not find a function

Long Description
ERROR: CreateTrigger: function check_key() does not exist

Sample Code
CREATE FUNCTION check_key(varchar,varchar) RETURNS OPAQUE AS '
BEGIN
IF COUNT(*) FROM $2 WHERE $2.$1=NEW.$1 THEN
RAISE EXCEPTION ''integrity violation : duplicated key'';
END IF;
RETURN NEW;
END;
' LANGUAGE 'plpgsql';

CREATE TRIGGER trigger_check_key BEFORE INSERT OR UPDATE
ON bar
FOR EACH ROW EXECUTE PROCEDURE check_key('id','foo');

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2001-09-06 15:45:25 Re: Build problem with CVS version
Previous Message pgsql-bugs 2001-09-06 14:29:00 Bug #439: no inherits constraints