Skip to content
Kristian Larsson edited this page Nov 4, 2013 · 2 revisions

NIPAP uses triggers in the PostgreSQL database quite extensively. They are used to keep data consistency as well as updating certain information.

Triggers can be triggered before or after the INSERT/UPDATE/DELETE on a row.

Triggers that are triggered before should primarily be used for data consistency checks and modifying the new row before it gets committed to disk.

Triggers are are triggered after can be used to update other rows (like calc_indent/calc_tags does).

Need to reevaluate tags when prefix changes