Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION notify_inbound_operator_calls_trigger() RETURNS trigger AS $$
- DECLARE
- BEGIN
- PERFORM pg_notify('watchers', TG_TABLE_NAME || ',id,' || NEW.id );
- RETURN new;
- END;
- $$ LANGUAGE plpgsql;
- CREATE TRIGGER inbound_operator_calls_trigger AFTER INSERT OR UPDATE ON inbound_operator_calls
- FOR EACH ROW EXECUTE PROCEDURE notify_inbound_operator_calls_trigger();
Advertisement
Add Comment
Please, Sign In to add comment