Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ddl/functions/notify_on_row.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ end;
$$ language plpgsql;

-- register trigger for an insert / update on the following tables
-- WARNING: Be EXTREMELY careful when touching this because it requires a large number of locks to run.
-- If you add a table, it is very recommended to run it manually first and babysit it (canceling any blocking queries that show up).
-- Creating the trigger is fast, but it can easily deadlock the database.
do $$
declare
tbl text;
Expand All @@ -41,4 +44,4 @@ begin
EXECUTE 'drop trigger if exists trg_' ||tbl|| ' on ' ||tbl|| ';';
EXECUTE 'create trigger trg_' ||tbl|| ' after insert or update on ' ||tbl|| ' for each row execute procedure on_new_row();';
end loop;
end $$;
end $$;
Loading