Search Postgresql Archives

Fwd: Trigger on VIEW not firing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

I have a problem with Triggers on VIEW:

suppose I have:

CREATE TABLE work (
  id integer NOT NULL,
  work TEXT,
  worktype TEXT
);

CREATE VIEW worksub AS SELECT FROM work WHERE worktype='subordinate';


CREATE OR REPLACE FUNCTION wrk_view() RETURNS TRIGGER AS $wrk_tg$
    BEGIN
        RAISE NOTICE 'UPDATE VIEW FROM: % OPERATION: %',TG_TABLE_NAME, TG_OP;
    END;
$wrk_tg$ LANGUAGE plpgsql;

CREATE TRIGGER wrk_tg INSTEAD OF INSERT OR DELETE OR UPDATE ON worksub
    FOR EACH ROW EXECUTE PROCEDURE wrk_view();

nothing appen when I insert row in work table.

Someone can help me?


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux