Event triggers in PostgreSQL traditionally require superuser access, which is often not feasible in cloud environments. Using the Supautils extension, regular users can create event triggers through a privileged role that temporarily escalates privileges. Utility and Function Manager Hooks are employed to safely manage privilege escalation and execution, circumventing issues with malicious user actions. Discussion is ongoing for core integration in PostgreSQL.
Table of contents
Privileged Role #The privilege escalation problem #Skipping Event Triggers #User Event Triggers #Future in Postgres core #Try it out #Footnotes #Sort: