
CREATE OR REPLACE FUNCTION tcg.public.FN_before_update_TCG_Change_Set()
RETURNS TRIGGER AS $$
BEGIN
    NEW.updated_last_on = CURRENT_TIMESTAMP;
    RETURN NEW;
END;
$$ LANGUAGE plpgsql
;

CREATE TRIGGER TRI_before_insert_TCG_Change_Set
    BEFORE INSERT ON tcg.public.TCG_Change_Set
    FOR EACH ROW
    EXECUTE FUNCTION tcg.public.FN_before_update_TCG_Change_Set()
;
CREATE TRIGGER TRI_before_update_TCG_Change_Set
    BEFORE UPDATE ON tcg.public.TCG_Change_Set
    FOR EACH ROW
    EXECUTE FUNCTION tcg.public.FN_before_update_TCG_Change_Set()
;