arnauld michelizza ([EMAIL PROTECTED]) 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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to