(28 . 7)(28 . 7)
89 create trigger log_insert_notify_trigger
90 after insert on log
91 for each row execute procedure log_insert_notify ();
92
93
94 create table outbox (
95 id serial primary key,
96 target text not null,
(38 . 7)(38 . 7)
98
99 create or replace function outbox_insert_notify () returns trigger as $$
100 begin
101 perform pg_notify('outbox_new_message', NEW.id::text);
102 perform pg_notify('outbox_new_message', NEW.target::text);
103 return NEW;
104 end;
105 $$ language plpgsql;