CREATE TRIGGER MojWyzwalacz BEFORE INSERT OR UPDATE OR DELETE ON MojaTabela FOR EACH ROW EXECUTE PROCEDURE MojaFunkcja();

CREATE TRIGGER MojNowyWyzwalacz BEFORE INSERT OR UPDATE OR DELETE ON MojaTabela FOR EACH STATEMENT EXECUTE PROCEDURE MojaFunkcja();

CREATE RULE MojaRegula AS ON UPDATE TO MojaTabela WHERE NEW.Kolumna<> OLD.Kolumna DO INSERT INTO MojaInnaTabela VALUES(NEW.Kolumna,CURRENT_USER,CURRENT_TIMESTAMP);

CREATE TABLE MojWidok(Kolumna INTEGER);
CREATE RULE "_RETURN" AS ON SELECT TO MojWidok DO INSTEAD SELECT * FROM MojaTabela;
