PostgreSQL - Triggers in PostgreSQL
You wrote this trigger function for DELETE:
What is the error in this function?
CREATE FUNCTION trg_delete_check() RETURNS trigger AS $$
BEGIN
IF NEW.id IS NULL THEN
RAISE EXCEPTION 'ID cannot be null';
END IF;
RETURN OLD;
END;
$$ LANGUAGE plpgsql;What is the error in this function?
