sql - Trigger on view in Postgresql -


i have materialized view , view select * materialized view. want have trigger on view, executed after refreshing materialized view. tried after insert or update trigger, seems it's not working. possible in pgsql?

as easy example (in reality not have test table in same db ofc):

create table test(id integer primary key, sth integer); create materialized view test_mv select * test; create view test_mv_v select * test_mv; create or replace function test_trig() returns trigger $$ begin raise notice 'triggered'; return null;end;$$ language 'plpgsql'; create trigger test after insert or update on test_mv_v each statement execute procedure test_trig(); 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -