Bug #440: trigger can not find a function - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #440: trigger can not find a function
Date
Msg-id 200109061434.f86EY7Z17702@hub.org
Whole thread Raw
List pgsql-bugs
arnauld michelizza (am@adomos.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

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #439: no inherits constraints
Next
From: "Stephan Szabo"
Date:
Subject: Re: Bug #440: trigger can not find a function